diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 092a886f..4bf6736e 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -1389,10 +1389,10 @@ export class CommandController extends Controller { where: { id }, relations: ["commandSigns"], order: { - commandSigns:{ - createdAt: "ASC" - } - }, + commandSigns: { + createdAt: "ASC", + }, + }, }); if (!command) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้"); @@ -1488,8 +1488,8 @@ export class CommandController extends Controller { commandSign.lastUpdateFullName = request.user.name; commandSign.lastUpdatedAt = new Date(); await this.commandSignRepository.save(commandSign); - if(commandSign.isSignatory == true) - await this.PutSelectPending(commandSign.commandId, { sign: true }, request); + if (commandSign.isSignatory == true) + await this.PutSelectPending(commandSign.commandId, { sign: true }, request); return new HttpSuccess(); } @@ -1517,6 +1517,8 @@ export class CommandController extends Controller { prefix: string | null; firstName: string | null; lastName: string | null; + remarkVertical?: string | null; + remarkHorizontal?: string | null; }[]; }, @Request() request: RequestWithUser, @@ -1601,6 +1603,14 @@ export class CommandController extends Controller { let commandRecive = new CommandRecive(); commandRecive = Object.assign(new CommandRecive(), item); commandRecive.order = order; + // commandRecive.amount = "xxxxxxxxxx"; + // commandRecive.positionSalaryAmount = "xxxxxxxxxx"; + // commandRecive.mouthSalaryAmount = "xxxxxxxxxx"; + commandRecive.remarkVertical = + item.remarkVertical == null ? null_ : item.remarkVertical; + commandRecive.remarkHorizontal = + item.remarkHorizontal == null ? null_ : item.remarkHorizontal; + commandRecive.order = order; commandRecive.commandId = command.id; commandRecive.createdUserId = request.user.sub; commandRecive.createdFullName = request.user.name;