From bb87a6b8c6361aff5f339412280bfdc573ac0e9f Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 28 Oct 2024 10:33:17 +0700 Subject: [PATCH] refactor: prepare for switch view --- src/pages/05_quotation/QuotationForm.vue | 551 ++++++++++++----------- 1 file changed, 296 insertions(+), 255 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 934c7c2e..affc1230 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -34,6 +34,7 @@ import { } from 'src/stores/product-service/types'; // NOTE: Import Components +import SwitchItem from 'components/shared/SwitchItem.vue'; import FormEmployeePassport from 'components/03_customer-management/FormEmployeePassport.vue'; import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa.vue'; import FormReferDocument from 'src/components/05_quotation/FormReferDocument.vue'; @@ -249,6 +250,7 @@ async function assignToProductServiceList() { productServiceList.value = quotationFormData.value.productServiceList.map( (v) => ({ + installmentNo: v.installmentNo || 0, workerIndex: v.workerIndex || [0], vat: v.vat || 0, pricePerUnit: v.pricePerUnit || 0, @@ -717,6 +719,17 @@ const statusQuotationForm = ref< status: 'waiting', }, ]); + +enum View { + Quotation, + Accepted, + InvoicePre, + Invoice, + ReceiptPre, + Receipt, +} + +const view = ref(View.Quotation);