validate
This commit is contained in:
parent
07a58bc1c7
commit
9ca08b4640
1 changed files with 11 additions and 11 deletions
|
|
@ -252,17 +252,17 @@ export class SalaryController extends Controller {
|
||||||
});
|
});
|
||||||
|
|
||||||
const formattedData = {
|
const formattedData = {
|
||||||
name: salary?.name,
|
name: salary?.name ?? null,
|
||||||
isSpecial: salary?.isSpecial,
|
isSpecial: salary?.isSpecial ?? null,
|
||||||
posTypeId: salary?.posTypeId,
|
posTypeId: salary?.posTypeId ?? null,
|
||||||
posTypeName: salary?.posType_.posTypeName,
|
posTypeName: salary?.posType_.posTypeName ?? null,
|
||||||
posLevelId: salary?.posLevelId,
|
posLevelId: salary?.posLevelId ?? null,
|
||||||
posLevelName: salary?.posLevel_.posLevelName,
|
posLevelName: salary?.posLevel_.posLevelName ?? null,
|
||||||
isActive: salary?.isActive,
|
isActive: salary?.isActive ?? null,
|
||||||
date: salary?.date,
|
date: salary?.date ?? null,
|
||||||
startDate: salary?.startDate,
|
startDate: salary?.startDate ?? null,
|
||||||
endDate: salary?.endDate,
|
endDate: salary?.endDate ?? null,
|
||||||
details: salary?.details,
|
details: salary?.details ?? null,
|
||||||
};
|
};
|
||||||
if (!salary) {
|
if (!salary) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผังเงินเดือนนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผังเงินเดือนนี้");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue