feat: uncomment submit

This commit is contained in:
Methapon Metanipat 2024-10-03 14:57:46 +07:00
parent 84f5a06874
commit 74e5c6e78b

View file

@ -81,13 +81,13 @@ export const useQuotationForm = defineStore('form-quotation', () => {
async function submitQuotation() {
if (currentFormState.value.mode === 'create') {
// await quotationStore.createQuotation();
await quotationStore.createQuotation(currentFormData.value);
}
if (currentFormState.value.mode === 'edit' && currentFormData.value.id) {
// await quotationStore.editQuotation({
// id: currentFormData.value.id,
// ...currentFormData.value,
// });
await quotationStore.editQuotation({
id: currentFormData.value.id,
...currentFormData.value,
});
}
currentFormState.value.mode = 'info';