fix #2563
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m8s

This commit is contained in:
harid 2026-06-18 10:21:04 +07:00
parent bdd31ce72c
commit 9f7803cc74

View file

@ -250,7 +250,9 @@ export async function CreatePosMasterHistoryEmployee(
let position = selectedPosition?.positionName ?? _null;
let posTypeName = selectedPosition?.posType?.posTypeName ?? _null;
let posLevelName = selectedPosition?.posLevel?.posLevelName ?? _null;
let posLevelName = selectedPosition?.posType && selectedPosition?.posLevel
? `${selectedPosition?.posType?.posTypeShortName ?? ""} ${selectedPosition?.posLevel?.posLevelName ?? ""}`.trim()
: _null;
if (pm.isSit && pm.current_holderId) {
const profile = await repoProfileEmployee.findOne({
where: { id: pm.current_holderId },
@ -258,7 +260,9 @@ export async function CreatePosMasterHistoryEmployee(
});
position = profile?.position ?? _null;
posTypeName = profile?.posType?.posTypeName ?? _null;
posLevelName = profile?.posLevel?.posLevelName ?? _null;
posLevelName = profile?.posType && profile?.posLevel
? `${profile?.posType?.posTypeShortName ?? ""} ${profile?.posLevel?.posLevelName ?? ""}`.trim()
: _null;
}
h.ancestorDNA = pm.ancestorDNA;
if (!type || type != "DELETE") {