no message

This commit is contained in:
kittapath 2024-09-25 21:05:16 +07:00
parent 7697d6d46a
commit c0b920819d
6 changed files with 56 additions and 6 deletions

View file

@ -110,6 +110,7 @@ export class CommandController extends Controller {
: `${commandTypeId}`,
},
)
.orderBy("commandSalary.createdAt", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();
@ -196,6 +197,8 @@ export class CommandController extends Controller {
detailHeader: command.detailHeader,
detailBody: command.detailBody,
detailFooter: command.detailFooter,
isBangkok: command.isBangkok,
isAttachment: command.isAttachment,
commandAffectDate: command.commandAffectDate,
commandExcecuteDate: command.commandExcecuteDate,
commandTypeName: command.commandType?.name || null,
@ -224,6 +227,7 @@ export class CommandController extends Controller {
detailFooter: string | null;
commandAffectDate: Date | null;
commandExcecuteDate: Date | null;
isBangkok: boolean | null;
},
@Request() request: RequestWithUser,
) {
@ -268,7 +272,7 @@ export class CommandController extends Controller {
id: x.id,
citizenId: x.citizenId,
prefix: x.prefix,
fristName: x.fristName,
firstName: x.firstName,
lastName: x.lastName,
profileId: x.profileId,
order: x.order,
@ -320,7 +324,7 @@ export class CommandController extends Controller {
return new HttpSuccess();
}
@Get("tap2/swap/{direction}/{commandReciveId}")
@Get("tab2/swap/{direction}/{commandReciveId}")
public async swapSalary(
@Path() direction: string,
commandReciveId: string,
@ -448,7 +452,7 @@ export class CommandController extends Controller {
id: item.id,
citizenId: item.citizenId,
prefix: item.prefix,
fristName: item.fristName,
firstName: item.firstName,
lastName: item.lastName,
position: item.position,
org: item.org,
@ -501,7 +505,7 @@ export class CommandController extends Controller {
commandSend.citizenId = profile.citizenId;
commandSend.prefix =
profile.rank != null && profile.rank != "" ? profile.rank : profile.prefix;
commandSend.fristName = profile.firstName;
commandSend.firstName = profile.firstName;
commandSend.lastName = profile.lastName;
commandSend.position = profile.position;
commandSend.org =

View file

@ -92,6 +92,14 @@ export class Command extends EntityBase {
})
positionDetail: string;
@Column({
nullable: true,
default: null,
type: "boolean",
comment: "คำสั่งกรุงเทพมหานคร",
})
isBangkok: boolean;
@Column({
comment: "สถานะบัญชีแนบท้าย",
default: true,

View file

@ -27,7 +27,7 @@ export class CommandRecive extends EntityBase {
length: 255,
default: null,
})
fristName: string;
firstName: string;
@Column({
nullable: true,

View file

@ -28,7 +28,7 @@ export class CommandSend extends EntityBase {
length: 255,
default: null,
})
fristName: string;
firstName: string;
@Column({
nullable: true,

View file

@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandReciveAddSalary11727260590227 implements MigrationInterface {
name = 'UpdateCommandReciveAddSalary11727260590227'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandRecive\` CHANGE \`fristName\` \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandSend\` CHANGE \`fristName\` \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandSend\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandSend\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandSend\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandSend\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandSend\` CHANGE \`firstName\` \`fristName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` CHANGE \`firstName\` \`fristName\` varchar(255) NULL COMMENT 'ชื่อ'`);
}
}

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateCommandReciveAddIsbangkok1727272904603 implements MigrationInterface {
name = 'UpdateCommandReciveAddIsbangkok1727272904603'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`command\` ADD \`isBangkok\` tinyint NULL COMMENT 'คำสั่งกรุงเทพมหานคร'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`command\` DROP COLUMN \`isBangkok\``);
}
}