From 96b18f10491db270343ac3adffa0cf1eef17fe4e Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 16 Sep 2024 17:34:34 +0700 Subject: [PATCH] fix: update payload --- .../03-customer-branch-controller.ts | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/controllers/03-customer-branch-controller.ts b/src/controllers/03-customer-branch-controller.ts index 084e28f..96e970c 100644 --- a/src/controllers/03-customer-branch-controller.ts +++ b/src/controllers/03-customer-branch-controller.ts @@ -104,30 +104,36 @@ export type CustomerBranchCreate = { provinceId?: string | null; }; -export type CustomerBranchUpdate = ( - | { - // NOTE: About (Natural Person) - citizenId: string; - } - | { - // NOTE: About (Legal Entity) - legalPersonNo: string; - registerName?: string; - registerNameEN?: string; - registerDate?: Date; - authorizedCapital?: string; - authorizedName: string; - authorizedNameEN: string; - } -) & { - customerId?: string; +export type CustomerBranchUpdate = { + customerId: string; + + // NOTE: About (Natural Person) + citizenId?: string; + namePrefix?: string; + firstName?: string; + firstNameEN?: string; + lastName?: string; + lastNameEN?: string; + gender?: string; + birthDate?: Date; + + // NOTE: About (Legal Entity) + legalPersonNo?: string; + registerName?: string; + registerNameEN?: string; + registerDate?: Date; + authorizedCapital?: string; + authorizedName?: string; + authorizedNameEN?: string; customerName?: string; telephoneNo: string; - status?: "ACTIVE" | "INACTIVE"; + status?: Status; homeCode?: string; + employmentOffice?: string; + employmentOfficeEN?: string; address?: string; addressEN?: string; soi?: string | null;