แก้ไขชื่อ

This commit is contained in:
kittapath 2024-12-16 16:45:53 +07:00
parent 640668decb
commit cbb4862deb
4 changed files with 155 additions and 7 deletions

View file

@ -117,6 +117,7 @@ export class ProfileChangeNameEmployeeController extends Controller {
profile.firstName = body.firstName ?? profile.firstName;
profile.lastName = body.lastName ?? profile.lastName;
profile.prefix = body.prefix ?? profile.prefix;
profile.prefixMain = profile.rank ?? profile.prefix;
await this.profileEmployeeRepo.save(profile, { data: req });
setLogDataDiff(req, { before, after: profile });
@ -181,6 +182,7 @@ export class ProfileChangeNameEmployeeController extends Controller {
profile.firstName = body.firstName ?? profile.firstName;
profile.lastName = body.lastName ?? profile.lastName;
profile.prefix = body.prefix ?? profile.prefix;
profile.prefixMain = profile.rank ?? profile.prefix;
await this.profileEmployeeRepo.save(profile);
}