From c3510aea60dab2c4016bc87e01473c760715c9e9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 26 Nov 2024 00:18:42 +0100 Subject: [PATCH 01/11] feat: add Options Style in AddressList from TicketCrete --- src/pages/Ticket/TicketList.vue | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index aa666be98..a66a0b7f6 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -273,9 +273,8 @@ const fetchAddresses = async (formData) => { if (!formData.clientId) return; const filter = { - fields: ['nickname', 'street', 'city', 'id'], - where: { isActive: true }, - order: 'nickname ASC', + fields: ['nickname', 'street', 'city', 'id', 'isActive'], + order: ['isDefaultAddress DESC', 'isActive DESC', 'nickname ASC'], }; const params = { filter: JSON.stringify(filter) }; const { data } = await axios.get(`Clients/${formData.clientId}/addresses`, { @@ -643,7 +642,22 @@ function setReference(data) { @update:model-value="() => fetchAvailableAgencies(data)" > @@ -203,7 +201,6 @@ es: Salesperson: Comercial Province: Provincia City: Ciudad - More options: Más opciones Phone: Teléfono Email: Email Zone: Zona diff --git a/src/pages/InvoiceIn/InvoiceInFilter.vue b/src/pages/InvoiceIn/InvoiceInFilter.vue index d1c0856b5..130a77960 100644 --- a/src/pages/InvoiceIn/InvoiceInFilter.vue +++ b/src/pages/InvoiceIn/InvoiceInFilter.vue @@ -184,5 +184,4 @@ es: Amount: Importe Issued: Fecha factura Id or supplier: Id o proveedor - More options: Más opciones diff --git a/src/pages/InvoiceOut/InvoiceOutFilter.vue b/src/pages/InvoiceOut/InvoiceOutFilter.vue index 9ce8cc254..dc1d833a2 100644 --- a/src/pages/InvoiceOut/InvoiceOutFilter.vue +++ b/src/pages/InvoiceOut/InvoiceOutFilter.vue @@ -83,36 +83,29 @@ const states = ref(); /> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -149,5 +142,4 @@ es: Issued: Fecha emisión Created: Fecha creación Dued: Fecha vencimiento - More options: Más opciones diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue index 6f1cac83b..bde27f30e 100644 --- a/src/pages/Ticket/TicketFilter.vue +++ b/src/pages/Ticket/TicketFilter.vue @@ -212,81 +212,78 @@ const getGroupedStates = (data) => { /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -340,7 +337,6 @@ es: With problems: Con problemas Invoiced: Facturado Routed: Enrutado - More options: Más opciones Province: Provincia Agency: Agencia Warehouse: Almacén From 72a481ae5b4aed6768b7db6be2fdbb3c7520093b Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 27 Nov 2024 01:30:42 +0100 Subject: [PATCH 08/11] test: remove only --- test/vitest/__tests__/components/common/VnLinkPhone.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/vitest/__tests__/components/common/VnLinkPhone.spec.js b/test/vitest/__tests__/components/common/VnLinkPhone.spec.js index 1d679d979..e460ab2fc 100644 --- a/test/vitest/__tests__/components/common/VnLinkPhone.spec.js +++ b/test/vitest/__tests__/components/common/VnLinkPhone.spec.js @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest'; import parsePhone from 'src/filters/parsePhone'; -describe.only('parsePhone filter', () => { +describe('parsePhone filter', () => { it("adds prefix +34 if it doesn't have one", () => { const resultado = parsePhone('123456789', '34'); expect(resultado).toBe('34123456789'); @@ -22,7 +22,7 @@ describe.only('parsePhone filter', () => { expect(resultado).toBe('34123456789'); }); - it.only('replaces incorrect prefix with the correct one', () => { + it('replaces incorrect prefix with the correct one', () => { const resultado = parsePhone('+44123456789', '34'); expect(resultado).toBe('44123456789'); }); From 7d28037c29a89ed9a9a09cd7afcb99e6d557541f Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 27 Nov 2024 14:09:37 +0100 Subject: [PATCH 09/11] fix: fixed ref filter in InvoiceOutList --- src/pages/InvoiceOut/InvoiceOutList.vue | 38 ++++++++++++------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 092844386..f5a4f7d80 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -43,16 +43,17 @@ const columns = computed(() => [ { align: 'left', name: 'ref', - label: t('invoiceOutList.tableVisibleColumns.ref'), + label: t('globals.reference'), isTitle: true, component: 'select', attrs: { url: MODEL, optionLabel: 'ref', - optionValue: 'id', + optionValue: 'ref', }, - columnField: { - component: null, + columnField: { component: null }, + columnFilter: { + inWhere: true, }, }, { @@ -147,25 +148,22 @@ function openPdf(id) { } function downloadPdf() { - if (selectedRows.value.size === 0) return; - const selectedCardsArray = Array.from(selectedRows.value.values()); + if (selectedRows.value.size === 0) return; + const selectedCardsArray = Array.from(selectedRows.value.values()); - if (selectedRows.value.size === 1) { - const [invoiceOut] = selectedCardsArray; - openPdf(invoiceOut.id); - } else { - const invoiceOutIdsArray = selectedCardsArray.map( - (invoiceOut) => invoiceOut.id - ); - const invoiceOutIds = invoiceOutIdsArray.join(','); + if (selectedRows.value.size === 1) { + const [invoiceOut] = selectedCardsArray; + openPdf(invoiceOut.id); + } else { + const invoiceOutIdsArray = selectedCardsArray.map((invoiceOut) => invoiceOut.id); + const invoiceOutIds = invoiceOutIdsArray.join(','); - const params = { - ids: invoiceOutIds, - }; - - openReport(`${MODEL}/downloadZip`, params); - } + const params = { + ids: invoiceOutIds, + }; + openReport(`${MODEL}/downloadZip`, params); + } } watchEffect(selectedRows); From 33de645e37bd9ac0d9942e6d8d07ca7a0445c5c4 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 27 Nov 2024 17:02:41 +0100 Subject: [PATCH 10/11] fix: not fetch on mounted --- src/components/ui/VnPaginate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index f3f6d64f1..3649ba8f5 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -133,7 +133,7 @@ const addFilter = async (filter, params) => { async function fetch(params) { useArrayData(props.dataKey, params); arrayData.reset(['filter.skip', 'skip', 'page']); - await arrayData.fetch({ append: false }); + await arrayData.fetch({ append: false, updateRouter: mounted.value }); return emitStoreData(); } From 55b9e3ddcdea6edd213cc9df08f610e62d09088a Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 28 Nov 2024 08:21:09 +0100 Subject: [PATCH 11/11] fix: refs #7266 Bad report --- src/pages/Entry/EntryBuysTableDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntryBuysTableDialog.vue index c885c2485..77b31aaa3 100644 --- a/src/pages/Entry/EntryBuysTableDialog.vue +++ b/src/pages/Entry/EntryBuysTableDialog.vue @@ -86,7 +86,7 @@ const entriesTableColumns = computed(() => [ color="primary" icon="print" :loading="isLoading" - @click="openReport(`Entries/${entityId}/print`)" + @click="openReport(`Entries/${entityId}/buy-label-supplier`)" unelevated autofocus />