From c9a8f9dc4d95c12f972d6f9076d8726a45a0cc56 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 3 May 2024 17:38:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B9=80=E0=B8=81=E0=B8=B4=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ProfileController.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 0778a8db..45555676 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -19,7 +19,13 @@ 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 { Profile, CreateProfile, UpdateProfile, ProfileHistory, CreateProfileAllFields } from "../entities/Profile"; +import { + Profile, + CreateProfile, + UpdateProfile, + ProfileHistory, + CreateProfileAllFields, +} from "../entities/Profile"; import { Brackets, IsNull, Like, Not } from "typeorm"; import { OrgRevision } from "../entities/OrgRevision"; import { PosMaster } from "../entities/PosMaster"; @@ -206,7 +212,10 @@ export class ProfileController extends Controller { * */ @Post("all") - async createProfileAll(@Request() request: RequestWithUser, @Body() body: CreateProfileAllFields) { + async createProfileAll( + @Request() request: RequestWithUser, + @Body() body: CreateProfileAllFields, + ) { if (await this.profileRepo.findOneBy({ citizenId: body.citizenId })) { throw new HttpError( HttpStatus.INTERNAL_SERVER_ERROR, @@ -923,6 +932,7 @@ export class ProfileController extends Controller { firstName: profile.firstName, lastName: profile.lastName, citizenId: profile.citizenId, + birthDate: profile.birthDate, position: profile.position, posMasterNo: posMaster == null ? null : posMaster.posMasterNo, posLevelName: profile.posLevel == null ? null : profile.posLevel.posLevelName,