no message

This commit is contained in:
Kittapath 2024-03-18 15:24:28 +07:00
parent 42fd0084aa
commit 5908cac8fa

View file

@ -269,6 +269,7 @@ export class EmployeePositionController extends Controller {
findData = await this.employeePosDictRepository.find({
where: { posDictName: Like(`%${keyword}%`) },
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
break;
@ -280,6 +281,7 @@ export class EmployeePositionController extends Controller {
findData = await this.employeePosDictRepository.find({
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
break;
@ -291,11 +293,13 @@ export class EmployeePositionController extends Controller {
findData = await this.employeePosDictRepository.find({
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
} else {
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
findData = await this.employeePosDictRepository.find({
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
}
break;
@ -303,6 +307,7 @@ export class EmployeePositionController extends Controller {
default:
findData = await this.employeePosDictRepository.find({
relations: ["posType", "posLevel"],
order: { posLevel: { posLevelName: "ASC" } },
});
break;
}