From 248416b6763916d80c6990003076312f42764388 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 17 Apr 2024 08:41:47 +0200 Subject: [PATCH 1/4] fix(lilium) #7180 SupplierList Scroll --- src/components/ui/VnPaginate.vue | 13 ++++++++++--- src/composables/useArrayData.js | 11 +++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index b259bf8be..3328dc437 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -83,7 +83,12 @@ const store = arrayData.store; onMounted(() => { if (props.autoLoad) fetch(); }); - +// watch( +// () => arrayData, +// () => { +// console.error(this); +// } +// ); watch( () => props.data, () => { @@ -127,7 +132,7 @@ async function paginate() { } function endPagination() { - hasMoreData.value = arrayData.hasMoreData.value; + // hasMoreData.value = store.hasMoreData.value; isLoading.value = false; emit('onFetch', store.data); emit('onPaginate'); @@ -183,11 +188,13 @@ defineExpose({ fetch, addFilter }); + diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 093806567..c3d969f55 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -20,6 +20,13 @@ export function useArrayData(key, userOptions) { const page = ref(1); + // watch( + // () => store.hasMoreData, + // () => { + // hasMoreData.value = store.hasMoreData; + // arrayDataStore.$state.console.error(this); + // } + // ); onMounted(() => { setOptions(); @@ -98,7 +105,7 @@ export function useArrayData(key, userOptions) { const { limit } = filter; hasMoreData.value = response.data.length >= limit; - + store.hasMoreData = hasMoreData.value; if (append) { if (!store.data) store.data = []; for (const row of response.data) store.data.push(row); @@ -169,7 +176,7 @@ export function useArrayData(key, userOptions) { } async function loadMore() { - if (!hasMoreData.value) return; + if (!hasMoreData.value && !store.hasMoreData) return; store.skip = store.limit * page.value; page.value += 1; From 846c85ed1a3a4a7634eeefa01d8c60e45c7a03d5 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 18 Apr 2024 09:36:24 +0000 Subject: [PATCH 2/4] Actualizar src/components/ui/VnPaginate.vue --- src/components/ui/VnPaginate.vue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 3328dc437..f516f473d 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -83,12 +83,7 @@ const store = arrayData.store; onMounted(() => { if (props.autoLoad) fetch(); }); -// watch( -// () => arrayData, -// () => { -// console.error(this); -// } -// ); + watch( () => props.data, () => { @@ -132,7 +127,6 @@ async function paginate() { } function endPagination() { - // hasMoreData.value = store.hasMoreData.value; isLoading.value = false; emit('onFetch', store.data); emit('onPaginate'); @@ -188,8 +182,7 @@ defineExpose({ fetch, addFilter }); - + Date: Thu, 18 Apr 2024 09:37:01 +0000 Subject: [PATCH 3/4] Actualizar src/composables/useArrayData.js --- src/composables/useArrayData.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index c3d969f55..a87ccbb96 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -20,13 +20,6 @@ export function useArrayData(key, userOptions) { const page = ref(1); - // watch( - // () => store.hasMoreData, - // () => { - // hasMoreData.value = store.hasMoreData; - // arrayDataStore.$state.console.error(this); - // } - // ); onMounted(() => { setOptions(); From c60558420f291ca4ac225faab9de7f583d518b84 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 18 Apr 2024 12:38:43 +0200 Subject: [PATCH 4/4] fix: refs #6425 fixed vitest config to avoid testing problems --- src/pages/Customer/locale/en.yml | 4 ++-- src/pages/Customer/locale/es.yml | 4 ++-- src/pages/Entry/locale/en.yml | 8 ++++---- src/pages/Entry/locale/es.yml | 8 ++++---- src/pages/Travel/locale/en.yml | 8 ++++---- src/pages/Travel/locale/es.yml | 8 ++++---- vitest.config.js | 5 ++++- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/pages/Customer/locale/en.yml b/src/pages/Customer/locale/en.yml index 67bfa6622..6eb7cfa85 100644 --- a/src/pages/Customer/locale/en.yml +++ b/src/pages/Customer/locale/en.yml @@ -1,4 +1,4 @@ customerFilter: filter: - name: 'Name' - socialName: 'Social name' + name: Name + socialName: Social name diff --git a/src/pages/Customer/locale/es.yml b/src/pages/Customer/locale/es.yml index ec1981257..8fed37092 100644 --- a/src/pages/Customer/locale/es.yml +++ b/src/pages/Customer/locale/es.yml @@ -1,4 +1,4 @@ customerFilter: filter: - name: 'Nombre' - socialName: 'Razón Social' + name: Nombre + socialName: Razón Social diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index d52989ff9..1956140ed 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -1,8 +1,8 @@ entryList: list: - inventoryEntry: 'Inventory entry' - virtualEntry: 'Virtual entry' + inventoryEntry: Inventory entry + virtualEntry: Virtual entry entryFilter: filter: - search: 'General search' - reference: 'Reference' + search: General search + reference: Reference diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 2dc1dfb3a..192d03542 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -1,8 +1,8 @@ entryList: list: - inventoryEntry: 'Es inventario' - virtualEntry: 'Es una redada' + inventoryEntry: Es inventario + virtualEntry: Es una redada entryFilter: filter: - search: 'Búsqueda general' - reference: 'Referencia' + search: Búsqueda general + reference: Referencia diff --git a/src/pages/Travel/locale/en.yml b/src/pages/Travel/locale/en.yml index 05ac98513..c67eddce0 100644 --- a/src/pages/Travel/locale/en.yml +++ b/src/pages/Travel/locale/en.yml @@ -1,6 +1,6 @@ travelFilter: filter: - warehouseOutFk: 'Warehouse Out' - warehouseInFk: 'Warehouse In' - agencyModeFk: 'Agency' - scopeDays: 'Days onward' + warehouseOutFk: Warehouse Out + warehouseInFk: Warehouse In + agencyModeFk: Agency + scopeDays: Days onward diff --git a/src/pages/Travel/locale/es.yml b/src/pages/Travel/locale/es.yml index 4fbed920b..8e958c074 100644 --- a/src/pages/Travel/locale/es.yml +++ b/src/pages/Travel/locale/es.yml @@ -1,6 +1,6 @@ travelFilter: filter: - warehouseInFk: 'Alm. entrada' - warehouseOutFk: 'Alm. salida' - agencyModeFk: 'Agencia' - scopeDays: 'Días adelante' + warehouseInFk: Alm. entrada + warehouseOutFk: Alm. salida + agencyModeFk: Agencia + scopeDays: Días adelante diff --git a/vitest.config.js b/vitest.config.js index 748bbfe0a..ca9f6c1fe 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -27,7 +27,10 @@ export default defineConfig({ sassVariables: 'src/quasar-variables.scss', }), VueI18nPlugin({ - include: path.resolve(__dirname, 'src/i18n/**'), + include: [ + path.resolve(__dirname, 'src/i18n/**'), + path.resolve(__dirname, 'src/pages/**/locale/**'), + ], }), jsconfigPaths(), ],