diff --git a/CHANGELOG.md b/CHANGELOG.md index 43bd6da777..e34523545c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2420.01] + ## [2418.01] ## [2416.01] - 2024-04-18 diff --git a/package.json b/package.json index 8398eb3f3f..063cf6de4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.18.0", + "version": "24.20.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue index f70146c58b..e3cb2874ae 100644 --- a/src/components/common/VnDmsList.vue +++ b/src/components/common/VnDmsList.vue @@ -187,7 +187,7 @@ const columns = computed(() => [ downloadFile( prop.row.id, $props.downloadModel, - null, + undefined, prop.row.download ), }, diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index aeabcb96d8..b0cdd0e15b 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -32,7 +32,7 @@ async function insert() { diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 998ee05769..490186e773 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -9,12 +9,9 @@ const arrayDataStore = useArrayDataStore(); export function useArrayData(key, userOptions) { if (!key) throw new Error('ArrayData: A key is required to use this composable'); - if (!arrayDataStore.get(key)) { - arrayDataStore.set(key); - } + if (!arrayDataStore.get(key)) arrayDataStore.set(key); const store = arrayDataStore.get(key); - const hasMoreData = ref(false); const route = useRoute(); let canceller = null; @@ -22,6 +19,7 @@ export function useArrayData(key, userOptions) { onMounted(() => { setOptions(); + store.skip = 0; const query = route.query; if (query.params) { @@ -29,9 +27,7 @@ export function useArrayData(key, userOptions) { } }); - if (key && userOptions) { - setOptions(); - } + if (key && userOptions) setOptions(); function setOptions() { const allowedOptions = [ @@ -96,8 +92,7 @@ export function useArrayData(key, userOptions) { }); const { limit } = filter; - hasMoreData.value = limit && response.data.length >= limit; - store.hasMoreData = hasMoreData.value; + store.hasMoreData = limit && response.data.length >= limit; if (append) { if (!store.data) store.data = []; @@ -169,7 +164,7 @@ export function useArrayData(key, userOptions) { } async function loadMore() { - if (!hasMoreData.value && !store.hasMoreData) return; + if (!store.hasMoreData) return; store.skip = store.limit * page.value; page.value += 1; @@ -211,7 +206,6 @@ export function useArrayData(key, userOptions) { destroy, loadMore, store, - hasMoreData, totalRows, updateStateParams, isLoading, diff --git a/src/pages/Claim/Card/ClaimNotes.vue b/src/pages/Claim/Card/ClaimNotes.vue index 008b7e4d94..8aa6e1d625 100644 --- a/src/pages/Claim/Card/ClaimNotes.vue +++ b/src/pages/Claim/Card/ClaimNotes.vue @@ -16,7 +16,7 @@ const claimId = computed(() => $props.id || route.params.id); const claimFilter = { where: { claimFk: claimId.value }, - fields: ['created', 'workerFk', 'text'], + fields: ['id', 'created', 'workerFk', 'text'], include: { relation: 'worker', scope: { diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue index 33d235a5f7..8011741ef0 100644 --- a/src/pages/Supplier/Card/SupplierConsumption.vue +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -1,6 +1,6 @@