From ad2e50201056aee0da063e4aa2a643468d8df44e Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 20 Jan 2025 08:44:48 +0100 Subject: [PATCH] fix: move dialog to descriptorMenu --- .../InvoiceIn/Card/InvoiceInDescriptor.vue | 83 ++----------------- .../Card/InvoiceInDescriptorMenu.vue | 77 ++++++++++++++++- 2 files changed, 81 insertions(+), 79 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue index 4d9e180eb..ae00e154b 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInDescriptor.vue @@ -7,17 +7,14 @@ import { toCurrency, toDate } from 'src/filters'; import VnLv from 'src/components/ui/VnLv.vue'; import CardDescriptor from 'components/ui/CardDescriptor.vue'; import FetchData from 'src/components/FetchData.vue'; -import VnSelect from 'src/components/common/VnSelect.vue'; -import { useCapitalize } from 'src/composables/useCapitalize'; import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; import InvoiceInDescriptorMenu from './InvoiceInDescriptorMenu.vue'; const $props = defineProps({ id: { type: Number, default: null } }); -const { push, currentRoute } = useRouter(); +const { currentRoute } = useRouter(); const { t } = useI18n(); const cardDescriptorRef = ref(); -const correctionDialogRef = ref(); const entityId = computed(() => $props.id || +currentRoute.value.params.id); const totalAmount = ref(); const config = ref(); @@ -85,12 +82,6 @@ const routes = reactive({ return { name: 'EntryCard', params: { id } }; }, }); -const correctionFormData = reactive({ - invoiceReason: 2, - invoiceType: 2, - invoiceClass: 6, -}); -const isNotFilled = computed(() => Object.values(correctionFormData).includes(null)); onBeforeMount(async () => { await setInvoiceCorrection(entityId.value); @@ -122,14 +113,6 @@ async function setInvoiceCorrection(id) { (corrected) => corrected.correctingFk ); } - -const createInvoiceInCorrection = async () => { - const { data: correctingId } = await axios.post( - 'InvoiceIns/corrective', - Object.assign(correctionFormData, { id: entityId.value }) - ); - push({ path: `/invoice-in/${correctingId}/summary` }); -};