Merge branch 'dev' into adiDev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m5s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m5s
This commit is contained in:
commit
e2aeabf155
3 changed files with 25 additions and 13 deletions
|
|
@ -111,9 +111,11 @@ export class ProfileChangeNameController extends Controller {
|
||||||
setLogDataDiff(req, { before, after: history });
|
setLogDataDiff(req, { before, after: history });
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
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.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.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: profile });
|
setLogDataDiff(req, { before, after: profile });
|
||||||
|
|
@ -185,9 +187,11 @@ export class ProfileChangeNameController extends Controller {
|
||||||
if (profile && chkLastRecord.id === record.id) {
|
if (profile && chkLastRecord.id === record.id) {
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
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.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.profileRepository.save(profile, { data: req });
|
await this.profileRepository.save(profile, { data: req });
|
||||||
setLogDataDiff(req, { before: before_profile, after: profile });
|
setLogDataDiff(req, { before: before_profile, after: profile });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,9 +117,11 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
||||||
|
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
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.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 });
|
await this.profileEmployeeRepo.save(profile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: profile });
|
setLogDataDiff(req, { before, after: profile });
|
||||||
|
|
||||||
|
|
@ -191,9 +193,11 @@ export class ProfileChangeNameEmployeeController extends Controller {
|
||||||
if (profile && chkLastRecord.id === record.id) {
|
if (profile && chkLastRecord.id === record.id) {
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
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.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);
|
await this.profileEmployeeRepo.save(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,9 +108,11 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
|
||||||
|
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
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.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 });
|
await this.profileEmployeeRepo.save(profile, { data: req });
|
||||||
setLogDataDiff(req, { before, after: profile });
|
setLogDataDiff(req, { before, after: profile });
|
||||||
|
|
||||||
|
|
@ -179,9 +181,11 @@ export class ProfileChangeNameEmployeeTempController extends Controller {
|
||||||
if (profile && chkLastRecord.id === record.id) {
|
if (profile && chkLastRecord.id === record.id) {
|
||||||
profile.firstName = body.firstName ?? profile.firstName;
|
profile.firstName = body.firstName ?? profile.firstName;
|
||||||
profile.lastName = body.lastName ?? profile.lastName;
|
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.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);
|
await this.profileEmployeeRepo.save(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue