refactor!: customer (employer) fields

This commit is contained in:
Methapon Metanipat 2024-09-16 11:03:34 +07:00
parent 00776151c5
commit 86888ed512
4 changed files with 95 additions and 40 deletions

View file

@ -71,14 +71,19 @@ export type CustomerBranchCreate = (
registerNameEN: string;
registerDate: Date;
authorizedCapital: string;
authorizedName: string;
authorizedNameEN: string;
}
) & {
customerId: string;
telephoneNo: string;
status?: Status;
workplace: string;
workplaceEN: string;
homeCode: string;
employmentOffice: string;
employmentOfficeEN: string;
address: string;
addressEN: string;
soi?: string | null;
@ -89,18 +94,18 @@ export type CustomerBranchCreate = (
streetEN?: string | null;
email: string;
contactTel: string;
officeTel: string;
contactName: string;
telephoneNo: string;
agent: string;
employmentOffice: string;
businessType: string;
businessTypeEN: string;
jobPosition: string;
jobPositionEN: string;
jobDescription: string;
saleEmployee: string;
payDate: Date;
payDate: string;
payDateEN: string;
wageRate: number;
wageRateText: string;
subDistrictId?: string | null;
districtId?: string | null;
@ -119,16 +124,19 @@ export type CustomerBranchUpdate = (
registerNameEN?: string;
registerDate?: Date;
authorizedCapital?: string;
authorizedName: string;
authorizedNameEN: string;
}
) & {
customerId?: string;
telephoneNo: string;
status?: "ACTIVE" | "INACTIVE";
workplace: string;
workplaceEN: string;
address: string;
addressEN: string;
homeCode?: string;
address?: string;
addressEN?: string;
soi?: string | null;
soiEN?: string | null;
moo?: string | null;
@ -137,18 +145,18 @@ export type CustomerBranchUpdate = (
streetEN?: string | null;
email?: string;
contactTel?: string;
officeTel?: string;
contactName?: string;
telephoneNo?: string;
agent?: string;
employmentOffice?: string;
businessType?: string;
businessTypeEN?: string;
jobPosition?: string;
jobPositionEN?: string;
jobDescription?: string;
saleEmployee?: string;
payDate?: Date;
payDate?: string;
payDateEN?: string;
wageRate?: number;
wageRateText?: string;
subDistrictId?: string | null;
districtId?: string | null;

View file

@ -63,12 +63,19 @@ export type CustomerCreate = {
registerNameEN: string;
registerDate: Date;
authorizedCapital: string;
authorizedName: string;
authorizedNameEN: string;
}
) & {
customerId: string;
telephoneNo: string;
status?: Status;
workplace: string;
workplaceEN: string;
homeCode: string;
employmentOffice: string;
employmentOfficeEN: string;
address: string;
addressEN: string;
soi?: string | null;
@ -79,18 +86,18 @@ export type CustomerCreate = {
streetEN?: string | null;
email: string;
contactTel: string;
officeTel: string;
contactName: string;
telephoneNo: string;
agent: string;
employmentOffice: string;
businessType: string;
businessTypeEN: string;
jobPosition: string;
jobPositionEN: string;
jobDescription: string;
saleEmployee: string;
payDate: Date;
payDate: string;
payDateEN: string;
wageRate: number;
wageRateText: string;
subDistrictId?: string | null;
districtId?: string | null;
@ -170,7 +177,7 @@ export class CustomerController extends Controller {
district: true,
subDistrict: true,
},
orderBy: { createdAt: "asc" },
orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }],
}
: {
include: {