diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue index 4bd17124f..34eb14601 100644 --- a/src/components/common/VnSection.vue +++ b/src/components/common/VnSection.vue @@ -40,10 +40,6 @@ const $props = defineProps({ type: Boolean, default: true, }, - keepData: { - type: Boolean, - default: true, - }, }); const route = useRoute(); @@ -61,7 +57,6 @@ onBeforeMount(() => { if ($props.dataKey) arrayData = useArrayData($props.dataKey, { searchUrl: 'table', - keepData: $props.keepData, ...$props.arrayDataProps, navigate: $props.redirect, }); diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 7facb7916..8fbfb067f 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -115,7 +115,7 @@ onMounted(async () => { }); onBeforeUnmount(() => { - if (!store.keepData) arrayData.reset(['data']); + arrayData.reset(['data']); arrayData.resetPagination(); }); diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 363580148..a17730754 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -56,7 +56,6 @@ export function useArrayData(key, userOptions) { 'searchUrl', 'navigate', 'mapKey', - 'keepData', 'oneRecord', ]; if (typeof userOptions === 'object') { @@ -108,7 +107,7 @@ export function useArrayData(key, userOptions) { store.hasMoreData = limit && response.data.length >= limit; if (!append && !isDialogOpened() && updateRouter) { - if (updateStateParams(response.data)?.redirect && !store.keepData) return; + if (updateStateParams(response.data)?.redirect) return; } store.isLoading = false; canceller = null; diff --git a/src/pages/Supplier/Card/SupplierDescriptor.vue b/src/pages/Supplier/Card/SupplierDescriptor.vue index 2863784ab..2511edf11 100644 --- a/src/pages/Supplier/Card/SupplierDescriptor.vue +++ b/src/pages/Supplier/Card/SupplierDescriptor.vue @@ -106,7 +106,7 @@ const getEntryQueryParams = (supplier) => { (data.value = useCardDescription(entity.ref, entity. :to="{ name: 'TravelList', query: { - params: JSON.stringify({ + table: JSON.stringify({ agencyModeFk: entity.agencyModeFk, }), }, diff --git a/src/stores/useArrayDataStore.js b/src/stores/useArrayDataStore.js index b3996d1e3..569ff1c7e 100644 --- a/src/stores/useArrayDataStore.js +++ b/src/stores/useArrayDataStore.js @@ -18,7 +18,6 @@ export const useArrayDataStore = defineStore('arrayDataStore', () => { navigate: null, page: 1, mapKey: 'id', - keepData: false, oneRecord: false, };