From 14ab67ccfef720443d766a50f9a41e6283794d06 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Wed, 30 Oct 2024 10:41:09 +0700 Subject: [PATCH] fix: typos --- src/pages/05_quotation/form.ts | 2 +- src/stores/payment/index.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/05_quotation/form.ts b/src/pages/05_quotation/form.ts index 54fa5f71..fa0f7e53 100644 --- a/src/pages/05_quotation/form.ts +++ b/src/pages/05_quotation/form.ts @@ -262,7 +262,7 @@ export const useQuotationForm = defineStore('form-quotation', () => { let status = false; if (invoicePayload.value.id === undefined) { - const res = await invoiceStore.creatInvoice(invoicePayload.value); + const res = await invoiceStore.createInvoice(invoicePayload.value); if (res) status = true; } diff --git a/src/stores/payment/index.ts b/src/stores/payment/index.ts index 7dc60ce4..ff649e3c 100644 --- a/src/stores/payment/index.ts +++ b/src/stores/payment/index.ts @@ -43,8 +43,9 @@ export const useInvoice = defineStore('invoice-store', () => { page?: number; pageSize?: number; query?: string; + quotationId?: string; }) { - const res = await api.get>('/workflow-template', { + const res = await api.get>('/invoice', { params, }); @@ -53,7 +54,7 @@ export const useInvoice = defineStore('invoice-store', () => { return res.data; } - async function creatInvoice(data: InvoicePayload) { + async function createInvoice(data: InvoicePayload) { const res = await api.post('/invoice', data); if (res.status >= 400) return null; return res; @@ -82,7 +83,7 @@ export const useInvoice = defineStore('invoice-store', () => { getInvoice, getInvoiceList, - creatInvoice, + createInvoice, editInvoice, deleteInvoice, };