From e7b431e9ec2c9745fb9b980d039d8f721093498c Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 09:32:35 +0100 Subject: [PATCH 01/10] fix(VnPaginate): disable pagination --- src/components/ui/VnPaginate.vue | 2 ++ src/pages/Item/ItemFixedPrice.vue | 2 +- src/pages/Ticket/Card/TicketSale.vue | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index b058dc6426..04a8438899 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -141,6 +141,8 @@ async function fetch(params) { } async function paginate() { + if (props.disableInfiniteScroll || !store.hasMoreData) return; + const { page, rowsPerPage, sortBy, descending } = pagination.value; if (!props.url) return; diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index 815c7d5196..628af681ab 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -440,7 +440,7 @@ function handleOnDataSave({ CrudModelRef }) { selection: 'multiple', }" :crud-model="{ - paginate: false, + disableInfiniteScroll: true, }" v-model:selected="rowsSelected" :row-click="saveOnRowChange" diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 1b97915292..08cf248ba0 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -621,7 +621,7 @@ watch( }" :create-as-dialog="false" :crud-model="{ - paginate: false, + disableInfiniteScroll: true, }" :default-remove="false" :default-reset="false" From 5d58bb0c139d7dd108c75736cd24325c8115a447 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 09:47:59 +0100 Subject: [PATCH 02/10] fix(VnPaginate): disable pagination --- src/components/VnTable/VnTable.vue | 2 ++ src/components/ui/VnPaginate.vue | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 908157610d..da6c89cbbb 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -325,6 +325,8 @@ function handleOnDataSaved(_) { } function handleScroll() { + if ($props.crudModel.disableInfiniteScroll) return; + const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); const { scrollHeight, scrollTop, clientHeight } = tMiddle; const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40; diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 04a8438899..b058dc6426 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -141,8 +141,6 @@ async function fetch(params) { } async function paginate() { - if (props.disableInfiniteScroll || !store.hasMoreData) return; - const { page, rowsPerPage, sortBy, descending } = pagination.value; if (!props.url) return; From 38ccf464b761e4724c5688a6e01af39a16c07d59 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 19 Nov 2024 11:52:00 +0100 Subject: [PATCH 03/10] fix: refs #7323 locale #7396 --- src/i18n/locale/en.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index ae7007c32c..531b3bc14c 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -583,15 +583,15 @@ worker: role: Role sipExtension: Extension locker: Locker - fiDueDate: Fecha de caducidad del DNI - sex: Sexo - seniority: Antigüedad + fiDueDate: FI due date + sex: Sex + seniority: Seniority fi: DNI/NIE/NIF - birth: Fecha de nacimiento - isFreelance: Autónomo + birth: Birth + isFreelance: Freelance isSsDiscounted: Bonificación SS - hasMachineryAuthorized: Autorizado para llevar maquinaria - isDisable: Trabajador desactivado + hasMachineryAuthorized: Machinery authorized + isDisable: Disable notificationsManager: activeNotifications: Active notifications availableNotifications: Available notifications From 1faab668b16baceb6ebec80c9075b1e38ff12acd Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 19 Nov 2024 11:53:33 +0100 Subject: [PATCH 04/10] fix: refs #7323 show advanced fields --- src/i18n/locale/es.yml | 6 +++--- src/pages/Worker/Card/WorkerSummary.vue | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index eb0978dddb..9bfa43c49c 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -579,9 +579,9 @@ worker: newWorker: Nuevo trabajador summary: boss: Jefe - phoneExtension: Extensión de teléfono - entPhone: Teléfono de empresa - personalPhone: Teléfono personal + phoneExtension: Ext. de teléfono + entPhone: Tel. de empresa + personalPhone: Tel. personal noBoss: Sin jefe userData: Datos de usuario userId: ID del usuario diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 93866b79f2..496f1ca165 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -75,10 +75,10 @@ onBeforeMount(async () => { - + @@ -86,12 +86,12 @@ onBeforeMount(async () => { Date: Tue, 19 Nov 2024 11:58:16 +0100 Subject: [PATCH 05/10] fix(Supplier): change isSerious to isReal --- src/i18n/locale/en.yml | 2 +- src/i18n/locale/es.yml | 2 +- src/pages/Supplier/Card/SupplierBasicData.vue | 4 ++-- src/pages/Supplier/Card/SupplierDescriptor.vue | 4 ++-- src/pages/Supplier/Card/SupplierSummary.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index aa8df17e2c..0701255407 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -940,7 +940,7 @@ supplier: basicData: alias: Alias workerFk: Responsible - isSerious: Verified + isReal: Verified isActive: Active isPayMethodChecked: PayMethod checked note: Notes diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 575e2c6c72..54728c5b69 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -938,7 +938,7 @@ supplier: basicData: alias: Alias workerFk: Responsable - isSerious: Verificado + isReal: Verificado isActive: Activo isPayMethodChecked: Método de pago validado note: Notas diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue index 52964557db..c1a107d3a4 100644 --- a/src/pages/Supplier/Card/SupplierBasicData.vue +++ b/src/pages/Supplier/Card/SupplierBasicData.vue @@ -61,8 +61,8 @@ const workersOptions = ref([]); { {{ t('Inactive supplier') }} `#/supplier/${entityId.value}/${section}`; Date: Tue, 19 Nov 2024 14:14:50 +0100 Subject: [PATCH 06/10] fix: worker test e2e --- src/pages/Worker/WorkerList.vue | 2 +- test/cypress/support/commands.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue index 022cecdc6c..71df273c15 100644 --- a/src/pages/Worker/WorkerList.vue +++ b/src/pages/Worker/WorkerList.vue @@ -306,7 +306,7 @@ async function autofillBic(worker) { { case 'select': cy.wrap(el).type(val); cy.get('.q-menu .q-item').contains(val).click(); - cy.get('body').click(); break; case 'date': cy.wrap(el).type(val.split('-').join('')); From 8714980595e0cfa62e24b7a38f0553ad5c2290fa Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 14:28:43 +0100 Subject: [PATCH 07/10] fix(VnSelect): setOptions when applyFilter --- src/components/common/VnSelect.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 227ff9465e..f24f054a5f 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -202,7 +202,10 @@ async function fetchFilter(val) { if (fields) fetchOptions.fields = fields; if (sortBy) fetchOptions.order = sortBy; arrayData.reset(['skip', 'filter.skip', 'page']); - return (await arrayData.applyFilter({ filter: fetchOptions }))?.data; + + const { data } = await arrayData.applyFilter({ filter: fetchOptions }); + setOptions(data); + return data; } async function filterHandler(val, update) { From 5f7fd91272c4a870de82ef8c42ef50166d7ad1e7 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 14:41:07 +0100 Subject: [PATCH 08/10] feat: add /reports in gitignore --- test/cypress/.gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cypress/.gitignore b/test/cypress/.gitignore index 3f91dd4655..8d940320ee 100644 --- a/test/cypress/.gitignore +++ b/test/cypress/.gitignore @@ -1,2 +1,2 @@ -videos/* -screenshots/* \ No newline at end of file +reports/* +screenshots/* From e54eb50265741bfd5e424e59c626df201d9dd1e3 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 19 Nov 2024 15:35:57 +0100 Subject: [PATCH 09/10] fix: refs #8166 show zone error --- src/pages/Ticket/TicketAdvance.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index 8de602b374..c247a20bc4 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -213,10 +213,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => { warehouseFk: ticket.futureWarehouseFk, }); - if (!newLanded) { - notify(t('advanceTickets.noDeliveryZone'), 'negative'); - return; - } + if (!newLanded) throw new Error(t('advanceTickets.noDeliveryZone')); ticket.landed = newLanded.landed; ticket.zoneFk = newLanded.zoneFk; @@ -299,10 +296,10 @@ const splitTickets = async () => { const { query, params } = await requestComponentUpdate(ticket, true); await axios.post(query, params); progressAdd(ticket.futureId); - } catch (error) { + } catch (e) { splitErrors.value.push({ id: ticket.futureId, - reason: error.response?.data?.error?.message, + reason: e.message || e.response?.data?.error?.message, }); progressAdd(ticket.futureId); } From 73b7fa7704eff4dbd3b95bca8d37294eafb19efc Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 19 Nov 2024 15:43:55 +0100 Subject: [PATCH 10/10] feat: refs #8166 show notification --- src/pages/Ticket/TicketAdvance.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index c247a20bc4..71e3926aca 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -213,7 +213,10 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => { warehouseFk: ticket.futureWarehouseFk, }); - if (!newLanded) throw new Error(t('advanceTickets.noDeliveryZone')); + if (!newLanded) { + notify(t('advanceTickets.noDeliveryZone'), 'negative'); + throw new Error(t('advanceTickets.noDeliveryZone')); + } ticket.landed = newLanded.landed; ticket.zoneFk = newLanded.zoneFk;