This commit is contained in:
harid 2026-06-17 16:53:26 +07:00
parent db36b250e3
commit 12da167794
5 changed files with 9 additions and 8 deletions

View file

@ -112,7 +112,7 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
profile.rank = body.rank ?? profile.rank;
// profile.prefixMain = profile.rank ?? profile.prefix; // old
profile.prefixMain = profile.prefix;
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefixMain;
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefix;
await this.profileEmployeeRepo.save(profile, { data: req });
setLogDataDiff(req, { before, after: profile });
@ -185,7 +185,7 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
profile.rank = body.rank ?? profile.rank;
// profile.prefixMain = profile.rank ?? profile.prefix; // old
profile.prefixMain = profile.prefix;
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefixMain;
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefix;
await this.profileEmployeeRepo.save(profile);
}