เช็คอายุราชการ #661
This commit is contained in:
parent
89fbc0225f
commit
6b3b77337e
4 changed files with 85 additions and 118 deletions
|
|
@ -8,7 +8,7 @@ import { Profile } from "../entities/Profile";
|
|||
import { ProfileGovernment, UpdateProfileGovernment } from "../entities/ProfileGovernment";
|
||||
import { Position } from "../entities/Position";
|
||||
import { PosMaster } from "../entities/PosMaster";
|
||||
import { calculateAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils";
|
||||
import { calculateAge, calculateGovAge, calculateRetireDate, setLogDataDiff } from "../interfaces/utils";
|
||||
import permission from "../interfaces/permission";
|
||||
import { OrgRevision } from "../entities/OrgRevision";
|
||||
@Route("api/v1/org/profile/government")
|
||||
|
|
@ -119,7 +119,8 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
positionExecutiveField: position == null ? null : position.positionExecutiveField, //ด้านทางการบริหาร
|
||||
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
||||
dateRetireLaw: record.dateRetireLaw ?? null,
|
||||
govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||
govAge: await calculateGovAge(profile.id,"OFFICER"),
|
||||
dateAppoint: record.dateAppoint,
|
||||
dateStart: record.dateStart,
|
||||
govAgeAbsent: record.govAgeAbsent,
|
||||
|
|
@ -229,7 +230,8 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
positionExecutiveField: position == null ? null : position.positionExecutiveField, //ด้านทางการบริหาร
|
||||
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
||||
dateRetireLaw: record.dateRetireLaw ?? null,
|
||||
govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||
govAge: await calculateGovAge(profileId,"OFFICER"),
|
||||
dateAppoint: record.dateAppoint,
|
||||
dateStart: record.dateStart,
|
||||
govAgeAbsent: record.govAgeAbsent,
|
||||
|
|
@ -322,7 +324,8 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
positionExecutiveField: position == null ? null : position.positionExecutiveField, //ด้านทางการบริหาร
|
||||
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
|
||||
dateRetireLaw: record.dateRetireLaw ?? null,
|
||||
govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||
// govAge: record.dateStart == null ? null : calculateAge(record.dateStart),
|
||||
govAge: await calculateGovAge(profileId,"OFFICER"),
|
||||
dateAppoint: record.dateAppoint,
|
||||
dateStart: record.dateStart,
|
||||
govAgeAbsent: record.govAgeAbsent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue