refactor: create function accepted

This commit is contained in:
Thanaphon Frappet 2024-10-28 08:58:55 +07:00
parent ec230fe472
commit 536b4314f0

View file

@ -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,
};
});