no message

This commit is contained in:
Bright 2024-06-05 16:27:26 +07:00
parent e4c08a5dc5
commit fb4732a724
2 changed files with 15 additions and 2 deletions

View file

@ -494,6 +494,9 @@ export class ProfileEmployeeController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่งนี้");
}
if(body.employeeClass == null || body.employeeClass == undefined || body.employeeClass == ""){
body.employeeClass = "PERM";
}
if (!["PERM", "TEMP"].includes(body.employeeClass.toLocaleUpperCase())) {
throw new HttpError(HttpStatus.NOT_FOUND, "ประเภทลูกจ้างไม่ถูกต้อง");
}
@ -556,6 +559,9 @@ export class ProfileEmployeeController extends Controller {
}),
);
if(body.employeeClass == null || body.employeeClass == undefined || body.employeeClass == ""){
body.employeeClass = "PERM";
}
if (!["PERM", "TEMP"].includes(body.employeeClass.toLocaleUpperCase())) {
throw new HttpError(HttpStatus.NOT_FOUND, "ประเภทลูกจ้างไม่ถูกต้อง");
}
@ -779,6 +785,11 @@ export class ProfileEmployeeController extends Controller {
position: _data.position,
posNo: shortName,
employeeClass: _data.employeeClass == null ? null : _data.employeeClass,
dateAppoint: _data.dateAppoint,
dateStart: _data.dateStart,
createdAt: _data.createdAt,
dateRetireLaw: _data.dateRetireLaw,
draftOrgEmployeeStatus: null
};
}),
);

View file

@ -488,7 +488,8 @@ export class CreateProfileEmployee {
religion?: string | null;
bloodGroup?: string | null;
phone?: string | null;
employeeClass: string;
salaryLevel?: number | null;
employeeClass?: string | null;
}
export type UpdateProfileEmployee = {
@ -508,7 +509,8 @@ export type UpdateProfileEmployee = {
religion?: string | null;
bloodGroup?: string | null;
phone?: string | null;
employeeClass: string;
salaryLevel?: number | null;
employeeClass?: string | null;
};
export type UpdateProfileAddressEmployee = {