Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop
This commit is contained in:
commit
b6f72e879c
2 changed files with 9 additions and 7 deletions
|
|
@ -328,9 +328,15 @@ export class EmployeePositionController extends Controller {
|
||||||
|
|
||||||
case "positionLevel":
|
case "positionLevel":
|
||||||
if (!isNaN(Number(keyword))) {
|
if (!isNaN(Number(keyword))) {
|
||||||
const findEmpLevels: EmployeePosLevel[] = await this.employeePosLevelRepository.find({
|
let findEmpLevels;
|
||||||
where: { posLevelName: Number(keyword) },
|
if(Number(keyword) === 0) {
|
||||||
});
|
findEmpLevels = await this.employeePosLevelRepository.find();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
findEmpLevels = await this.employeePosLevelRepository.find({
|
||||||
|
where: { posLevelName: Number(keyword) },
|
||||||
|
});
|
||||||
|
}
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
|
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
|
|
|
||||||
|
|
@ -672,10 +672,6 @@ export class PositionController extends Controller {
|
||||||
case "positionExecutive":
|
case "positionExecutive":
|
||||||
const findExecutive: PosExecutive[] = await this.posExecutiveRepository.find({
|
const findExecutive: PosExecutive[] = await this.posExecutiveRepository.find({
|
||||||
where: { posExecutiveName: Like(`%${keyword}%`) },
|
where: { posExecutiveName: Like(`%${keyword}%`) },
|
||||||
order: {
|
|
||||||
// posExecutiveName: "ASC"
|
|
||||||
posExecutivePriority: "ASC"
|
|
||||||
},
|
|
||||||
select: ["id"],
|
select: ["id"],
|
||||||
});
|
});
|
||||||
findPosDict = await this.posDictRepository.find({
|
findPosDict = await this.posDictRepository.find({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue