From 13504be081107a284f807419d0167676319de82e Mon Sep 17 00:00:00 2001 From: Javier Segarra <jsegarra@verdnatura.es> Date: Fri, 2 Feb 2024 09:32:59 +0100 Subject: [PATCH 1/7] refs #5888 feat: change layout --- .../Customer/Card/CustomerFiscalData.vue | 137 ++--------------- .../Supplier/Card/SupplierFiscalData.vue | 141 ++---------------- 2 files changed, 30 insertions(+), 248 deletions(-) diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue index 0edcc3c073..bf877f1453 100644 --- a/src/pages/Customer/Card/CustomerFiscalData.vue +++ b/src/pages/Customer/Card/CustomerFiscalData.vue @@ -8,29 +8,22 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; -import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; -import VnSelectCreate from 'src/components/common/VnSelectCreate.vue'; +import VnLocation from 'src/components/common/VnLocation.vue'; const { t } = useI18n(); const route = useRoute(); -const townsFetchDataRef = ref(null); -const postcodeFetchDataRef = ref(null); const typesTaxes = ref([]); const typesTransactions = ref([]); -const citiesLocationOptions = ref([]); -const provincesLocationOptions = ref([]); -const countriesOptions = ref([]); const postcodesOptions = ref([]); -const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formData) => { - await postcodeFetchDataRef.value.fetch(); - await townsFetchDataRef.value.fetch(); - formData.postcode = code; - formData.provinceFk = provinceFk; - formData.city = citiesLocationOptions.value.find((town) => town.id === townFk).name; - formData.countryFk = countryFk; -}; +function handleLocation(data, location) { + const { town, code, provinceFk, countryFk } = location ?? {}; + data.postcode = code; + data.city = town; + data.provinceFk = provinceFk; + data.countryFk = countryFk; +} </script> <template> @@ -40,28 +33,6 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa @on-fetch="(data) => (typesTransactions = data)" url="SageTransactionTypes" /> - <FetchData - ref="townsFetchDataRef" - @on-fetch="(data) => (citiesLocationOptions = data)" - auto-load - url="Towns/location" - /> - <FetchData - @on-fetch="(data) => (provincesLocationOptions = data)" - auto-load - url="Provinces/location" - /> - <FetchData - @on-fetch="(data) => (countriesOptions = data)" - auto-load - url="Countries" - /> - <FetchData - ref="postcodeFetchDataRef" - url="Postcodes/location" - @on-fetch="(data) => (postcodesOptions = data)" - auto-load - /> <FormModel :url-update="`Clients/${route.params.id}/updateFiscalData`" :url="`Clients/${route.params.id}/getCard`" @@ -114,94 +85,14 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa <VnRow class="row q-gutter-md q-mb-md"> <div class="col"> - <VnSelectCreate - :label="t('Postcode')" - :options="postcodesOptions" - :roles-allowed-to-create="['deliveryAssistant']" + <VnLocation :rules="validate('Worker.postcode')" - hide-selected - option-label="code" - option-value="code" - v-model="data.postcode" + :roles-allowed-to-create="['deliveryAssistant']" + :options="postcodesOptions" + v-model="data.location" + @update:model-value="(location) => handleLocation(data, location)" > - <template #form> - <CustomerCreateNewPostcode - @on-data-saved="onPostcodeCreated($event, data)" - /> - </template> - <template #option="scope"> - <QItem v-bind="scope.itemProps"> - <QItemSection v-if="scope.opt"> - <QItemLabel>{{ scope.opt.code }}</QItemLabel> - <QItemLabel caption - >{{ scope.opt.code }} - - {{ scope.opt.town.name }} ({{ - scope.opt.town.province.name - }}, - {{ - scope.opt.town.province.country.country - }})</QItemLabel - > - </QItemSection> - </QItem> - </template> - </VnSelectCreate> - </div> - <div class="col"> - <VnSelectFilter - :label="t('City')" - :options="citiesLocationOptions" - hide-selected - option-label="name" - option-value="name" - v-model="data.city" - > - <template #option="scope"> - <QItem v-bind="scope.itemProps"> - <QItemSection> - <QItemLabel>{{ scope.opt.name }}</QItemLabel> - <QItemLabel caption> - {{ - `${scope.opt.name}, ${scope.opt.province.name} (${scope.opt.province.country.country})` - }} - </QItemLabel> - </QItemSection> - </QItem> - </template> - </VnSelectFilter> - </div> - </VnRow> - - <VnRow class="row q-gutter-md q-mb-md"> - <div class="col"> - <VnSelectFilter - :label="t('Province')" - :options="provincesLocationOptions" - hide-selected - option-label="name" - option-value="id" - v-model="data.provinceFk" - > - <template #option="scope"> - <QItem v-bind="scope.itemProps"> - <QItemSection> - <QItemLabel>{{ - `${scope.opt.name} (${scope.opt.country.country})` - }}</QItemLabel> - </QItemSection> - </QItem> - </template> - </VnSelectFilter> - </div> - <div class="col"> - <VnSelectFilter - :label="t('Country')" - :options="countriesOptions" - hide-selected - option-label="country" - option-value="id" - v-model="data.countryFk" - /> + </VnLocation> </div> </VnRow> diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue index d481d6205a..b17a30ce16 100644 --- a/src/pages/Supplier/Card/SupplierFiscalData.vue +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -8,31 +8,24 @@ import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; -import VnSelectCreate from 'src/components/common/VnSelectCreate.vue'; -import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue'; +import VnLocation from 'src/components/common/VnLocation.vue'; const route = useRoute(); const { t } = useI18n(); -const postcodeFetchDataRef = ref(null); -const townsFetchDataRef = ref(null); const sageTaxTypesOptions = ref([]); const sageWithholdingsOptions = ref([]); const sageTransactionTypesOptions = ref([]); const supplierActivitiesOptions = ref([]); const postcodesOptions = ref([]); -const provincesLocationOptions = ref([]); -const townsLocationOptions = ref([]); -const countriesOptions = ref([]); -const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formData) => { - await postcodeFetchDataRef.value.fetch(); - await townsFetchDataRef.value.fetch(); - formData.postCode = code; - formData.provinceFk = provinceFk; - formData.city = townsLocationOptions.value.find((town) => town.id === townFk).name; - formData.countryFk = countryFk; -}; +function handleLocation(data, location) { + const { town, code, provinceFk, countryFk } = location ?? {}; + data.postcode = code; + data.city = town; + data.provinceFk = provinceFk; + data.countryFk = countryFk; +} </script> <template> <FetchData @@ -55,28 +48,6 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa auto-load @on-fetch="(data) => (supplierActivitiesOptions = data)" /> - <FetchData - ref="postcodeFetchDataRef" - url="Postcodes/location" - @on-fetch="(data) => (postcodesOptions = data)" - auto-load - /> - <FetchData - ref="townsFetchDataRef" - @on-fetch="(data) => (townsLocationOptions = data)" - auto-load - url="Towns/location" - /> - <FetchData - @on-fetch="(data) => (provincesLocationOptions = data)" - auto-load - url="Provinces/location" - /> - <FetchData - @on-fetch="(data) => (countriesOptions = data)" - auto-load - url="Countries" - /> <FormModel :url="`Suppliers/${route.params.id}`" :url-update="`Suppliers/${route.params.id}/updateFiscalData`" @@ -172,100 +143,20 @@ const onPostcodeCreated = async ({ code, provinceFk, townFk, countryFk }, formDa clearable /> </div> + </VnRow> + <VnRow class="row q-gutter-md q-mb-md"> <div class="col"> - <VnSelectCreate - :label="t('supplier.fiscalData.postcode')" - v-model="data.postCode" - :options="postcodesOptions" - :rules="validate('supplier.postCode')" + <VnLocation + :rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']" - option-label="code" - option-value="code" - hide-selected + :options="postcodesOptions" + v-model="data.location" + @update:model-value="(location) => handleLocation(data, location)" > - <template #form> - <CustomerCreateNewPostcode - @on-data-saved="onPostcodeCreated($event, data)" - /> - </template> - <template #option="scope"> - <QItem v-bind="scope.itemProps"> - <QItemSection v-if="scope.opt"> - <QItemLabel>{{ scope.opt.code }}</QItemLabel> - <QItemLabel caption - >{{ scope.opt.code }} - - {{ scope.opt.town.name }} ({{ - scope.opt.town.province.name - }}, - {{ - scope.opt.town.province.country.country - }})</QItemLabel - > - </QItemSection> - </QItem> - </template> - </VnSelectCreate> + </VnLocation> </div> </VnRow> <VnRow class="row q-gutter-md q-mb-md"> - <div class="col"> - <VnSelectFilter - :label="t('supplier.fiscalData.city')" - :options="townsLocationOptions" - v-model="data.city" - option-value="name" - option-label="name" - hide-selected - :rules="validate('supplier.city')" - > - <template #option="scope"> - <QItem v-bind="scope.itemProps"> - <QItemSection> - <QItemLabel>{{ scope.opt.name }}</QItemLabel> - <QItemLabel caption - >{{ scope.opt.name }}, - {{ scope.opt.province.name }} ({{ - scope.opt.province.country.country - }})</QItemLabel - > - </QItemSection> - </QItem> - </template> - </VnSelectFilter> - </div> - <div class="col"> - <VnSelectFilter - :label="t('supplier.fiscalData.provinceFk')" - :options="provincesLocationOptions" - hide-selected - option-label="name" - option-value="id" - v-model="data.provinceFk" - > - <template #option="scope"> - <QItem v-bind="scope.itemProps"> - <QItemSection> - <QItemLabel>{{ - `${scope.opt.name} (${scope.opt.country.country})` - }}</QItemLabel> - </QItemSection> - </QItem> - </template> - </VnSelectFilter> - </div> - </VnRow> - <VnRow class="row q-gutter-md q-mb-md"> - <div class="col"> - <VnSelectFilter - :label="t('supplier.fiscalData.country')" - :options="countriesOptions" - hide-selected - option-label="country" - option-value="id" - v-model="data.countryFk" - :rules="validate('postcode.countryFk')" - /> - </div> <div class="col flex justify-around"> <QCheckbox v-model="data.isTrucker" From fd56f0744be8fd3e317e529dadacddab73861fdd Mon Sep 17 00:00:00 2001 From: Javier Segarra <jsegarra@verdnatura.es> Date: Fri, 2 Feb 2024 09:42:45 +0100 Subject: [PATCH 2/7] refs #5888 feat: change model variable --- src/pages/Customer/Card/CustomerFiscalData.vue | 6 +++--- src/pages/Supplier/Card/SupplierFiscalData.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Customer/Card/CustomerFiscalData.vue b/src/pages/Customer/Card/CustomerFiscalData.vue index bf877f1453..76c84509e6 100644 --- a/src/pages/Customer/Card/CustomerFiscalData.vue +++ b/src/pages/Customer/Card/CustomerFiscalData.vue @@ -27,8 +27,8 @@ function handleLocation(data, location) { </script> <template> - <fetch-data auto-load @on-fetch="(data) => (typesTaxes = data)" url="SageTaxTypes" /> - <fetch-data + <FetchData auto-load @on-fetch="(data) => (typesTaxes = data)" url="SageTaxTypes" /> + <FetchData auto-load @on-fetch="(data) => (typesTransactions = data)" url="SageTransactionTypes" @@ -89,7 +89,7 @@ function handleLocation(data, location) { :rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions" - v-model="data.location" + v-model="data.postcode" @update:model-value="(location) => handleLocation(data, location)" > </VnLocation> diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue index b17a30ce16..b26582065a 100644 --- a/src/pages/Supplier/Card/SupplierFiscalData.vue +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -150,7 +150,7 @@ function handleLocation(data, location) { :rules="validate('Worker.postcode')" :roles-allowed-to-create="['deliveryAssistant']" :options="postcodesOptions" - v-model="data.location" + v-model="data.postCode" @update:model-value="(location) => handleLocation(data, location)" > </VnLocation> From 1c7ad7946e2ea468b0f0bcd3a7e34e1c503d6b0e Mon Sep 17 00:00:00 2001 From: Javier Segarra <jsegarra@verdnatura.es> Date: Fri, 2 Feb 2024 14:41:59 +0100 Subject: [PATCH 3/7] refs #5888 feat: change layout --- src/components/common/VnLocation.vue | 25 ++++--- test/cypress/integration/VnLocation.spec.js | 81 +++++++++++++++------ 2 files changed, 72 insertions(+), 34 deletions(-) diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index 0b30faaa73..7e42d4b854 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -55,7 +55,7 @@ const value = computed({ }); onMounted(() => { - locationFilter() + locationFilter($props.modelValue); }); function setOptions(data) { @@ -69,34 +69,39 @@ watch(options, (newValue) => { }); function showLabel(data) { - return `${data.code} - ${data.town}(${data.province}), ${data.country}`; + return `${data.code} - ${data.town}(${data.province}), ${data.country}`; } -function locationFilter(search) { +function locationFilter(search = '') { + if ( + search && + (search.includes('undefined') || search.startsWith(`${$props.modelValue} - `)) + ) + return; let where = { search }; - postcodesRef.value.fetch({filter:{ where}, limit: 30}); + postcodesRef.value.fetch({ filter: { where }, limit: 30 }); } -function handleFetch( data) { +function handleFetch(data) { postcodesOptions.value = data; } - </script> <template> <FetchData ref="postcodesRef" url="Postcodes/filter" - @on-fetch="(data) =>handleFetch(data)" + @on-fetch="(data) => handleFetch(data)" /> <VnSelectCreate v-if="postcodesRef" + :option-label="(opt) => showLabel(opt) ?? 'code'" + :option-value="(opt) => opt.code" v-model="value" :options="postcodesOptions" :label="t('Location')" - :option-label="showLabel" :placeholder="t('Search by postalCode, town, province or country')" @input-value="locationFilter" - :default-filter="false" + :default-filter="true" :input-debounce="300" :class="{ required: $attrs.required }" v-bind="$attrs" @@ -110,7 +115,7 @@ function handleFetch( data) { <template #form> <CreateNewPostcode @on-data-saved="locationFilter()" /> </template> - <template #option="{itemProps, opt}"> + <template #option="{ itemProps, opt }"> <QItem v-bind="itemProps"> <QItemSection v-if="opt"> <QItemLabel>{{ opt.code }}</QItemLabel> diff --git a/test/cypress/integration/VnLocation.spec.js b/test/cypress/integration/VnLocation.spec.js index fe0ecee687..a332be4495 100644 --- a/test/cypress/integration/VnLocation.spec.js +++ b/test/cypress/integration/VnLocation.spec.js @@ -1,31 +1,64 @@ -const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item' describe('VnLocation', () => { - beforeEach(() => { - cy.viewport(1280, 720); - cy.login('developer'); - cy.visit('/#/worker/create'); - cy.waitForElement('.q-card'); - }); + // describe('Create',()=>{ + // const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; + // beforeEach(() => { + // cy.viewport(1280, 720); + // cy.login('developer'); + // cy.visit('/#/worker/create'); + // cy.waitForElement('.q-card'); + // }); - it('Show all options', function() { - cy.get(inputLocation).click(); - cy.get(locationOptions).should('have.length',5); - }); + // it('Show all options', function() { + // cy.get(inputLocation).click(); + // cy.get(locationOptions).should('have.length',5); + // }); - it('input filter location as "al"', function() { - cy.get(inputLocation).click(); - cy.get(inputLocation).clear(); - cy.get(inputLocation).type('al'); - cy.get(locationOptions).should('have.length',3); - }); - it('input filter location as "ecuador"', function() { - cy.get(inputLocation).click(); - cy.get(inputLocation).clear(); - cy.get(inputLocation).type('ecuador'); - cy.get(locationOptions).should('have.length',1); - cy.get(`${locationOptions}:nth-child(1)`).click(); - cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click(); + // it('input filter location as "al"', function() { + // cy.get(inputLocation).click(); + // cy.get(inputLocation).clear(); + // cy.get(inputLocation).type('al'); + // cy.get(locationOptions).should('have.length',3); + // }); + // it('input filter location as "ecuador"', function() { + // cy.get(inputLocation).click(); + // cy.get(inputLocation).clear(); + // cy.get(inputLocation).type('ecuador'); + // cy.get(locationOptions).should('have.length',1); + // cy.get(`${locationOptions}:nth-child(1)`).click(); + // cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click(); + // }); + // }); + describe('Fiscal-data',()=>{ + const inputLocation = ':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; + + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('/#/supplier/567/fiscal-data', {timeout: 2000}); + cy.waitForElement('.q-card'); + }); + + it('Show all options', function() { + // cy.get(inputLocation).click(); + // cy.get(locationOptions).should('have.length',5); + // }); + + // it('input filter location as "al"', function() { + // cy.get(inputLocation).click(); + // cy.get(inputLocation).clear(); + // cy.get(inputLocation).type('al'); + // cy.get(locationOptions).should('have.length',3); + // }); + // it('input filter location as "ecuador"', function() { + cy.get(inputLocation).click(); + // cy.get(inputLocation).clear(); + // cy.get(inputLocation).type('ecuador'); + cy.get(locationOptions).should('have.length',1); + // cy.get(`${locationOptions}:nth-child(1)`).click(); + // cy.get(':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input').should('have.text','46600') + + }); }); }) From 76c98c59b9ae3da16cbe6a7f034804c02c5dd1d3 Mon Sep 17 00:00:00 2001 From: Javier Segarra <jsegarra@verdnatura.es> Date: Fri, 2 Feb 2024 14:52:19 +0100 Subject: [PATCH 4/7] refs #5888 test: improve tests --- test/cypress/integration/VnLocation.spec.js | 72 ++++++++------------- 1 file changed, 28 insertions(+), 44 deletions(-) diff --git a/test/cypress/integration/VnLocation.spec.js b/test/cypress/integration/VnLocation.spec.js index a332be4495..02b924e4df 100644 --- a/test/cypress/integration/VnLocation.spec.js +++ b/test/cypress/integration/VnLocation.spec.js @@ -1,35 +1,35 @@ const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item' describe('VnLocation', () => { - // describe('Create',()=>{ - // const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; - // beforeEach(() => { - // cy.viewport(1280, 720); - // cy.login('developer'); - // cy.visit('/#/worker/create'); - // cy.waitForElement('.q-card'); - // }); + describe('Create',()=>{ + const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; + beforeEach(() => { + cy.viewport(1280, 720); + cy.login('developer'); + cy.visit('/#/worker/create'); + cy.waitForElement('.q-card'); + }); - // it('Show all options', function() { - // cy.get(inputLocation).click(); - // cy.get(locationOptions).should('have.length',5); - // }); + it('Show all options', function() { + cy.get(inputLocation).click(); + cy.get(locationOptions).should('have.length',5); + }); - // it('input filter location as "al"', function() { - // cy.get(inputLocation).click(); - // cy.get(inputLocation).clear(); - // cy.get(inputLocation).type('al'); - // cy.get(locationOptions).should('have.length',3); - // }); - // it('input filter location as "ecuador"', function() { - // cy.get(inputLocation).click(); - // cy.get(inputLocation).clear(); - // cy.get(inputLocation).type('ecuador'); - // cy.get(locationOptions).should('have.length',1); - // cy.get(`${locationOptions}:nth-child(1)`).click(); - // cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click(); + it('input filter location as "al"', function() { + cy.get(inputLocation).click(); + cy.get(inputLocation).clear(); + cy.get(inputLocation).type('al'); + cy.get(locationOptions).should('have.length',3); + }); + it('input filter location as "ecuador"', function() { + cy.get(inputLocation).click(); + cy.get(inputLocation).clear(); + cy.get(inputLocation).type('ecuador'); + cy.get(locationOptions).should('have.length',1); + cy.get(`${locationOptions}:nth-child(1)`).click(); + cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click(); - // }); - // }); + }); + }); describe('Fiscal-data',()=>{ const inputLocation = ':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control'; @@ -41,24 +41,8 @@ describe('VnLocation', () => { }); it('Show all options', function() { - // cy.get(inputLocation).click(); - // cy.get(locationOptions).should('have.length',5); - // }); - - // it('input filter location as "al"', function() { - // cy.get(inputLocation).click(); - // cy.get(inputLocation).clear(); - // cy.get(inputLocation).type('al'); - // cy.get(locationOptions).should('have.length',3); - // }); - // it('input filter location as "ecuador"', function() { cy.get(inputLocation).click(); - // cy.get(inputLocation).clear(); - // cy.get(inputLocation).type('ecuador'); - cy.get(locationOptions).should('have.length',1); - // cy.get(`${locationOptions}:nth-child(1)`).click(); - // cy.get(':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input').should('have.text','46600') - + cy.get(locationOptions).should('have.length', 1); }); }); }) From d49a82d10c8f7d7b82368c1f9d7acc515a3b3a38 Mon Sep 17 00:00:00 2001 From: JAVIER SEGARRA MARTINEZ <jsegarra@verdnatura.es> Date: Sun, 4 Feb 2024 15:51:54 +0000 Subject: [PATCH 5/7] Refs #6694 fix: VnLocation placeholder i18n --- src/components/common/VnLocation.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index 7e42d4b854..b55706ad2b 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -99,7 +99,7 @@ function handleFetch(data) { v-model="value" :options="postcodesOptions" :label="t('Location')" - :placeholder="t('Search by postalCode, town, province or country')" + :placeholder="t('Search by postalcode, town, province or country')" @input-value="locationFilter" :default-filter="true" :input-debounce="300" From 7e8f81323a9f31d523230b248173af3f5f6cb221 Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> Date: Tue, 6 Feb 2024 13:23:11 +0100 Subject: [PATCH 6/7] refs #6809 supplier UpperCase --- src/pages/Supplier/SupplierCreate.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue index 8424ae68c6..3204a5c276 100644 --- a/src/pages/Supplier/SupplierCreate.vue +++ b/src/pages/Supplier/SupplierCreate.vue @@ -10,6 +10,7 @@ import VnInput from 'src/components/common/VnInput.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import { useStateStore } from 'stores/useStateStore'; +import Supplier from 'src/router/modules/Supplier'; const router = useRouter(); const { t } = useI18n(); @@ -49,6 +50,9 @@ const redirectToSupplierFiscalData = (_, responseData) => { <VnInput v-model="data.name" :label="t('supplier.create.supplierName')" + @keyup=" + newSupplierForm.name = newSupplierForm.name.toUpperCase() + " /> </div> </VnRow> From 8e869a650def6fd67be0756645513b279c006ba4 Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> Date: Tue, 6 Feb 2024 13:26:13 +0100 Subject: [PATCH 7/7] refs #6809 remove supplier --- src/pages/Supplier/SupplierCreate.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue index 3204a5c276..d80bd2df84 100644 --- a/src/pages/Supplier/SupplierCreate.vue +++ b/src/pages/Supplier/SupplierCreate.vue @@ -10,7 +10,6 @@ import VnInput from 'src/components/common/VnInput.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import { useStateStore } from 'stores/useStateStore'; -import Supplier from 'src/router/modules/Supplier'; const router = useRouter(); const { t } = useI18n();