no message

This commit is contained in:
kittapath 2024-10-31 12:53:45 +07:00
parent 9020e5036b
commit 4aa3c979b8
3 changed files with 7 additions and 7 deletions

View file

@ -3199,7 +3199,7 @@ export class PositionController extends Controller {
) { ) {
let typeCondition: any = {}; let typeCondition: any = {};
let conditionA = let conditionA =
"positions.posTypeId LIKE :posType AND positions.posLevelId LIKE :posLevel AND positions.positionName LIKE :position"; "posType.posTypeId LIKE :posTypeName AND posLevel.posLevelName LIKE :posLevel AND positions.positionName LIKE :position";
let posType = await this.posTypeRepository.findOne({ let posType = await this.posTypeRepository.findOne({
where: { id: String(body.posType) }, where: { id: String(body.posType) },

View file

@ -301,7 +301,7 @@ export class ProfileController extends Controller {
// ], // ],
relations: ["currentSubDistrict", "currentDistrict", "currentProvince", "profileAvatars"], relations: ["currentSubDistrict", "currentDistrict", "currentProvince", "profileAvatars"],
order: { order: {
profileAvatars: { createdAt: "DESC" }, profileAvatars: { createdAt: "ASC" },
}, },
where: { id: id }, where: { id: id },
}); });
@ -527,7 +527,7 @@ export class ProfileController extends Controller {
}); });
const Cert = const Cert =
certs.length > 0 certs.length > 0
? certs.map((item) => ({ ? certs.slice(-3).map((item) => ({
CertificateType: item.certificateType ?? null, CertificateType: item.certificateType ?? null,
Issuer: item.issuer ?? null, Issuer: item.issuer ?? null,
CertificateNo: Extension.ToThaiNumber(item.certificateNo) ?? null, CertificateNo: Extension.ToThaiNumber(item.certificateNo) ?? null,
@ -547,7 +547,7 @@ export class ProfileController extends Controller {
}); });
const Training = const Training =
trainings.length > 0 trainings.length > 0
? trainings.map((item) => ({ ? trainings.slice(-3).map((item) => ({
Institute: item.department ?? "", Institute: item.department ?? "",
Start: Start:
item.startDate == null item.startDate == null
@ -583,7 +583,7 @@ export class ProfileController extends Controller {
}); });
const Discipline = const Discipline =
disciplines.length > 0 disciplines.length > 0
? disciplines.map((item) => ({ ? disciplines.slice(-3).map((item) => ({
DisciplineYear: DisciplineYear:
Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()) ?? Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()) ??
null, null,
@ -605,7 +605,7 @@ export class ProfileController extends Controller {
}); });
const Education = const Education =
educations.length > 0 educations.length > 0
? educations.map((item) => ({ ? educations.slice(-3).map((item) => ({
Institute: item.institute, Institute: item.institute,
Start: Start:
item.startDate == null item.startDate == null

View file

@ -305,7 +305,7 @@ export class ProfileEmployeeController extends Controller {
// ], // ],
relations: ["currentSubDistrict", "currentDistrict", "currentProvince", "profileAvatars"], relations: ["currentSubDistrict", "currentDistrict", "currentProvince", "profileAvatars"],
order: { order: {
profileAvatars: { createdAt: "DESC" }, profileAvatars: { createdAt: "ASC" },
}, },
where: { id: id }, where: { id: id },
}); });