บัค ทะเบียนประวัติ #812 (3,4)

This commit is contained in:
AdisakKanthawilang 2024-11-28 17:17:47 +07:00
parent b492cfa220
commit 40c6cc32a7
2 changed files with 7 additions and 7 deletions

View file

@ -830,7 +830,7 @@ export class ProfileEmployeeController extends Controller {
const profile = Object.assign(new ProfileEmployee(), body);
profile.prefixMain = profile.prefix;
profile.prefix = profile.rank ?? profile.prefixMain;
profile.prefix = profile.rank && profile.rank.length > 0?profile.rank:profile.prefixMain;
profile.createdUserId = request.user.sub;
profile.createdFullName = request.user.name;
profile.lastUpdateUserId = request.user.sub;
@ -927,7 +927,7 @@ export class ProfileEmployeeController extends Controller {
Object.assign(record, body);
record.prefixMain = record.prefix;
record.prefix = record.rank ?? record.prefixMain;
record.prefix = record.rank && record.rank.length > 0?record.rank:record.prefixMain;
record.createdUserId = request.user.sub;
record.createdFullName = request.user.name;
record.createdAt = new Date();