feat: make field optional
This commit is contained in:
parent
a3207ea026
commit
9ebbb5260f
1 changed files with 2 additions and 6 deletions
|
|
@ -182,7 +182,7 @@ type EmployeeUpdate = {
|
|||
coverageExpireDate?: Date | null;
|
||||
}[];
|
||||
|
||||
employeeOtherInfo: {
|
||||
employeeOtherInfo?: {
|
||||
citizenId?: string | null;
|
||||
fatherFirstName?: string | null;
|
||||
fatherLastName?: string | null;
|
||||
|
|
@ -656,11 +656,7 @@ export class EmployeeController extends Controller {
|
|||
}
|
||||
|
||||
if (record.status !== Status.CREATED) {
|
||||
throw new HttpError(
|
||||
HttpStatus.FORBIDDEN,
|
||||
"Employee is in used.",
|
||||
"employeeInUsed",
|
||||
);
|
||||
throw new HttpError(HttpStatus.FORBIDDEN, "Employee is in used.", "employeeInUsed");
|
||||
}
|
||||
|
||||
return await prisma.employee.delete({ where: { id: employeeId } });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue