From e558a19350bd2369bfc68c9065d8924269f7b9af Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 31 Oct 2024 13:40:12 +0700 Subject: [PATCH] refactor: add quotation payload --- src/stores/quotations/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index 0de9adcf..97d6cbb2 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -73,6 +73,7 @@ export const useQuotationStore = defineStore('quotation-store', () => { const res = await api.post('/quotation', { ...payload, paySplit: data.paySplit.map((v) => ({ + name: v.name, amount: v.amount, })), productServiceList: data.productServiceList.map((v) => ({ @@ -108,6 +109,7 @@ export const useQuotationStore = defineStore('quotation-store', () => { const res = await api.put(`/quotation/${data.id}`, { ...payload, paySplit: data.paySplit.map((v) => ({ + name: v.name, amount: v.amount, })), productServiceList: payload.productServiceList.map((v) => ({ @@ -119,6 +121,7 @@ export const useQuotationStore = defineStore('quotation-store', () => { workId: v.work?.id, serviceId: v.service?.id, workerIndex: v.workerIndex, + installmentNo: v.installmentNo, })), id: undefined, });