From 5ddb142f3e41ba3025da70ad238057e0c2511cdc Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 18 Oct 2024 13:30:40 +0700 Subject: [PATCH] feat: detect edit mode --- src/pages/05_quotation/QuotationForm.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 45414cf6..aee23b3b 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -213,7 +213,11 @@ const productServiceList = ref< >([]); function closeTab() { - window.close(); + if (quotationFormState.value.mode === 'edit') { + quotationForm.resetForm(); + } else { + window.close(); + } } async function assignToProductServiceList() { @@ -902,7 +906,12 @@ function storeDataLocal() { {{ $t('general.view', { msg: $t('general.example') }) }}
- + +