fix #1594
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m17s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m17s
This commit is contained in:
parent
ed6ab06b52
commit
8236caf458
3 changed files with 25 additions and 13 deletions
|
|
@ -117,9 +117,11 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
|||
|
||||
profile.firstName = body.firstName ?? profile.firstName;
|
||||
profile.lastName = body.lastName ?? profile.lastName;
|
||||
profile.prefix = body.prefix ?? profile.prefix;
|
||||
// profile.prefix = body.prefix ?? profile.prefix; //old
|
||||
profile.rank = body.rank ?? profile.rank;
|
||||
profile.prefixMain = profile.rank ?? profile.prefix;
|
||||
// profile.prefixMain = profile.rank ?? profile.prefix; // old
|
||||
profile.prefixMain = profile.prefix;
|
||||
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefixMain;
|
||||
await this.profileEmployeeRepo.save(profile, { data: req });
|
||||
setLogDataDiff(req, { before, after: profile });
|
||||
|
||||
|
|
@ -191,9 +193,11 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
|||
if (profile && chkLastRecord.id === record.id) {
|
||||
profile.firstName = body.firstName ?? profile.firstName;
|
||||
profile.lastName = body.lastName ?? profile.lastName;
|
||||
profile.prefix = body.prefix ?? profile.prefix;
|
||||
// profile.prefix = body.prefix ?? profile.prefix; //old
|
||||
profile.rank = body.rank ?? profile.rank;
|
||||
profile.prefixMain = profile.rank ?? profile.prefix;
|
||||
// profile.prefixMain = profile.rank ?? profile.prefix; // old
|
||||
profile.prefixMain = profile.prefix;
|
||||
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefixMain;
|
||||
await this.profileEmployeeRepo.save(profile);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue