fix: error types
This commit is contained in:
parent
b0800c7b05
commit
4e21ded2db
2 changed files with 8 additions and 0 deletions
|
|
@ -69,6 +69,13 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
if (!data) return; // NOTE: Error should be handled globally by axios instance
|
||||
|
||||
resetFormData = Object.assign(data, {
|
||||
productServiceList: data.productServiceList.map((v) => ({
|
||||
...v,
|
||||
worker: undefined,
|
||||
workerIndex: v.worker.map((a) =>
|
||||
data.worker.findIndex((b) => b.employeeId === a.id),
|
||||
),
|
||||
})),
|
||||
dueDate: new Date(data.dueDate),
|
||||
payBillDate: data.payBillDate ? new Date(data.payBillDate) : undefined,
|
||||
worker: data.worker.map((v) =>
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ export type QuotationFull = {
|
|||
work: WorkRelation | null;
|
||||
serviceId: string | null;
|
||||
service: ServiceRelation | null;
|
||||
worker: EmployeeRelation[];
|
||||
}[];
|
||||
|
||||
id: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue