no message

This commit is contained in:
kittapath 2024-09-06 10:50:56 +07:00
parent f23fd05c2a
commit 1a6c8826be

View file

@ -242,7 +242,10 @@ export class PermissionOrgController extends Controller {
if (!_permissionOrg) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสิทธิ์โครงสร้างนี้");
}
profiles = await _permissionOrg.permissionOrgRoots.map((x) => x.profileTree.id);
profiles = await _permissionOrg.permissionOrgRoots.map((x) => x.profileId);
} else {
const _permissionOrg = await this.permissionOrgRepository.find();
profiles = await _permissionOrg.map((x) => x.profileId);
}
let queryLike =
@ -275,7 +278,7 @@ export class PermissionOrgController extends Controller {
.leftJoinAndSelect("current_holders.orgChild3", "orgChild3")
.leftJoinAndSelect("current_holders.orgChild4", "orgChild4")
.andWhere(`profile.id IN (:...profiles)`, {
profiles: profiles == null ? [] : profiles,
profiles: profiles == null || profiles.length == 0 ? ["null"] : profiles,
})
.andWhere(
requestBody.searchKeyword != undefined &&