diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index d4b5b5ff..9bf07aba 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -31,6 +31,7 @@ import { deleteItem } from 'stores/utils'; import { runOcr, parseResultMRZ } from 'src/utils/ocr'; // NOTE Import Types +import { View } from './types.ts'; import { QuotationPayload } from 'src/stores/quotations/types'; import { EmployeeWorker } from 'src/stores/quotations/types'; import { Employee } from 'src/stores/employee/types'; @@ -964,7 +965,6 @@ function storeDataLocal() { productServiceList: productService.value, }, meta: { - viewMod: view.value, source: { ...quotationFormState.value.source, code: @@ -987,14 +987,11 @@ function storeDataLocal() { }), ); - const documentTypes: Record = { - 3: 'invoice', - 4: 'payment', - 7: 'receipt', - }; - const documentType = documentTypes[view.value] || ''; + const url = new URL('/quotation/document-view', window.location.origin); - window.open(`/quotation/document-view?type=${documentType}`, '_blank'); + url.searchParams.append('type', view.value); + + window.open(url, '_blank'); } const QUOTATION_STATUS = [ 'Issued', @@ -1031,17 +1028,6 @@ const statusQuotationForm = ref< }[] >([]); -enum View { - Quotation, - Accepted, - InvoicePre, - Invoice, - PaymentPre, - Payment, - Receipt, - Complete, -} - const view = ref(View.Quotation); const code = ref(''); @@ -1686,9 +1672,6 @@ async function getInvoiceCodeFullPay() { :option="templateFormOption" :label="$t('quotation.templateForm')" :option-label="locale === 'eng' ? 'labelEN' : 'label'" - @filter=" - (val: string, update) => filter(val, update, 'branch') - " />