From d39f9cd54df749003d32b32f5b1562be1f133698 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:44:27 +0700 Subject: [PATCH] chore: format --- src/pages/03_customer-management/form.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index f810be0e..a551d23e 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -359,18 +359,17 @@ export const useCustomerBranchForm = defineStore('form-customer-branch', () => { } if (!currentFormData.value.id) { - const res = await customerStore.createBranch({ + const res = await customerStore.createBranch({ ...currentFormData.value, customerId: state.value.currentCustomerId, }); - if(res) return res - + if (res) return res; } else { - const res = await customerStore.editBranchById(currentFormData.value.id, { + const res = await customerStore.editBranchById(currentFormData.value.id, { ...currentFormData.value, id: undefined, }); - if(res) return res + if (res) return res; } }