no message

This commit is contained in:
kittapath 2024-11-21 10:54:09 +07:00
parent 396440e4bc
commit 15a9f6a376
2 changed files with 9 additions and 8 deletions

View file

@ -1122,13 +1122,13 @@ export class PositionController extends Controller {
where: { posMasterId: posMaster.id },
relations: ["posType", "posLevel", "posExecutive"],
// order: { lastUpdatedAt: "ASC" },
order: {
order: {
posType: {
posTypeRank: "ASC"
posTypeRank: "ASC",
},
posLevel: {
posLevelRank: "ASC"
}
posLevelRank: "ASC",
},
},
});
const formattedData = {
@ -1423,7 +1423,7 @@ export class PositionController extends Controller {
.andWhere(checkChildConditions)
.andWhere(typeCondition)
.andWhere(revisionCondition);
})
}),
)
.orWhere(
new Brackets((qb) => {
@ -1438,13 +1438,13 @@ export class PositionController extends Controller {
.andWhere(checkChildConditions)
.andWhere(typeCondition)
.andWhere(revisionCondition);
})
}),
)
.orderBy("posMaster.posMasterOrder", "ASC")
.skip((body.page - 1) * body.pageSize)
.take(body.pageSize)
.getManyAndCount();
//แก้ค้นหา
let _position: any[] = [];
let x: any = null;
@ -2005,6 +2005,7 @@ export class PositionController extends Controller {
profilePostype: type == null || type.posTypeName == null ? null : type.posTypeName,
profilePoslevel: level == null || level.posLevelName == null ? null : level.posLevelName,
authRoleId: posMaster.authRoleId,
isCondition: posMaster.isCondition,
authRoleName:
authRoleName == null || authRoleName.roleName == null ? null : authRoleName.roleName,
positions: positions.map((position: any) => ({

View file

@ -435,7 +435,7 @@ export class KeycloakController extends Controller {
) {
let condition: any = {};
if (req.user.role.includes("ADMIN")) {
if (req.user.role.includes("ADMIN") && !req.user.role.includes("SUPER_ADMIN")) {
const profile = await this.profileRepo.findOne({
relations: ["current_holders", "current_holders.orgRevision"],
where: {