diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 8406d518..26c58100 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -943,6 +943,7 @@ export class CommandController extends Controller { await new permission().PermissionGet(request, "COMMAND"); const command = await this.commandRepository.findOne({ where: { id }, + relations: ["commandType"] }); if (!command) { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้"); @@ -955,6 +956,7 @@ export class CommandController extends Controller { isDraft: command.isDraft, isSign: command.isSign, isAttachment: command.isAttachment, + isSalary: command.commandType ? command.commandType.isSalary : null, }; return new HttpSuccess(_command); }