0
0
Fork 0

Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7281-solveTerminalWarnings

This commit is contained in:
Jorge Penadés 2024-05-16 08:58:00 +02:00
commit ed9310cbb1
8 changed files with 44 additions and 45 deletions

View File

@ -21,7 +21,7 @@ const bankEntityFormData = reactive({
}); });
const countriesFilter = { const countriesFilter = {
fields: ['id', 'country', 'code'], fields: ['id', 'name', 'code'],
}; };
const countriesOptions = ref([]); const countriesOptions = ref([]);
@ -74,7 +74,7 @@ onMounted(async () => {
v-model="data.countryFk" v-model="data.countryFk"
:options="countriesOptions" :options="countriesOptions"
option-value="id" option-value="id"
option-label="country" option-label="name"
hide-selected hide-selected
:required="true" :required="true"
:rules="validate('bankEntity.countryFk')" :rules="validate('bankEntity.countryFk')"

View File

@ -134,7 +134,7 @@ const onProvinceCreated = async ({ name }, formData) => {
:label="t('Country')" :label="t('Country')"
:options="countriesOptions" :options="countriesOptions"
hide-selected hide-selected
option-label="country" option-label="name"
option-value="id" option-value="id"
v-model="data.countryFk" v-model="data.countryFk"
:rules="validate('postcode.countryFk')" :rules="validate('postcode.countryFk')"

View File

@ -178,6 +178,8 @@ function copyUserToken() {
:options="warehousesData" :options="warehousesData"
option-label="name" option-label="name"
option-value="id" option-value="id"
input-debounce="0"
hide-selected
/> />
<VnSelect <VnSelect
:label="t('components.userPanel.localBank')" :label="t('components.userPanel.localBank')"
@ -185,6 +187,8 @@ function copyUserToken() {
:options="accountBankData" :options="accountBankData"
option-label="bank" option-label="bank"
option-value="id" option-value="id"
input-debounce="0"
hide-selected
> >
<template #option="{ itemProps, opt }"> <template #option="{ itemProps, opt }">
<QItem v-bind="itemProps"> <QItem v-bind="itemProps">
@ -201,10 +205,11 @@ function copyUserToken() {
<VnSelect <VnSelect
:label="t('components.userPanel.localCompany')" :label="t('components.userPanel.localCompany')"
hide-selected hide-selected
v-model="user.companyFk" v-model="user.localCompanyFk"
:options="companiesData" :options="companiesData"
option-label="code" option-label="code"
option-value="id" option-value="id"
input-debounce="0"
/> />
<VnSelect <VnSelect
:label="t('components.userPanel.userWarehouse')" :label="t('components.userPanel.userWarehouse')"
@ -213,6 +218,7 @@ function copyUserToken() {
:options="warehousesData" :options="warehousesData"
option-label="name" option-label="name"
option-value="id" option-value="id"
input-debounce="0"
/> />
</VnRow> </VnRow>
<VnRow> <VnRow>
@ -224,6 +230,8 @@ function copyUserToken() {
option-label="code" option-label="code"
option-value="id" option-value="id"
style="flex: 0" style="flex: 0"
dense
input-debounce="0"
/> />
</VnRow> </VnRow>
</div> </div>

View File

@ -20,28 +20,12 @@ const headerMounted = ref(false);
export function useState() { export function useState() {
function getUser() { function getUser() {
return computed(() => { return computed(() => {
return { return user.value;
id: user.value.id,
name: user.value.name,
nickname: user.value.nickname,
lang: user.value.lang,
darkMode: user.value.darkMode,
companyFk: user.value.companyFk,
warehouseFk: user.value.warehouseFk,
};
}); });
} }
function setUser(data) { function setUser(data) {
user.value = { user.value = data;
id: data.id,
name: data.name,
nickname: data.nickname,
lang: data.lang,
darkMode: data.darkMode,
companyFk: data.companyFk,
warehouseFk: data.warehouseFk,
};
} }
function getRoles() { function getRoles() {

View File

@ -102,22 +102,24 @@ function handleLocation(data, location) {
</VnLocation> </VnLocation>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox :label="t('Active')" v-model="data.isActive" /> <QCheckbox :label="t('Active')" v-model="data.isActive" />
<QCheckbox :label="t('Frozen')" v-model="data.isFreezed" /> <QCheckbox :label="t('Frozen')" v-model="data.isFreezed" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox :label="t('Has to invoice')" v-model="data.hasToInvoice" /> <QCheckbox :label="t('Has to invoice')" v-model="data.hasToInvoice" />
<div>
<QCheckbox :label="t('Vies')" v-model="data.isVies" /> <QCheckbox :label="t('Vies')" v-model="data.isVies" />
<QIcon name="info" class="cursor-info q-ml-sm" size="sm"> <QIcon name="info" class="cursor-info q-ml-sm" size="sm">
<QTooltip> <QTooltip>
{{ t('whenActivatingIt') }} {{ t('whenActivatingIt') }}
</QTooltip> </QTooltip>
</QIcon> </QIcon>
</div>
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox :label="t('Notify by email')" v-model="data.isToBeMailed" /> <QCheckbox :label="t('Notify by email')" v-model="data.isToBeMailed" />
<QCheckbox <QCheckbox
:label="t('Invoice by address')" :label="t('Invoice by address')"
@ -125,17 +127,22 @@ function handleLocation(data, location) {
/> />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox :label="t('Is equalizated')" v-model="data.isEqualizated" /> <div>
<QCheckbox
:label="t('Is equalizated')"
v-model="data.isEqualizated"
/>
<QIcon class="cursor-info q-ml-sm" name="info" size="sm"> <QIcon class="cursor-info q-ml-sm" name="info" size="sm">
<QTooltip> <QTooltip>
{{ t('inOrderToInvoice') }} {{ t('inOrderToInvoice') }}
</QTooltip> </QTooltip>
</QIcon> </QIcon>
</div>
<QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" /> <QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" />
</VnRow> </VnRow>
<VnRow class="row q-gutter-md q-mb-md"> <VnRow>
<QCheckbox <QCheckbox
:label="t('Incoterms authorization')" :label="t('Incoterms authorization')"
v-model="data.hasIncoterms" v-model="data.hasIncoterms"

View File

@ -90,7 +90,7 @@ function getTotal(type) {
url="Countries" url="Countries"
auto-load auto-load
@on-fetch="(data) => (countries = data)" @on-fetch="(data) => (countries = data)"
sort-by="country" sort-by="name"
/> />
<FetchData <FetchData
url="Intrastats" url="Intrastats"

View File

@ -29,7 +29,7 @@ const countriesOptions = ref([]);
/> />
<FetchData <FetchData
url="countries" url="countries"
:filter="{ fields: ['id', 'country'], order: 'country ASC', limit: 30 }" :filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
@on-fetch="(data) => (countriesOptions = data)" @on-fetch="(data) => (countriesOptions = data)"
auto-load auto-load
/> />
@ -92,7 +92,7 @@ const countriesOptions = ref([]);
@update:model-value="searchFn()" @update:model-value="searchFn()"
:options="countriesOptions" :options="countriesOptions"
option-value="id" option-value="id"
option-label="country" option-label="name"
hide-selected hide-selected
dense dense
outlined outlined

View File

@ -35,8 +35,8 @@ const workersFilter = {
limit: 30, limit: 30,
}; };
const countriesFilter = { const countriesFilter = {
fields: ['id', 'country', 'code'], fields: ['id', 'name', 'code'],
order: 'country ASC', order: 'name ASC',
limit: 30, limit: 30,
}; };
const educationLevelsFilter = { fields: ['id', 'name'], order: 'name ASC', limit: 30 }; const educationLevelsFilter = { fields: ['id', 'name'], order: 'name ASC', limit: 30 };
@ -124,7 +124,7 @@ const maritalStatus = [
:label="t('Origin country')" :label="t('Origin country')"
:options="countriesOptions" :options="countriesOptions"
hide-selected hide-selected
option-label="country" option-label="name"
option-value="id" option-value="id"
v-model="data.originCountryFk" v-model="data.originCountryFk"
/> />