diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index cfcc6f4b..6674dcc8 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -1494,6 +1494,7 @@ export class ProfileController extends Controller { prefix: profile.prefix, rank: profile.rank, avatar: profile.avatar, + isProbation: profile.isProbation, avatarName: profile.avatarName, firstName: profile.firstName, lastName: profile.lastName, diff --git a/src/entities/ProfileChangePosition.ts b/src/entities/ProfileChangePosition.ts index 1ffac9e1..0b495562 100644 --- a/src/entities/ProfileChangePosition.ts +++ b/src/entities/ProfileChangePosition.ts @@ -47,6 +47,9 @@ export class ProfileChangePosition extends EntityBase { @Column({ nullable: true, comment: "เลขบัตรประชาชน", default: null }) citizenId: string; + @Column({ nullable: true, type: "datetime", comment: "วันเกิด", default: null }) + birthDate: Date; + @Column({ nullable: true, comment: "ชื่อหน่วยงาน root", default: null }) root: string; @@ -201,6 +204,7 @@ export class ProfileChangePosition extends EntityBase { profile: ChangePosition; } +//เพิ่มรายชื่อผู้ที่ย้ายสับเปลี่ยนตำแหน่ง export class CreateProfileChangePosition { changePositionId: string; profiles: ProfileItem[] @@ -241,3 +245,19 @@ export class ProfileItem { posLevelOldId: string | null; posLevelNameOld: string | null; } + +//เลือกหน่วยงานที่รับย้าย +export type UpdateProfileChangePosition = { + posmasterId: string; + node: number; + nodeId: string; + orgRevisionId: string; + positionId: string; + posMasterNo: number; + position: string; + positionField: string; + posTypeId: string | null; + posTypeName: string; + posLevelId: string | null; + posLevelName: string; +}; \ No newline at end of file diff --git a/src/migration/1718188662070-update_table_profilechage_add_birthdate.ts b/src/migration/1718188662070-update_table_profilechage_add_birthdate.ts new file mode 100644 index 00000000..545d13c6 --- /dev/null +++ b/src/migration/1718188662070-update_table_profilechage_add_birthdate.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfilechageAddBirthdate1718188662070 implements MigrationInterface { + name = 'UpdateTableProfilechageAddBirthdate1718188662070' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileChangePosition\` ADD \`birthDate\` datetime NULL COMMENT 'วันเกิด'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`profileChangePosition\` DROP COLUMN \`birthDate\``); + } + +}