From e951894ac391d2a4a93737b75c25672ab64ba037 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 1 Jul 2024 08:43:15 -0300 Subject: [PATCH 01/21] Fixes --- src/pages/Monitor/SalesClientsTable.vue | 49 ++++++++++++++++--------- src/pages/Monitor/SalesOrdersTable.vue | 5 +-- src/pages/Monitor/SalesTicketsTable.vue | 26 +++++++++---- 3 files changed, 52 insertions(+), 28 deletions(-) diff --git a/src/pages/Monitor/SalesClientsTable.vue b/src/pages/Monitor/SalesClientsTable.vue index 3f2389471..91325986c 100644 --- a/src/pages/Monitor/SalesClientsTable.vue +++ b/src/pages/Monitor/SalesClientsTable.vue @@ -17,6 +17,7 @@ const { t } = useI18n(); const paginateRef = ref(null); const workersActiveOptions = ref([]); const clientsOptions = ref([]); +const showHeaderFilters = ref(true); const from = ref(Date.vnNew()); const to = ref(Date.vnNew()); @@ -37,9 +38,11 @@ const filter = reactive({ }, }); +const refetch = async () => await paginateRef.value.fetch(); + watch(dateRange, (val) => { filter.where['v.stamp'].between = val; - paginateRef.value.fetch(); + refetch(); }); function exprBuilder(param, value) { @@ -166,23 +169,35 @@ const columns = computed(() => [ :no-data-label="t('globals.noResults')" > - - + + es: + Open date: Abrir fecha + From 39bf7e55c08560a122a639643139e25af695c1c8 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 15 Jul 2024 13:11:24 +0200 Subject: [PATCH 13/21] fix: e2e --- test/cypress/support/commands.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 38a23f71c..8708ac064 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -103,7 +103,9 @@ Cypress.Commands.add('fillInForm', (obj, form = '.q-form > .q-card') => { cy.get('.q-menu .q-item').contains(val).click(); break; case 'date': - cy.wrap(el).click(); + cy.get( + '[label="Birth"] > .q-field > .q-field__inner > .q-field__control > .q-field__append > .q-icon' + ).click(); cy.get(days) .eq(day ? day - 1 : 0) .click(); From b488a013c77377576733f70a6da5daa56bd62e40 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 15 Jul 2024 14:55:06 +0200 Subject: [PATCH 14/21] fix(arrayData): reset --- src/composables/useArrayData.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 8567a0409..50d620a34 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -18,7 +18,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { onMounted(() => { setOptions(); - arrayDataStore.reset(['skip']); + reset(['skip']); const query = route.query; const searchUrl = store.searchUrl; @@ -74,9 +74,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { }; let exprFilter; - let userParams = { ...store.userParams }; - if (store?.exprBuilder) { const where = buildFilter(userParams, (param, value) => { const res = store.exprBuilder(param, value); @@ -159,11 +157,10 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { if (filter) store.filter = filter; let userParams = { ...store.userParams, ...params }; - userParams = sanitizerParams(userParams, store?.exprBuilder); store.userParams = userParams; - arrayDataStore.reset(['skip', 'filter.skip', 'page']); + reset(['skip', 'filter.skip', 'page']); await fetch({}); return { filter, params }; @@ -190,6 +187,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } store.order = order; + reset(['skip', 'filter.skip', 'page']); fetch({}); index++; From e66fe0104a51c07cd2893815d7f3a6b99f936513 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 16 Jul 2024 09:18:23 +0200 Subject: [PATCH 15/21] build: init version 24.32 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71d80d401..0a66ddb4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.30.1", + "version": "24.32.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", From 493081254d38af44ad12021d3dcca53e3e0ccfd8 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 16 Jul 2024 10:11:27 +0200 Subject: [PATCH 16/21] feat: improve to set time --- src/components/common/VnInputDate.vue | 4 ++-- src/components/common/VnInputTime.vue | 26 +++++++++++++++++++++++--- src/pages/Order/OrderLines.vue | 2 -- src/pages/Order/OrderList.vue | 1 - 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index d8f41349a..6e57a8a53 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -54,8 +54,8 @@ const formattedDate = computed({ ); } } - let ymd = value.split('-').map((e) => parseInt(e)); - newDate = new Date(ymd[0], ymd[1] - 1, ymd[2]); + const [year, month, day] = value.split('-').map((e) => parseInt(e)); + newDate = new Date(year, month - 1, day); if (model.value) { const orgDate = model.value instanceof Date ? model.value : new Date(model.value); diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index a6c7f1db5..0971facf9 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -1,5 +1,5 @@