sort ข้อมูลหลัก
This commit is contained in:
parent
94f92b5c9a
commit
2df1e19dc3
13 changed files with 171 additions and 57 deletions
|
|
@ -147,12 +147,8 @@ export class BloodGroupController extends Controller {
|
||||||
async listBloodGroup() {
|
async listBloodGroup() {
|
||||||
const bloodGroup = await this.bloodGroupRepository.find({
|
const bloodGroup = await this.bloodGroupRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (!bloodGroup) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(bloodGroup);
|
return new HttpSuccess(bloodGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,12 +162,11 @@ export class EducationLevelController extends Controller {
|
||||||
"createdFullName",
|
"createdFullName",
|
||||||
"lastUpdateFullName",
|
"lastUpdateFullName",
|
||||||
],
|
],
|
||||||
order: { rank: "ASC" },
|
order: {
|
||||||
|
rank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (!educationLevel) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(educationLevel);
|
return new HttpSuccess(educationLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -197,8 +197,10 @@ export class EmployeePosTypeController extends Controller {
|
||||||
select: ["id", "posTypeName", "posTypeRank", "posTypeShortName", "createdAt", "lastUpdatedAt", "lastUpdateFullName"],
|
select: ["id", "posTypeName", "posTypeRank", "posTypeShortName", "createdAt", "lastUpdatedAt", "lastUpdateFullName"],
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
order: {
|
order: {
|
||||||
|
posTypeRank: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
posLevels: {
|
posLevels: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -246,6 +248,7 @@ export class EmployeePosTypeController extends Controller {
|
||||||
posTypeRank: "ASC",
|
posTypeRank: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
posLevels: {
|
posLevels: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -289,11 +289,16 @@ export class EmployeePositionController extends Controller {
|
||||||
where: { posDictName: Like(`%${keyword}%`) },
|
where: { posDictName: Like(`%${keyword}%`) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
order: {
|
order: {
|
||||||
|
posDictName: "ASC",
|
||||||
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
posLevel: {
|
posLevel: {
|
||||||
posLevelName: "ASC",
|
posLevelName: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
},
|
}
|
||||||
createdAt: "DESC"
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -307,11 +312,16 @@ export class EmployeePositionController extends Controller {
|
||||||
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
|
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
order: {
|
order: {
|
||||||
|
posDictName: "ASC",
|
||||||
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
posLevel: {
|
posLevel: {
|
||||||
posLevelName: "ASC",
|
posLevelName: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
},
|
}
|
||||||
createdAt: "DESC"
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -325,11 +335,16 @@ export class EmployeePositionController extends Controller {
|
||||||
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
|
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
order: {
|
order: {
|
||||||
|
posDictName: "ASC",
|
||||||
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
posLevel: {
|
posLevel: {
|
||||||
posLevelName: "ASC",
|
posLevelName: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
},
|
}
|
||||||
createdAt: "DESC"
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -337,11 +352,16 @@ export class EmployeePositionController extends Controller {
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
order: {
|
order: {
|
||||||
|
posDictName: "ASC",
|
||||||
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
posLevel: {
|
posLevel: {
|
||||||
posLevelName: "ASC",
|
posLevelName: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
},
|
}
|
||||||
createdAt: "DESC"
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -351,11 +371,16 @@ export class EmployeePositionController extends Controller {
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
order: {
|
order: {
|
||||||
|
posDictName: "ASC",
|
||||||
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
posLevel: {
|
posLevel: {
|
||||||
posLevelName: "ASC",
|
posLevelName: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
},
|
}
|
||||||
createdAt: "DESC"
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,8 @@ export class GenderController extends Controller {
|
||||||
async GetResult() {
|
async GetResult() {
|
||||||
const _gender = await this.genderRepository.find({
|
const _gender = await this.genderRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
// if (!_gender) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(_gender);
|
return new HttpSuccess(_gender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -210,9 +210,6 @@ export class PosExecutiveController extends Controller {
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// if (!posExecutive) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(posExecutive);
|
return new HttpSuccess(posExecutive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,8 +185,10 @@ export class PosTypeController extends Controller {
|
||||||
relations: ["posLevels"],
|
relations: ["posLevels"],
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
order: {
|
order: {
|
||||||
|
posTypeRank: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
posLevels: {
|
posLevels: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -248,13 +250,12 @@ export class PosTypeController extends Controller {
|
||||||
posTypeRank: "ASC",
|
posTypeRank: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
posLevels: {
|
posLevels: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
createdAt: "DESC"
|
createdAt: "DESC"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// if (!posType) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
const mapPosType = posType.map((item) => ({
|
const mapPosType = posType.map((item) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
posTypeName: item.posTypeName,
|
posTypeName: item.posTypeName,
|
||||||
|
|
|
||||||
|
|
@ -570,6 +570,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -581,6 +592,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictField: "ASC",
|
posDictField: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -588,7 +610,11 @@ export class PositionController extends Controller {
|
||||||
case "positionType":
|
case "positionType":
|
||||||
const findTypes: PosType[] = await this.posTypeRepository.find({
|
const findTypes: PosType[] = await this.posTypeRepository.find({
|
||||||
where: { posTypeName: Like(`%${keyword}%`) },
|
where: { posTypeName: Like(`%${keyword}%`) },
|
||||||
order: { posTypeName: "ASC" },
|
order: {
|
||||||
|
// posTypeName: "ASC"
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
select: ["id"],
|
select: ["id"],
|
||||||
});
|
});
|
||||||
findPosDict = await this.posDictRepository.find({
|
findPosDict = await this.posDictRepository.find({
|
||||||
|
|
@ -597,6 +623,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -604,7 +641,11 @@ export class PositionController extends Controller {
|
||||||
case "positionLevel":
|
case "positionLevel":
|
||||||
const findLevel: PosLevel[] = await this.posLevelRepository.find({
|
const findLevel: PosLevel[] = await this.posLevelRepository.find({
|
||||||
where: { posLevelName: Like(`%${keyword}%`) },
|
where: { posLevelName: Like(`%${keyword}%`) },
|
||||||
order: { posLevelName: "ASC" },
|
order: {
|
||||||
|
// posLevelName: "ASC"
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
select: ["id"],
|
select: ["id"],
|
||||||
});
|
});
|
||||||
findPosDict = await this.posDictRepository.find({
|
findPosDict = await this.posDictRepository.find({
|
||||||
|
|
@ -613,6 +654,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -620,7 +672,10 @@ 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" },
|
order: {
|
||||||
|
// posExecutiveName: "ASC"
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
},
|
||||||
select: ["id"],
|
select: ["id"],
|
||||||
});
|
});
|
||||||
findPosDict = await this.posDictRepository.find({
|
findPosDict = await this.posDictRepository.find({
|
||||||
|
|
@ -629,6 +684,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -640,6 +706,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -651,6 +728,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -688,6 +776,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -698,6 +797,17 @@ export class PositionController extends Controller {
|
||||||
order: {
|
order: {
|
||||||
posDictName: "ASC",
|
posDictName: "ASC",
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
|
posType:{
|
||||||
|
posTypeRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posLevel: {
|
||||||
|
posLevelRank: "ASC",
|
||||||
|
createdAt: "DESC"
|
||||||
|
},
|
||||||
|
posExecutive: {
|
||||||
|
posExecutivePriority: "ASC"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,8 @@ export class PrefixController extends Controller {
|
||||||
async Get() {
|
async Get() {
|
||||||
const _prefix = await this.prefixRepository.find({
|
const _prefix = await this.prefixRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
// if (!_prefix) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(_prefix);
|
return new HttpSuccess(_prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export class ProvinceController extends Controller {
|
||||||
async GetResult() {
|
async GetResult() {
|
||||||
const _province = await this.provinceRepository.find({
|
const _province = await this.provinceRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(_province);
|
return new HttpSuccess(_province);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,12 +147,8 @@ export class RankController extends Controller {
|
||||||
async listRank() {
|
async listRank() {
|
||||||
const rank = await this.rankRepository.find({
|
const rank = await this.rankRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (!rank) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(rank);
|
return new HttpSuccess(rank);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,8 @@ export class RelationshipController extends Controller {
|
||||||
async listRelationship() {
|
async listRelationship() {
|
||||||
const relationship = await this.relationshipRepository.find({
|
const relationship = await this.relationshipRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
// if (!relationship) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(relationship);
|
return new HttpSuccess(relationship);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -146,12 +146,8 @@ export class ReligionController extends Controller {
|
||||||
async listReligion() {
|
async listReligion() {
|
||||||
const religion = await this.religionRepository.find({
|
const religion = await this.religionRepository.find({
|
||||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
select: ["id", "name", "createdAt", "lastUpdatedAt", "createdFullName", "lastUpdateFullName"],
|
||||||
order: { name: "ASC" },
|
order: { createdAt: "DESC" },
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (!religion) {
|
|
||||||
// return new HttpSuccess([]);
|
|
||||||
// }
|
|
||||||
return new HttpSuccess(religion);
|
return new HttpSuccess(religion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue