update privilage validate (NORMAL) and update calRetireLaw

This commit is contained in:
Adisak 2025-10-17 16:05:42 +07:00
parent 897dda67ad
commit 5cdcc2a91e
4 changed files with 12 additions and 5 deletions

View file

@ -2002,6 +2002,7 @@ export class ProfileEmployeeController extends Controller {
}
Object.assign(record, body);
record.dateRetireLaw = calculateRetireLaw(record.birthDate);
record.prefixMain = record.prefix;
record.prefix = record.rank && record.rank.length > 0 ? record.rank : record.prefixMain;
record.createdUserId = request.user.sub;