From 30df664aa7a36062fe245263387442702f54d51b Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 1 Nov 2024 15:50:52 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20body=20=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=8710?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandTypeController.ts | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/controllers/CommandTypeController.ts b/src/controllers/CommandTypeController.ts index 22df0e3b..272aecf1 100644 --- a/src/controllers/CommandTypeController.ts +++ b/src/controllers/CommandTypeController.ts @@ -100,7 +100,7 @@ export class CommandTypeController extends Controller { */ @Get("{id}") async GetById(@Path() id: string) { - const _commandType = await this.commandTypeRepository.findOne({ + let _commandType = await this.commandTypeRepository.findOne({ where: { id }, select: [ "id", @@ -120,6 +120,28 @@ export class CommandTypeController extends Controller { if (!_commandType) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); } + if(_commandType.code == "C-PM-10") { + let _commandType10: any + _commandType10 = { + id: _commandType.id, + name: _commandType.name, + commandSysId: _commandType.commandSysId, + code: _commandType.code, + fileCover: _commandType.fileCover, + fileAttachment: _commandType.fileAttachment, + isActive: _commandType.isActive, + detailHeader: _commandType.detailHeader, + detailBody: _commandType.detailBody, + detailFooter: _commandType.detailFooter, + subtitle: _commandType.subtitle, + isAttachment: _commandType.isAttachment, + name1: "..........................ประธาน", + name2: "..........................ผู้บังคับบัญชา", + name3: "..........................ผู้ดูแล", + name4: "..........................ผู้ดูแล", + } + _commandType = _commandType10; + } return new HttpSuccess(_commandType); }