From 26300a189f71ba13afbf03204cbed8818187d6fe Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:57:53 +0700 Subject: [PATCH] feat: close on save --- src/pages/03_customer-management/form.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index 9839a120..5464e944 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -161,7 +161,11 @@ export const useCustomerForm = defineStore('form-customer', () => { } async function submitForm() { - if (state.value.saveMode === 'customer') await submitFormCustomer(); + if (state.value.saveMode === 'customer') { + await submitFormCustomer().then(() => { + state.value.dialogModal = false; + }); + } } async function submitFormCustomer() {