diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 6e35071..7378b51 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -431,7 +431,7 @@ export class ReoportController { evaluation.salaries.length > 0 ? evaluation.salaries.map((salaries) => ({ date: salaries.commandDateAffect - ? Extension.ToThaiNumber(Extension.ToThaiShortDate_noPrefix(salaries.commandDateAffect)) + ? Extension.ToThaiNumber(Extension.ToThaiFullDate2(salaries.commandDateAffect)) : "-", amount: salaries.amount ? Extension.ToThaiNumber(salaries.amount.toLocaleString()) diff --git a/src/entities/Evaluation.ts b/src/entities/Evaluation.ts index 1d86511..97c1d7e 100644 --- a/src/entities/Evaluation.ts +++ b/src/entities/Evaluation.ts @@ -230,6 +230,11 @@ export class Evaluation extends EntityBase { @Column({ nullable: true, comment: "ตำแหน่งเดิม ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ doc2" }) commanderAbovePositionOldDoc2: string; + @Column({ nullable: true, comment: "ด้าน/สาขา" }) + positionArea: string; + @Column({ nullable: true, comment: "ตำแหน่งทางการบริหาร" }) + posExecutive: string; + @Column({ nullable: true, comment: "ชื่อ-นามสกุล ผู้บังคับบัญชาเหนือขึ้นไป 1 ระดับ (จัดเตรียมเอกสารเล่ม 2)", @@ -402,6 +407,12 @@ export class CreateEvaluation { @Column() orgRootId?: string | null; + + @Column() + positionArea?: string; + + @Column() + posExecutive?: string; } export class CreateEducation { diff --git a/src/migration/1745394229016-add_field_posExAndPosArea_table_evaluation.ts b/src/migration/1745394229016-add_field_posExAndPosArea_table_evaluation.ts new file mode 100644 index 0000000..42538eb --- /dev/null +++ b/src/migration/1745394229016-add_field_posExAndPosArea_table_evaluation.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class AddFieldPosExAndPosAreaTableEvaluation1745394229016 implements MigrationInterface { + name = 'AddFieldPosExAndPosAreaTableEvaluation1745394229016' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`evaluation\` ADD \`positionArea\` varchar(255) NULL COMMENT 'ด้าน/สาขา'`); + await queryRunner.query(`ALTER TABLE \`evaluation\` ADD \`posExecutive\` varchar(255) NULL COMMENT 'ตำแหน่งทางการบริหาร'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`evaluation\` DROP COLUMN \`posExecutive\``); + await queryRunner.query(`ALTER TABLE \`evaluation\` DROP COLUMN \`positionArea\``); + } + +}