diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 0f182bf5..d316ec27 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -276,10 +276,7 @@ export class CommandController extends Controller { .map((x) => ({ id: x.id, citizenId: x.citizenId, - prefix: x.prefix, - firstName: x.firstName, - lastName: x.lastName, - // profileId: x.profileId, + fullName: x.fullName, order: x.order, remarkVertical: x.remarkVertical, remarkHorizontal: x.remarkHorizontal, @@ -992,9 +989,7 @@ export class CommandController extends Controller { persons: { refId: string; citizenId: string; - prefix: string; - firstName: string; - lastName: string; + fullName: string; }[]; }, @Request() request: RequestWithUser, @@ -1102,7 +1097,7 @@ export class CommandController extends Controller { case "C-PM-06": return "/placemant/appointment/slip/report/"; case "C-PM-07": - return "/xxxxxx/"; + return "/placemant/appointment/move/report/"; case "C-PM-08": return "/xxxxxx/"; case "C-PM-09": diff --git a/src/entities/CommandRecive.ts b/src/entities/CommandRecive.ts index 3b25ad3d..e0998802 100644 --- a/src/entities/CommandRecive.ts +++ b/src/entities/CommandRecive.ts @@ -14,27 +14,27 @@ export class CommandRecive extends EntityBase { @Column({ nullable: true, - comment: "คำนำหน้า", + comment: "ชื่อ-สกุล", length: 255, default: null, }) - prefix: string; + fullName: string; - @Column({ - nullable: true, - comment: "ชื่อ", - length: 255, - default: null, - }) - firstName: string; + // @Column({ + // nullable: true, + // comment: "ชื่อ", + // length: 255, + // default: null, + // }) + // firstName: string; - @Column({ - nullable: true, - comment: "สกุล", - length: 255, - default: null, - }) - lastName: string; + // @Column({ + // nullable: true, + // comment: "สกุล", + // length: 255, + // default: null, + // }) + // lastName: string; @Column({ nullable: true, diff --git a/src/migration/1727851675456-update_ProfileDevelopment2.ts b/src/migration/1727851675456-update_ProfileDevelopment2.ts new file mode 100644 index 00000000..5566c3c0 --- /dev/null +++ b/src/migration/1727851675456-update_ProfileDevelopment2.ts @@ -0,0 +1,20 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateProfileDevelopment21727851675456 implements MigrationInterface { + name = 'UpdateProfileDevelopment21727851675456' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``); + await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`lastName\``); + await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`prefix\``); + await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`fullName\` varchar(255) NULL COMMENT 'ชื่อ-สกุล'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`fullName\``); + await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`prefix\` varchar(255) NULL COMMENT 'คำนำหน้า'`); + await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`lastName\` varchar(255) NULL COMMENT 'สกุล'`); + await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`); + } + +}