sort ข้อมูลหลัก
This commit is contained in:
parent
94f92b5c9a
commit
2df1e19dc3
13 changed files with 171 additions and 57 deletions
|
|
@ -570,6 +570,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -581,6 +592,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictField: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -588,7 +610,11 @@ export class PositionController extends Controller {
|
|||
case "positionType":
|
||||
const findTypes: PosType[] = await this.posTypeRepository.find({
|
||||
where: { posTypeName: Like(`%${keyword}%`) },
|
||||
order: { posTypeName: "ASC" },
|
||||
order: {
|
||||
// posTypeName: "ASC"
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
select: ["id"],
|
||||
});
|
||||
findPosDict = await this.posDictRepository.find({
|
||||
|
|
@ -597,6 +623,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -604,7 +641,11 @@ export class PositionController extends Controller {
|
|||
case "positionLevel":
|
||||
const findLevel: PosLevel[] = await this.posLevelRepository.find({
|
||||
where: { posLevelName: Like(`%${keyword}%`) },
|
||||
order: { posLevelName: "ASC" },
|
||||
order: {
|
||||
// posLevelName: "ASC"
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
select: ["id"],
|
||||
});
|
||||
findPosDict = await this.posDictRepository.find({
|
||||
|
|
@ -613,6 +654,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -620,7 +672,10 @@ export class PositionController extends Controller {
|
|||
case "positionExecutive":
|
||||
const findExecutive: PosExecutive[] = await this.posExecutiveRepository.find({
|
||||
where: { posExecutiveName: Like(`%${keyword}%`) },
|
||||
order: { posExecutiveName: "ASC" },
|
||||
order: {
|
||||
// posExecutiveName: "ASC"
|
||||
posExecutivePriority: "ASC"
|
||||
},
|
||||
select: ["id"],
|
||||
});
|
||||
findPosDict = await this.posDictRepository.find({
|
||||
|
|
@ -629,6 +684,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -640,6 +706,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -651,6 +728,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -688,6 +776,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
@ -698,6 +797,17 @@ export class PositionController extends Controller {
|
|||
order: {
|
||||
posDictName: "ASC",
|
||||
createdAt: "DESC",
|
||||
posType:{
|
||||
posTypeRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posLevel: {
|
||||
posLevelRank: "ASC",
|
||||
createdAt: "DESC"
|
||||
},
|
||||
posExecutive: {
|
||||
posExecutivePriority: "ASC"
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue