Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2025-05-07 14:07:02 +07:00
commit ccf64bfa6d

View file

@ -248,7 +248,7 @@ export class EmployeeTempPositionController extends Controller {
switch (type) {
case "positionName":
findData = await this.employeePosDictRepository.find({
where: { posDictName: Like(`%${keyword}%`) },
where: { posDictName: Like(`%${keyword}%`), posLevel: { posLevelName: 1 } },
relations: ["posType", "posLevel"],
order: {
posDictName: "ASC",
@ -271,7 +271,7 @@ export class EmployeeTempPositionController extends Controller {
select: ["id"],
});
findData = await this.employeePosDictRepository.find({
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
where: { posTypeId: In(findEmpTypes.map((x) => x.id)), posLevel: { posLevelName: 1 } },
relations: ["posType", "posLevel"],
order: {
posDictName: "ASC",
@ -340,6 +340,7 @@ export class EmployeeTempPositionController extends Controller {
default:
findData = await this.employeePosDictRepository.find({
where: { posLevel: { posLevelName: 1 } },
relations: ["posType", "posLevel"],
order: {
posDictName: "ASC",