Merge branch 'develop' of github.com:Frappet/hrms-api-org into develop
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s
This commit is contained in:
commit
dda36a05a9
4 changed files with 53 additions and 17 deletions
|
|
@ -251,7 +251,7 @@ export class EmployeeTempPositionController extends Controller {
|
|||
switch (type) {
|
||||
case "positionName":
|
||||
findData = await this.employeePosDictRepository.find({
|
||||
where: { posDictName: Like(`%${keyword}%`), posLevel: { posLevelName: 1 } },
|
||||
where: { posDictName: Like(`%${keyword}%`), posLevel: { posLevelName: "1" } },
|
||||
relations: ["posType", "posLevel"],
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
|
|
@ -274,7 +274,7 @@ export class EmployeeTempPositionController extends Controller {
|
|||
select: ["id"],
|
||||
});
|
||||
findData = await this.employeePosDictRepository.find({
|
||||
where: { posTypeId: In(findEmpTypes.map((x) => x.id)), posLevel: { posLevelName: 1 } },
|
||||
where: { posTypeId: In(findEmpTypes.map((x) => x.id)), posLevel: { posLevelName: "1" } },
|
||||
relations: ["posType", "posLevel"],
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
|
|
@ -292,19 +292,19 @@ export class EmployeeTempPositionController extends Controller {
|
|||
break;
|
||||
|
||||
case "positionLevel":
|
||||
if (!isNaN(Number(keyword))) {
|
||||
if (!keyword) {
|
||||
let findEmpLevels;
|
||||
if (Number(keyword) === 0) {
|
||||
if (keyword === "0") {
|
||||
findEmpLevels = await this.employeePosLevelRepository.find();
|
||||
} else {
|
||||
findEmpLevels = await this.employeePosLevelRepository.find({
|
||||
where: { posLevelName: Number(keyword) },
|
||||
where: { posLevelName: keyword },
|
||||
});
|
||||
}
|
||||
findData = await this.employeePosDictRepository.find({
|
||||
where: {
|
||||
posLevelId: In(findEmpLevels.map((x) => x.id)),
|
||||
posLevel: { posLevelName: 1 },
|
||||
posLevel: { posLevelName: "1" },
|
||||
},
|
||||
relations: ["posType", "posLevel"],
|
||||
order: {
|
||||
|
|
@ -323,7 +323,7 @@ export class EmployeeTempPositionController extends Controller {
|
|||
} else {
|
||||
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
|
||||
findData = await this.employeePosDictRepository.find({
|
||||
where: { posLevel: { posLevelName: 1 } },
|
||||
where: { posLevel: { posLevelName: "1" } },
|
||||
relations: ["posType", "posLevel"],
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
|
|
@ -343,7 +343,7 @@ export class EmployeeTempPositionController extends Controller {
|
|||
|
||||
default:
|
||||
findData = await this.employeePosDictRepository.find({
|
||||
where: { posLevel: { posLevelName: 1 } },
|
||||
where: { posLevel: { posLevelName: "1" } },
|
||||
relations: ["posType", "posLevel"],
|
||||
order: {
|
||||
posDictName: "ASC",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue