Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop

This commit is contained in:
Kittapath 2024-03-29 09:44:27 +07:00
commit 2be2a6f48c

View file

@ -1,28 +1,11 @@
import {
Body,
Controller,
Delete,
Example,
Get,
Patch,
Path,
Post,
Request,
Route,
Security,
Tags,
} from "tsoa";
import { Body, Controller, Example, Get, Patch, Path, Request, Route, Security, Tags } from "tsoa";
import { AppDataSource } from "../database/data-source";
import HttpSuccess from "../interfaces/http-success";
import HttpStatus from "../interfaces/http-status";
import HttpError from "../interfaces/http-error";
import { RequestWithUser } from "../middlewares/user";
import { Profile } from "../entities/Profile";
import {
CreateProfileGovernment,
ProfileGovernment,
UpdateProfileGovernment,
} from "../entities/ProfileGovernment";
import { ProfileGovernment, UpdateProfileGovernment } from "../entities/ProfileGovernment";
import { Position } from "../entities/Position";
import { PosMaster } from "../entities/PosMaster";
import { calculateAge, calculateRetireDate } from "../interfaces/utils";
@ -112,7 +95,7 @@ export class ProfileGovernmentHistoryController extends Controller {
org: org, //สังกัด
positionField: position == null ? null : position.positionField, //สายงาน
position: record.position, //ตำแหน่ง
posLevel: record.posLevel.posLevelName, //ระดับ
posLevel: record.posLevel?.posLevelName || null, //ระดับ
posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง
posType: record.posType.posTypeName, //ประเภท
posExecutive: