แก้ caption ไอดี

This commit is contained in:
Bright 2024-02-28 14:07:49 +07:00
parent da6f901b81
commit 02aaa63d09
6 changed files with 16 additions and 16 deletions

View file

@ -136,7 +136,7 @@ export class PosTypeController extends Controller {
where: { posTypeId: id }
})
if(IdExitsInLevel.length > 0){
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่สามารถลบได้ เนื่องจาก id ผูกกับ posLevel",);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่สามารถลบได้เนื่องจากพบข้อมูลที่ตารางระดับตำแหน่ง",);
}
try {

View file

@ -69,7 +69,7 @@ export class ProfileController extends Controller {
if (!checkPosLevel) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"ไม่พบข้อมูลใน PosLevel จากไอดีนี้ : " + requestBody.posLevelId,
"ไม่พบข้อมูลระดับตำแหน่งนี้"
);
}
}
@ -84,7 +84,7 @@ export class ProfileController extends Controller {
if (!checkPosType) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"ไม่พบข้อมูลใน PosType จากไอดีนี้ : " + requestBody.posTypeId,
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
);
}
}
@ -129,7 +129,7 @@ export class ProfileController extends Controller {
) {
const profile = await this.profileRepository.findOne({ where: { id: id } });
if (!profile) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
}
const _profile = await this.profileRepository.findOne({
@ -149,7 +149,7 @@ export class ProfileController extends Controller {
if (!checkPosLevel) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"ไม่พบข้อมูลใน PosLevel จากไอดีนี้ : " + requestBody.posLevelId,
"ไม่พบข้อมูลระดับตำแหน่งนี้"
);
}
}
@ -164,7 +164,7 @@ export class ProfileController extends Controller {
if (!checkPosType) {
throw new HttpError(
HttpStatusCode.NOT_FOUND,
"ไม่พบข้อมูลใน PosType จากไอดีนี้ : " + requestBody.posTypeId,
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
);
}
}
@ -207,7 +207,7 @@ export class ProfileController extends Controller {
where: { id },
});
if (!delProfile) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
}
try {
await this.profileRepository.delete({ id: id });

View file

@ -55,7 +55,7 @@ export class ProfileSalaryController extends Controller {
where: {id : profileSalary.profileId}
})
if(!profile){
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: "+ profileSalary.profileId);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
}
profileSalary.createdUserId = request.user.sub;
@ -83,7 +83,7 @@ export class ProfileSalaryController extends Controller {
) {
const profileSalary = await this.profileSalaryRepository.findOne({ where: { id: id } });
if (!profileSalary) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
}
profileSalary.lastUpdateUserId = request.user.sub;
@ -107,7 +107,7 @@ export class ProfileSalaryController extends Controller {
where: { id },
});
if (!delprofileSalary) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
}
try {
await this.profileSalaryRepository.delete({ id: id });

View file

@ -79,7 +79,7 @@ export class RankController extends Controller {
) {
const rank = await this.rankRepository.findOne({ where: { id: id } });
if (!rank) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลยศนี้");
}
const checkName = await this.rankRepository.findOne({
@ -114,7 +114,7 @@ export class RankController extends Controller {
where: { id },
});
if (!delRank) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลยศนี้");
}
try {
await this.rankRepository.delete({ id: id });

View file

@ -79,7 +79,7 @@ export class RelationshipController extends Controller {
) {
const relationship = await this.relationshipRepository.findOne({ where: { id: id } });
if (!relationship) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพนี้");
}
const checkName = await this.relationshipRepository.findOne({
@ -114,7 +114,7 @@ export class RelationshipController extends Controller {
where: { id },
});
if (!delRelationship) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพนี้");
}
try {
await this.relationshipRepository.delete({ id: id });

View file

@ -79,7 +79,7 @@ export class ReligionController extends Controller {
) {
const religion = await this.religionRepository.findOne({ where: { id: id } });
if (!religion) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลศาสนานี้");
}
const checkName = await this.religionRepository.findOne({
@ -114,7 +114,7 @@ export class ReligionController extends Controller {
where: { id },
});
if (!delReligion) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลศาสนานี้");
}
try {
await this.religionRepository.delete({ id: id });