no message

This commit is contained in:
kittapath 2024-10-22 16:45:23 +07:00
parent ecadf565ac
commit b3dae5a6d7

View file

@ -4225,7 +4225,18 @@ export class ProfileController extends Controller {
async getProfileByCitizenId(@Request() request: RequestWithUser, @Path() id: string) {
const profile = await this.profileRepo.findOne({
where: { citizenId: id },
relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot"],
relations: [
"posLevel",
"posType",
"current_holders",
"current_holders.orgRoot",
"profileSalary",
],
order: {
profileSalary: {
order: "DESC",
},
},
});
if (!profile) {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
@ -4311,6 +4322,15 @@ export class ProfileController extends Controller {
child4ShortName: child4 == null ? null : child4.orgChild4ShortName,
node: null,
nodeId: null,
amount: profile && profile.profileSalary.length > 0 ? profile.profileSalary[0].amount : null,
positionSalaryAmount:
profile && profile.profileSalary.length > 0
? profile.profileSalary[0].positionSalaryAmount
: null,
mouthSalaryAmount:
profile && profile.profileSalary.length > 0
? profile.profileSalary[0].mouthSalaryAmount
: null,
};
if (_profile.child4Id != null) {