From 26842a4c067164dc893af6f3b9c26d3573eaf08a Mon Sep 17 00:00:00 2001 From: Net Date: Tue, 20 Aug 2024 17:50:09 +0700 Subject: [PATCH] refactor: edit type --- src/stores/customer/types.ts | 38 ++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/stores/customer/types.ts b/src/stores/customer/types.ts index 9268e52d..8c034d19 100644 --- a/src/stores/customer/types.ts +++ b/src/stores/customer/types.ts @@ -9,15 +9,20 @@ export type Customer = { id: string; code: string; customerType: CustomerType; - customerName: string; - customerNameEN: string; status: Status; + + namePrefix: string; + firstName: string; + lastName: string; + firstNameEN: string; + lastNameEN: string; + gender: string; + birthDate: Date; + createdBy: string | null; createdAt: string; updatedBy: string | null; updatedAt: string; - taxNo: string; - personName: string; }; export type CustomerBranch = { @@ -98,26 +103,35 @@ export type CustomerBranchCreate = { export type CustomerCreate = { code: string; customerBranch?: (CustomerBranchCreate & { id?: string })[]; - taxNo?: string | null; - customerNameEN: string; - customerName: string; customerType: CustomerType; status?: Status; image: File | null; - personName: string; registeredBranchId: string; + + namePrefix: string; + firstName: string; + lastName: string; + firstNameEN: string; + lastNameEN: string; + gender: string; + birthDate: Date; }; export type CustomerUpdate = { status?: Status; customerType?: CustomerType; - customerName?: string; - customerNameEN?: string; customerBranch?: (CustomerBranchCreate & { id?: string })[]; - taxNo?: string | null; image?: File; - personName: string; registeredBranchId: string; + + namePrefix: string; + + firstName: string; + lastName: string; + firstNameEN: string; + lastNameEN: string; + gender: string; + birthDate: Date; }; export type BranchAttachmentCreate = {