From 8d4dc5d9e15616b6f2a98a69c5b89640b13c2efd Mon Sep 17 00:00:00 2001 From: jtubau Date: Mon, 27 Jan 2025 09:17:19 +0100 Subject: [PATCH 1/9] fix: refs #8316 fix broken localizations for entry descriptor menu and items filter panel --- src/components/ItemsFilterPanel.vue | 7 +++++++ src/pages/Entry/Card/EntryDescriptorMenu.vue | 2 +- src/pages/Entry/locale/en.yml | 2 ++ src/pages/Entry/locale/es.yml | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index 084feb377..1586cad73 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -349,4 +349,11 @@ es: floramondo: Floramondo salesPersonFk: Comprador categoryFk: Categoría + Plant: Planta + Flower: Flor + Handmade: Hecho a mano + Artificial: Artificial + Green: Verde + Accessories: Accesorios + Fruit: Fruta diff --git a/src/pages/Entry/Card/EntryDescriptorMenu.vue b/src/pages/Entry/Card/EntryDescriptorMenu.vue index a357b46fe..03cab2651 100644 --- a/src/pages/Entry/Card/EntryDescriptorMenu.vue +++ b/src/pages/Entry/Card/EntryDescriptorMenu.vue @@ -17,6 +17,6 @@ function showEntryReport() { diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 97a3be32b..80f3491a8 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -76,6 +76,8 @@ entry: warehouseInFk: Warehouse in search: Search entries searchInfo: You can search by entry reference + descriptorMenu: + showEntryReport: Show entry report entryFilter: params: invoiceNumber: Invoice number diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 993913417..a5b968016 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -75,6 +75,8 @@ entry: warehouseInFk: Alm. entrada daysOnward: Días adelante daysAgo: Días atras + descriptorMenu: + showEntryReport: Ver informe del pedido search: Buscar entradas searchInfo: Puedes buscar por referencia de entrada entryFilter: From 6a17f87050bb0defa4c4d6352e8e5b6324ddb95f Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 28 Jan 2025 07:46:16 +0100 Subject: [PATCH 2/9] refactor: refs #8316 update Spanish translations for ItemsFilterPanel --- src/components/ItemsFilterPanel.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index 1586cad73..be4d475b6 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -349,11 +349,11 @@ es: floramondo: Floramondo salesPersonFk: Comprador categoryFk: Categoría - Plant: Planta - Flower: Flor + Plant: Planta natural + Flower: Flor fresca Handmade: Hecho a mano Artificial: Artificial - Green: Verde - Accessories: Accesorios + Green: Verdes frescos + Accessories: Complementos florales Fruit: Fruta From 2f19f093cb3b16da78a3e13fdb40b44f3a5ff586 Mon Sep 17 00:00:00 2001 From: PAU ROVIRA ROSALENY Date: Tue, 28 Jan 2025 06:49:39 +0000 Subject: [PATCH 3/9] feat: #8258 added hover and description to uppercase button --- src/components/common/VnInput.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index e921d8e1f..13902d271 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -174,7 +174,11 @@ const handleUppercase = () => { v-if="!$attrs.disabled && !($attrs.readonly) && $props.uppercase" @click="handleUppercase" class="uppercase-icon" - /> + > + + {{ t('Convert to uppercase') }} + + @@ -187,13 +191,26 @@ const handleUppercase = () => { + en: inputMin: Must be more than {value} maxLength: The value exceeds {value} characters inputMax: Must be less than {value} + es: inputMin: Debe ser mayor a {value} maxLength: El valor excede los {value} carácteres inputMax: Debe ser menor a {value} + Convert to uppercase: Convertir a mayúsculas \ No newline at end of file From 15487bfbf2dfabbbb845466b70026544d6f06c9c Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 28 Jan 2025 08:42:31 +0100 Subject: [PATCH 4/9] fix: item type translations --- .../Item/ItemType/Card/ItemTypeBasicData.vue | 21 +++++++++++-------- .../Item/ItemType/Card/ItemTypeDescriptor.vue | 8 +++---- src/pages/Item/locale/en.yml | 7 ------- src/pages/Item/locale/es.yml | 7 ------- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/pages/Item/ItemType/Card/ItemTypeBasicData.vue b/src/pages/Item/ItemType/Card/ItemTypeBasicData.vue index 1a4a7c9f3..b4032ff8a 100644 --- a/src/pages/Item/ItemType/Card/ItemTypeBasicData.vue +++ b/src/pages/Item/ItemType/Card/ItemTypeBasicData.vue @@ -48,14 +48,14 @@ const itemPackingTypesOptions = ref([]); > diff --git a/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue b/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue index 6d093d91d..09d3dbce5 100644 --- a/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue +++ b/src/pages/Item/ItemType/Card/ItemTypeDescriptor.vue @@ -50,15 +50,15 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity @on-fetch="setData" > diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index 52722198b..69014222f 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -76,13 +76,6 @@ itemTags: searchbar: label: Search item info: Search by item id -itemType: - shared: - code: Code - name: Name - worker: Worker - category: Category - temperature: Temperature item: params: daysOnward: Days onward diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 29af8dc5c..48858f2a5 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -76,13 +76,6 @@ itemTags: searchbar: label: Buscar artículo info: Buscar por id de artículo -itemType: - shared: - code: Código - name: Nombre - worker: Trabajador - category: Reino - temperature: Temperatura params: state: asfsdf item: From c4dcac8c00906ad3f2a48078f69888546f426b3d Mon Sep 17 00:00:00 2001 From: jtubau Date: Tue, 28 Jan 2025 10:22:22 +0100 Subject: [PATCH 5/9] fix: refs #8420 ensure search bar is visible before typing and enable details test --- test/cypress/integration/invoiceIn/invoiceInList.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js index 0eb495419..4e2b8f9cc 100644 --- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js @@ -9,7 +9,7 @@ describe('InvoiceInList', () => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/invoice-in/list`); - cy.get('#searchbar input').type('{enter}'); + cy.get('#searchbar input').should('be.visible').type('{enter}'); }); it('should redirect on clicking a invoice', () => { @@ -22,7 +22,7 @@ describe('InvoiceInList', () => { }); }); // https://redmine.verdnatura.es/issues/8420 - it.skip('should open the details', () => { + it('should open the details', () => { cy.get(firstDetailBtn).click(); cy.get(summaryHeaders).eq(1).contains('Basic data'); cy.get(summaryHeaders).eq(4).contains('Vat'); From 879373209ee2f878c0d2f61c4e7fb88ba1978de0 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 28 Jan 2025 10:54:59 +0100 Subject: [PATCH 6/9] refactor: entriesTotals --- src/pages/Travel/Card/TravelSummary.vue | 60 ++++++++++++------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue index 689711a74..9c5ce8e74 100644 --- a/src/pages/Travel/Card/TravelSummary.vue +++ b/src/pages/Travel/Card/TravelSummary.vue @@ -179,33 +179,31 @@ const entriesTableRows = computed(() => { return entries.value; }); -const entriesTotalHb = computed(() => - entriesTableRows.value.reduce((acc, { hb }) => acc + hb, 0) -); +const entriesTotals = computed(() => { + const totals = { + hb: 0, + freightValue: 0, + packageValue: 0, + cc: 0, + pallet: 0, + m3: 0, + }; -const entriesTotalFreight = computed(() => - toCurrency( - entriesTableRows.value.reduce((acc, { freightValue }) => acc + freightValue, 0) - ) -); + entriesTableRows.value.forEach((row) => { + for (const key in totals) { + totals[key] += row[key] || 0; + } + }); -const entriesTotalPackageValue = computed(() => - toCurrency( - entriesTableRows.value.reduce((acc, { packageValue }) => acc + packageValue, 0) - ) -); - -const entriesTotalCc = computed(() => - entriesTableRows.value.reduce((acc, { cc }) => acc + cc, 0) -); - -const entriesTotalPallet = computed(() => - entriesTableRows.value.reduce((acc, { pallet }) => acc + pallet, 0) -); - -const entriesTotalM3 = computed(() => - entriesTableRows.value.reduce((acc, { m3 }) => acc + m3, 0) -); + return { + hb: totals.hb.toFixed(2), + freight: toCurrency(totals.freightValue), + packageValue: toCurrency(totals.packageValue), + cc: totals.cc.toFixed(2), + pallet: totals.pallet.toFixed(2), + m3: totals.m3.toFixed(2), + }; +}); const getTravelEntries = async (id) => { const { data } = await axios.get(`Travels/${id}/getEntries`); @@ -368,12 +366,12 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`; - {{ entriesTotalHb }} - {{ entriesTotalFreight }} - {{ entriesTotalPackageValue }} - {{ entriesTotalCc }} - {{ entriesTotalPallet }} - {{ entriesTotalM3 }} + {{ entriesTotals.hb }} + {{ entriesTotals.freight }} + {{ entriesTotals.packageValue }} + {{ entriesTotals.cc }} + {{ entriesTotals.pallet }} + {{ entriesTotals.m3 }} From c67baccaeabbc975187493ec113760b566f251c7 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 28 Jan 2025 11:08:22 +0100 Subject: [PATCH 7/9] fix: update query parameters for thermograph routing --- src/pages/Travel/Card/TravelThermographs.vue | 2 +- src/pages/Travel/Card/TravelThermographsForm.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue index 0e11588f1..b520166d3 100644 --- a/src/pages/Travel/Card/TravelThermographs.vue +++ b/src/pages/Travel/Card/TravelThermographs.vue @@ -132,7 +132,7 @@ const redirectToThermographForm = (action, id) => { }; if (action === 'edit' && id) { - routeDetails.query = { travelThermographFk: id }; + routeDetails.query = { id }; } else if (action === 'create') { routeDetails.query = { agencyModeFk: travel.value?.agencyModeFk }; } diff --git a/src/pages/Travel/Card/TravelThermographsForm.vue b/src/pages/Travel/Card/TravelThermographsForm.vue index 5955ac9f9..7aec32972 100644 --- a/src/pages/Travel/Card/TravelThermographsForm.vue +++ b/src/pages/Travel/Card/TravelThermographsForm.vue @@ -83,7 +83,7 @@ const setEditDefaultParams = async () => { const filterObj = { include: { relation: 'dms' } }; const filter = encodeURIComponent(JSON.stringify(filterObj)); const { data } = await axios.get( - `TravelThermographs/${route.query.travelThermographFk}?filter=${filter}` + `TravelThermographs/${route.query.id}?filter=${filter}`, ); if (data) { @@ -170,7 +170,6 @@ const onThermographCreated = async (data) => { { }" sort-by="thermographFk ASC" option-label="thermographFk" - option-filter-value="thermographFk" + option-filter-value="id" :disable="viewAction === 'edit'" :tooltip="t('New thermograph')" :roles-allowed-to-create="['logistic']" + data-key="travelThermographSelect" >