no message
This commit is contained in:
parent
376ab804db
commit
9dca259981
1 changed files with 15 additions and 16 deletions
|
|
@ -625,23 +625,22 @@ export class OrganizationController extends Controller {
|
||||||
) {
|
) {
|
||||||
await new permission().PermissionList(request, "SYS_ORG");
|
await new permission().PermissionList(request, "SYS_ORG");
|
||||||
}
|
}
|
||||||
if (_data.root != null) {
|
if (orgRevision.orgRevisionIsDraft == true && orgRevision.orgRevisionIsCurrent == false) {
|
||||||
if (orgRevision.orgRevisionIsDraft == true && orgRevision.orgRevisionIsCurrent == false) {
|
const profile = await this.profileRepo.findOne({
|
||||||
const profile = await this.profileRepo.findOne({
|
where: { keycloak: request.user.sub },
|
||||||
where: { keycloak: request.user.sub },
|
relations: ["permissionProfiles"],
|
||||||
relations: ["permissionProfiles"],
|
});
|
||||||
});
|
if (!profile) {
|
||||||
if (!profile) {
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผู้ใช้งานในทะเบียนประวัติ");
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผู้ใช้งานในทะเบียนประวัติ");
|
|
||||||
}
|
|
||||||
_data = {
|
|
||||||
root: profile.permissionProfiles.map((x) => x.orgRootId),
|
|
||||||
child1: null,
|
|
||||||
child2: null,
|
|
||||||
child3: null,
|
|
||||||
child4: null,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
_data = {
|
||||||
|
root: profile.permissionProfiles.map((x) => x.orgRootId),
|
||||||
|
child1: null,
|
||||||
|
child2: null,
|
||||||
|
child3: null,
|
||||||
|
child4: null,
|
||||||
|
};
|
||||||
|
console.log(_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const orgRootData = await AppDataSource.getRepository(OrgRoot)
|
const orgRootData = await AppDataSource.getRepository(OrgRoot)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue