diff --git a/src/pages/05_quotation/form.ts b/src/pages/05_quotation/form.ts index 92809a2c..be8d806d 100644 --- a/src/pages/05_quotation/form.ts +++ b/src/pages/05_quotation/form.ts @@ -234,6 +234,13 @@ export const useQuotationForm = defineStore('form-quotation', () => { cancel: () => {}, }); } + async function accepted(id: string) { + const res = await quotationStore.changeStatus(id, 'Accepted'); + if (res) { + return true; + } + return false; + } return { DEFAULT_DATA, @@ -249,6 +256,8 @@ export const useQuotationForm = defineStore('form-quotation', () => { dialogDelete, resetForm, + accepted, + submitQuotation, }; });