From 017f757de23e0107ceb5ec60f4b9ecd0775ae333 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 3 Oct 2024 14:33:10 +0700 Subject: [PATCH] refactor: type quotation --- src/stores/quotations/types.ts | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/stores/quotations/types.ts b/src/stores/quotations/types.ts index 51c5ae0d..0fb744d0 100644 --- a/src/stores/quotations/types.ts +++ b/src/stores/quotations/types.ts @@ -154,26 +154,6 @@ type ServiceRelation = { export type Quotation = { _count: { worker: number }; - customerBranch: CustomerBranchRelation; - - worker: { - id: string; - quotationId: string; - employeeId: string; - code: string; - no: number; - }[]; - - productServiceList: { - vat: number; - pricePerUnit: number; - discount: number; - amount: number; - productId: string; - workId: string; - serviceId: string; - }[]; - id: string; finalPrice: number; vat: number; @@ -200,6 +180,7 @@ export type Quotation = { status: Status; customerBranchId: string; + customerBranch: CustomerBranchRelation; createdByUserId: string; createdAt: string | Date; @@ -273,7 +254,7 @@ export type QuotationPayload = { customerBranchId: string; urgent: boolean; worker: EmployeeWorker[]; - workerCount: 0; + workerCount: number; payBillDate?: Date | null; paySplit: { no: number; date: string | Date; amount: number }[]; paySplitCount?: number | null; // int