From 5e96ed3bd3497f47d68a345a60308360cb290ba0 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 10 Jun 2024 14:03:57 +0200 Subject: [PATCH] fix: refs #6273 fix arrayData changed --- src/pages/InvoiceIn/Card/InvoiceInBasicData.vue | 3 ++- src/pages/InvoiceIn/Card/InvoiceInCorrective.vue | 2 +- src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue | 6 +++--- src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue | 3 ++- src/pages/InvoiceIn/Card/InvoiceInSummary.vue | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue index 8dfb96eba..ede9af825 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue @@ -19,7 +19,8 @@ const { t } = useI18n(); const dms = ref({}); const route = useRoute(); const editDownloadDisabled = ref(false); -const invoiceIn = computed(() => useArrayData().store.data); +const arrayData = useArrayData(); +const invoiceIn = computed(() => arrayData.store.data); const userConfig = ref(null); const invoiceId = computed(() => +route.params.id); diff --git a/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue b/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue index dc62440c8..7735747f9 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue @@ -12,7 +12,7 @@ const { push, currentRoute } = useRouter(); const { t } = useI18n(); const invoiceId = +currentRoute.value.params.id; -const arrayData = useArrayData(currentRoute.value.meta.moduleName); +const arrayData = useArrayData(); const invoiceIn = computed(() => arrayData.store.data); const invoiceInCorrectionRef = ref(); const filter = { diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index c435bf368..68dc5be4b 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -27,9 +27,9 @@ const quasar = useQuasar(); const { hasAny } = useRole(); const { t } = useI18n(); const { openReport, sendEmail } = usePrintService(); -const { store } = useArrayData(currentRoute.value.meta.moduleName); +const arrayData = useArrayData(); -const invoiceIn = computed(() => store.data); +const invoiceIn = computed(() => arrayData.store.data); const cardDescriptorRef = ref(); const correctionDialogRef = ref(); const entityId = computed(() => $props.id || +currentRoute.value.params.id); @@ -184,7 +184,7 @@ async function toUnbook() { : t('isNotLinked', { bookEntry }); quasar.notify({ type, message }); - if (!isLinked) store.data.isBooked = false; + if (!isLinked) arrayData.store.data.isBooked = false; } async function deleteInvoice() { diff --git a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue index 67c197636..a7b9110f5 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue @@ -11,7 +11,8 @@ import { useArrayData } from 'src/composables/useArrayData'; const { t } = useI18n(); const route = useRoute(); -const currency = computed(() => useArrayData().store.data?.currency?.code); +const arrayData = useArrayData(); +const currency = computed(() => arrayData.store.data?.currency?.code); const invoceInIntrastat = ref([]); const rowsSelected = ref([]); const countries = ref([]); diff --git a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue index b7f8adf50..428e7a7a1 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInSummary.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInSummary.vue @@ -14,9 +14,10 @@ import VnTitle from 'src/components/common/VnTitle.vue'; const props = defineProps({ id: { type: [Number, String], default: 0 } }); const { t } = useI18n(); const route = useRoute(); +const arrayData = useArrayData(); const entityId = computed(() => props.id || +route.params.id); -const invoiceIn = computed(() => useArrayData().store.data); +const invoiceIn = computed(() => arrayData.store.data); const currency = computed(() => invoiceIn.value?.currency?.code); const invoiceInUrl = ref(); const amountsNotMatch = ref(null);