fix entity and store dateRetire
This commit is contained in:
parent
0df3191fcc
commit
cf3c3feba2
4 changed files with 11 additions and 1 deletions
|
|
@ -114,6 +114,8 @@ export class ProfileEmployeeController extends Controller {
|
|||
profile.createdFullName = request.user.name;
|
||||
profile.lastUpdateUserId = request.user.sub;
|
||||
profile.lastUpdateFullName = request.user.name;
|
||||
profile.dateRetire = calculateRetireDate(profile.birthDate);
|
||||
profile.dateRetireLaw = calculateRetireDate(profile.birthDate);
|
||||
await this.profileRepo.save(profile);
|
||||
|
||||
return new HttpSuccess();
|
||||
|
|
@ -202,6 +204,8 @@ export class ProfileEmployeeController extends Controller {
|
|||
Object.assign(record, body);
|
||||
record.lastUpdateUserId = request.user.sub;
|
||||
record.lastUpdateFullName = request.user.name;
|
||||
record.dateRetire = calculateRetireDate(record.birthDate);
|
||||
record.dateRetireLaw = calculateRetireDate(record.birthDate);
|
||||
|
||||
await this.profileRepo.save(record);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue