เพิ่มตำแหน่งในระดับ

This commit is contained in:
Bright 2025-03-04 13:00:33 +07:00
parent 8278d9ddff
commit 190451a910

View file

@ -97,14 +97,17 @@ export class ProfileSalaryController extends Controller {
})) }))
: []; : [];
const posLevel: any = [ const posLevel = await AppDataSource.query("CALL GetProfileSalaryLevel(?)", [profileId]);
// { const _posLevel = posLevel.length > 0 ? posLevel[0] : [];
// year: 1, const mapPosLevel =
// month: 0, _posLevel.length > 1
// day: 0, ? _posLevel.slice(1).map((curr: any, index: number) => ({
// name: "ต้น", year: curr.Years ? Math.floor(Number(curr.Years)) : 0,
// } month: curr.Months ? Math.floor(Number(curr.Months)) : 0,
]; day: curr.Days ? Math.floor(Number(curr.Days)) : 0,
name: _posLevel[index]?.positionLevel,
}))
: [];
const posExecutive = await AppDataSource.query("CALL GetProfileSalaryExecutive(?)", [ const posExecutive = await AppDataSource.query("CALL GetProfileSalaryExecutive(?)", [
profileId, profileId,
@ -122,7 +125,7 @@ export class ProfileSalaryController extends Controller {
return new HttpSuccess({ return new HttpSuccess({
position: mapPosition, position: mapPosition,
posLevel: posLevel, posLevel: mapPosLevel,
posExecutive: mapPosExecutive, posExecutive: mapPosExecutive,
}); });
} }