From 6d77c1a19d77b54f6084b4e86f03438c19350d4c Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 1 Nov 2024 14:31:10 +0700 Subject: [PATCH] feat: detect accept status in payload --- src/stores/quotations/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index 97d6cbb2..224a4176 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -108,6 +108,8 @@ export const useQuotationStore = defineStore('quotation-store', () => { const { _count, ...payload } = data; const res = await api.put(`/quotation/${data.id}`, { ...payload, + quotationStatus: + payload.quotationStatus !== 'Accepted' ? undefined : 'Accepted', paySplit: data.paySplit.map((v) => ({ name: v.name, amount: v.amount,