From e7b431e9ec2c9745fb9b980d039d8f721093498c Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 09:32:35 +0100 Subject: [PATCH 1/8] 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 b058dc642..04a843889 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 815c7d519..628af681a 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 1b9791529..08cf248ba 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 2/8] 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 908157610..da6c89cbb 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 04a843889..b058dc642 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 3/8] 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 ae7007c32..531b3bc14 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 4/8] 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 eb0978ddd..9bfa43c49 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 93866b79f..496f1ca16 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 5/8] 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 aa8df17e2..070125540 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 575e2c6c7..54728c5b6 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 52964557d..c1a107d3a 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 6/8] 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 022cecdc6..71df273c1 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 7/8] 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 227ff9465..f24f054a5 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 8/8] 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 3f91dd465..8d940320e 100644 --- a/test/cypress/.gitignore +++ b/test/cypress/.gitignore @@ -1,2 +1,2 @@ -videos/* -screenshots/* \ No newline at end of file +reports/* +screenshots/*