no message

This commit is contained in:
Kittapath 2024-05-01 11:08:44 +07:00
parent a03b23ce35
commit 8dedce8b37

View file

@ -704,6 +704,12 @@ export class ProfileController extends Controller {
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบแบบร่างโครงสร้าง");
}
const posMaster =
profile.current_holders == null ||
profile.current_holders.length == 0 ||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id) == null
? null
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id);
const _profile: any = {
profileId: profile.id,
prefix: profile.prefix,
@ -712,6 +718,7 @@ export class ProfileController extends Controller {
lastName: profile.lastName,
citizenId: profile.citizenId,
position: profile.position,
posMaster: posMaster == null ? null : posMaster.posMasterNo,
posLevelName: profile.posLevel == null ? null : profile.posLevel.posLevelName,
posLevelRank: profile.posLevel == null ? null : profile.posLevel.posLevelRank,
posLevelId: profile.posLevel == null ? null : profile.posLevel.id,