เพิ่มวันเกิด
This commit is contained in:
parent
23b1b58dca
commit
c9a8f9dc4d
1 changed files with 12 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue