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); }