search perm
This commit is contained in:
parent
bf4d551f40
commit
069e343ca6
2 changed files with 10 additions and 10 deletions
|
|
@ -4091,7 +4091,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
where: {
|
||||
keycloak: IsNull(),
|
||||
citizenId: Like(`%${body.keyword}%`),
|
||||
employeeClass: "PREM",
|
||||
employeeClass: "PERM",
|
||||
},
|
||||
relations: ["posType", "posLevel", "current_holders"],
|
||||
skip,
|
||||
|
|
@ -4104,7 +4104,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
where: {
|
||||
keycloak: IsNull(),
|
||||
firstName: Like(`%${body.keyword}%`),
|
||||
employeeClass: "PREM",
|
||||
employeeClass: "PERM",
|
||||
},
|
||||
relations: ["posType", "posLevel", "current_holders"],
|
||||
skip,
|
||||
|
|
@ -4117,7 +4117,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
where: {
|
||||
keycloak: IsNull(),
|
||||
lastName: Like(`%${body.keyword}%`),
|
||||
employeeClass: "PREM",
|
||||
employeeClass: "PERM",
|
||||
},
|
||||
relations: ["posType", "posLevel", "current_holders"],
|
||||
skip,
|
||||
|
|
@ -4129,7 +4129,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
[findProfile, total] = await this.profileRepo.findAndCount({
|
||||
where: {
|
||||
keycloak: IsNull(),
|
||||
employeeClass: "PREM",
|
||||
employeeClass: "PERM",
|
||||
},
|
||||
relations: ["posType", "posLevel", "current_holders"],
|
||||
skip,
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ export class KeycloakController extends Controller {
|
|||
const profileEmp = await this.profileEmpRepo.findOne({
|
||||
where: {
|
||||
keycloak: userId,
|
||||
employeeClass: "PREM",
|
||||
employeeClass: "PERM",
|
||||
},
|
||||
relations: ["roleKeycloaks"],
|
||||
});
|
||||
|
|
@ -299,7 +299,7 @@ export class KeycloakController extends Controller {
|
|||
});
|
||||
if (!profile) {
|
||||
const profileEmp = await this.profileEmpRepo.findOne({
|
||||
where: { keycloak: userId, employeeClass: "PREM" },
|
||||
where: { keycloak: userId, employeeClass: "PERM" },
|
||||
relations: ["roleKeycloaks"],
|
||||
});
|
||||
// if (!profileEmp) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
@ -325,7 +325,7 @@ export class KeycloakController extends Controller {
|
|||
});
|
||||
if (!profile) {
|
||||
const profileEmp = await this.profileEmpRepo.findOne({
|
||||
where: { keycloak: userId, employeeClass: "PREM" },
|
||||
where: { keycloak: userId, employeeClass: "PERM" },
|
||||
relations: ["roleKeycloaks"],
|
||||
});
|
||||
if (!profileEmp) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
@ -564,7 +564,7 @@ export class KeycloakController extends Controller {
|
|||
.leftJoinAndSelect("profileEmployee.current_holders", "current_holders")
|
||||
.where("profileEmployee.keycloak IS NOT NULL AND profileEmployee.keycloak != ''")
|
||||
.andWhere(condition)
|
||||
.andWhere({ employeeClass: "PREM" })
|
||||
.andWhere({ employeeClass: "PERM" })
|
||||
.andWhere(
|
||||
new Brackets((qb) => {
|
||||
qb.orWhere(
|
||||
|
|
@ -680,7 +680,7 @@ export class KeycloakController extends Controller {
|
|||
});
|
||||
if (!profile) {
|
||||
const profileEmp = await this.profileEmpRepo.findOne({
|
||||
where: { keycloak: id, employeeClass: "PREM" },
|
||||
where: { keycloak: id, employeeClass: "PERM" },
|
||||
relations: ["roleKeycloaks"],
|
||||
});
|
||||
if (!profileEmp) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
@ -700,7 +700,7 @@ export class KeycloakController extends Controller {
|
|||
});
|
||||
if (!profile) {
|
||||
const profileEmp = await this.profileEmpRepo.findOne({
|
||||
where: { keycloak: userId, employeeClass: "PREM" },
|
||||
where: { keycloak: userId, employeeClass: "PERM" },
|
||||
});
|
||||
if (!profileEmp) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
profileEmp.isActive = status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue