check commandType.isSalary
This commit is contained in:
parent
426239e8d8
commit
826337c8d7
1 changed files with 2 additions and 0 deletions
|
|
@ -943,6 +943,7 @@ export class CommandController extends Controller {
|
||||||
await new permission().PermissionGet(request, "COMMAND");
|
await new permission().PermissionGet(request, "COMMAND");
|
||||||
const command = await this.commandRepository.findOne({
|
const command = await this.commandRepository.findOne({
|
||||||
where: { id },
|
where: { id },
|
||||||
|
relations: ["commandType"]
|
||||||
});
|
});
|
||||||
if (!command) {
|
if (!command) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลคำสั่งนี้");
|
||||||
|
|
@ -955,6 +956,7 @@ export class CommandController extends Controller {
|
||||||
isDraft: command.isDraft,
|
isDraft: command.isDraft,
|
||||||
isSign: command.isSign,
|
isSign: command.isSign,
|
||||||
isAttachment: command.isAttachment,
|
isAttachment: command.isAttachment,
|
||||||
|
isSalary: command.commandType ? command.commandType.isSalary : null,
|
||||||
};
|
};
|
||||||
return new HttpSuccess(_command);
|
return new HttpSuccess(_command);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue