diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 4b030940..33ef6533 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -262,7 +262,7 @@ export class CommandController extends Controller { commandYear: _data.commandYear, commandAffectDate: _data.commandAffectDate, commandExcecuteDate: _data.commandExcecuteDate, - assignFullName: _data.createdFullName, + assignFullName: null, //xxxxxxxxxxxxxxx createdFullName: _data.createdFullName, status: _data.status, issue: _data.issue, diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 178f4584..2b4120ce 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -3514,10 +3514,10 @@ export class ProfileController extends Controller { }, relations: ["orgChild1"], }); - if (posMasters == null || posMasters.orgRoot == null) { + if (posMasters == null || posMasters.orgChild1 == null) { return new HttpSuccess(false); } - return new HttpSuccess(posMasters); + return new HttpSuccess(posMasters.orgChild1.isOfficer); } /** @@ -3978,12 +3978,18 @@ export class ProfileController extends Controller { // await new permission().PermissionOrgUserGet(request, "SYS_REGISTRY_OFFICER", id);//ไม่แน่ใจOFFปิดไว้ก่อน const profile = await this.profileRepo.findOne({ where: { id: id }, - relations: ["posLevel", "posType", "current_holders", "current_holders.orgRoot", "profileSalary"], + relations: [ + "posLevel", + "posType", + "current_holders", + "current_holders.orgRoot", + "profileSalary", + ], order: { profileSalary: { order: "DESC", - } - } + }, + }, }); if (!profile) { throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");