refactor: quotation type & customer branch fetch by register branch id

This commit is contained in:
puriphatt 2024-10-03 09:43:32 +07:00
parent e581556e78
commit 284028aff0
3 changed files with 19 additions and 33 deletions

View file

@ -10,23 +10,15 @@ export const useQuotationForm = defineStore('form-quotation', () => {
const quotationStore = useQuotationStore();
const defaultFormData: QuotationPayload = {
service: [
productServiceList: [
{
work: [
{
product: [
{
vat: 0,
discount: 1,
amount: 0,
id: '',
},
],
excluded: false,
id: '',
},
],
id: '',
vat: 0,
pricePerUnit: 0,
discount: 0,
amount: 0,
productId: '',
workId: '',
serviceId: '',
},
],
urgent: false,
@ -45,7 +37,7 @@ export const useQuotationForm = defineStore('form-quotation', () => {
actorName: '',
status: 'CREATED',
};
let resetFormData = structuredClone(defaultFormData);
const resetFormData = structuredClone(defaultFormData);
const currentFormData = ref<QuotationPayload>(structuredClone(resetFormData));