refactor: add installmentNo

This commit is contained in:
Thanaphon Frappet 2024-10-29 18:00:59 +07:00
parent faab828eb9
commit 1f4edc7363

View file

@ -80,6 +80,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
productId: v.product.id, productId: v.product.id,
workId: v.work?.id, workId: v.work?.id,
serviceId: v.service?.id, serviceId: v.service?.id,
installmentNo: v.installmentNo,
workerIndex: v.workerIndex, workerIndex: v.workerIndex,
})), })),
}); });
@ -148,7 +149,8 @@ export const useQuotationStore = defineStore('quotation-store', () => {
export const useQuotationPayment = defineStore('quotation-payment', () => { export const useQuotationPayment = defineStore('quotation-payment', () => {
async function getQuotationPayment(quotationId: string) { async function getQuotationPayment(quotationId: string) {
const res = await api.get<PaginationResult<QuotationPaymentData>>( const res = await api.get<PaginationResult<QuotationPaymentData>>(
`/payment/${quotationId}`, `/payment`,
{ params: { quotationId } },
); );
if (res.status < 400) { if (res.status < 400) {
return res.data; return res.data;