This commit is contained in:
AdisakKanthawilang 2024-05-16 15:22:30 +07:00
parent 0524653f4b
commit 4dac692284
7 changed files with 26 additions and 22 deletions

View file

@ -20,7 +20,7 @@ import HttpStatus from "../interfaces/http-status";
import HttpError from "../interfaces/http-error";
import { Brackets, IsNull, Like, Not } from "typeorm";
import { OrgRevision } from "../entities/OrgRevision";
import { calculateRetireDate } from "../interfaces/utils";
import { calculateRetireDate, calculateRetireLaw } from "../interfaces/utils";
import { EmployeePosMaster } from "../entities/EmployeePosMaster";
import {
ProfileEmployee,
@ -115,7 +115,7 @@ export class ProfileEmployeeController extends Controller {
profile.lastUpdateUserId = request.user.sub;
profile.lastUpdateFullName = request.user.name;
profile.dateRetire = calculateRetireDate(profile.birthDate);
// profile.dateRetireLaw = calculateRetireDate(profile.birthDate);
profile.dateRetireLaw = calculateRetireLaw(profile.birthDate);
await this.profileRepo.save(profile);
return new HttpSuccess();
@ -205,7 +205,7 @@ export class ProfileEmployeeController extends Controller {
record.lastUpdateUserId = request.user.sub;
record.lastUpdateFullName = request.user.name;
record.dateRetire = calculateRetireDate(record.birthDate);
// record.dateRetireLaw = calculateRetireDate(record.birthDate);
record.dateRetireLaw = calculateRetireLaw(record.birthDate);
await this.profileRepo.save(record);