แก้ caption ไอดี
This commit is contained in:
parent
da6f901b81
commit
02aaa63d09
6 changed files with 16 additions and 16 deletions
|
|
@ -136,7 +136,7 @@ export class PosTypeController extends Controller {
|
||||||
where: { posTypeId: id }
|
where: { posTypeId: id }
|
||||||
})
|
})
|
||||||
if(IdExitsInLevel.length > 0){
|
if(IdExitsInLevel.length > 0){
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่สามารถลบได้ เนื่องจาก id ผูกกับ posLevel",);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่สามารถลบได้เนื่องจากพบข้อมูลที่ตารางระดับตำแหน่ง",);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export class ProfileController extends Controller {
|
||||||
if (!checkPosLevel) {
|
if (!checkPosLevel) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
"ไม่พบข้อมูลใน PosLevel จากไอดีนี้ : " + requestBody.posLevelId,
|
"ไม่พบข้อมูลระดับตำแหน่งนี้"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +84,7 @@ export class ProfileController extends Controller {
|
||||||
if (!checkPosType) {
|
if (!checkPosType) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
"ไม่พบข้อมูลใน PosType จากไอดีนี้ : " + requestBody.posTypeId,
|
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -129,7 +129,7 @@ export class ProfileController extends Controller {
|
||||||
) {
|
) {
|
||||||
const profile = await this.profileRepository.findOne({ where: { id: id } });
|
const profile = await this.profileRepository.findOne({ where: { id: id } });
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const _profile = await this.profileRepository.findOne({
|
const _profile = await this.profileRepository.findOne({
|
||||||
|
|
@ -149,7 +149,7 @@ export class ProfileController extends Controller {
|
||||||
if (!checkPosLevel) {
|
if (!checkPosLevel) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
"ไม่พบข้อมูลใน PosLevel จากไอดีนี้ : " + requestBody.posLevelId,
|
"ไม่พบข้อมูลระดับตำแหน่งนี้"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -164,7 +164,7 @@ export class ProfileController extends Controller {
|
||||||
if (!checkPosType) {
|
if (!checkPosType) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatusCode.NOT_FOUND,
|
HttpStatusCode.NOT_FOUND,
|
||||||
"ไม่พบข้อมูลใน PosType จากไอดีนี้ : " + requestBody.posTypeId,
|
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -207,7 +207,7 @@ export class ProfileController extends Controller {
|
||||||
where: { id },
|
where: { id },
|
||||||
});
|
});
|
||||||
if (!delProfile) {
|
if (!delProfile) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await this.profileRepository.delete({ id: id });
|
await this.profileRepository.delete({ id: id });
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export class ProfileSalaryController extends Controller {
|
||||||
where: {id : profileSalary.profileId}
|
where: {id : profileSalary.profileId}
|
||||||
})
|
})
|
||||||
if(!profile){
|
if(!profile){
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: "+ profileSalary.profileId);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
profileSalary.createdUserId = request.user.sub;
|
profileSalary.createdUserId = request.user.sub;
|
||||||
|
|
@ -83,7 +83,7 @@ export class ProfileSalaryController extends Controller {
|
||||||
) {
|
) {
|
||||||
const profileSalary = await this.profileSalaryRepository.findOne({ where: { id: id } });
|
const profileSalary = await this.profileSalaryRepository.findOne({ where: { id: id } });
|
||||||
if (!profileSalary) {
|
if (!profileSalary) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
profileSalary.lastUpdateUserId = request.user.sub;
|
profileSalary.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -107,7 +107,7 @@ export class ProfileSalaryController extends Controller {
|
||||||
where: { id },
|
where: { id },
|
||||||
});
|
});
|
||||||
if (!delprofileSalary) {
|
if (!delprofileSalary) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดี: " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโปรไฟล์นี้");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await this.profileSalaryRepository.delete({ id: id });
|
await this.profileSalaryRepository.delete({ id: id });
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ export class RankController extends Controller {
|
||||||
) {
|
) {
|
||||||
const rank = await this.rankRepository.findOne({ where: { id: id } });
|
const rank = await this.rankRepository.findOne({ where: { id: id } });
|
||||||
if (!rank) {
|
if (!rank) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลยศนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkName = await this.rankRepository.findOne({
|
const checkName = await this.rankRepository.findOne({
|
||||||
|
|
@ -114,7 +114,7 @@ export class RankController extends Controller {
|
||||||
where: { id },
|
where: { id },
|
||||||
});
|
});
|
||||||
if (!delRank) {
|
if (!delRank) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลยศนี้");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await this.rankRepository.delete({ id: id });
|
await this.rankRepository.delete({ id: id });
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ export class RelationshipController extends Controller {
|
||||||
) {
|
) {
|
||||||
const relationship = await this.relationshipRepository.findOne({ where: { id: id } });
|
const relationship = await this.relationshipRepository.findOne({ where: { id: id } });
|
||||||
if (!relationship) {
|
if (!relationship) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkName = await this.relationshipRepository.findOne({
|
const checkName = await this.relationshipRepository.findOne({
|
||||||
|
|
@ -114,7 +114,7 @@ export class RelationshipController extends Controller {
|
||||||
where: { id },
|
where: { id },
|
||||||
});
|
});
|
||||||
if (!delRelationship) {
|
if (!delRelationship) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลสถานภาพนี้");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await this.relationshipRepository.delete({ id: id });
|
await this.relationshipRepository.delete({ id: id });
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ export class ReligionController extends Controller {
|
||||||
) {
|
) {
|
||||||
const religion = await this.religionRepository.findOne({ where: { id: id } });
|
const religion = await this.religionRepository.findOne({ where: { id: id } });
|
||||||
if (!religion) {
|
if (!religion) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลศาสนานี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkName = await this.religionRepository.findOne({
|
const checkName = await this.religionRepository.findOne({
|
||||||
|
|
@ -114,7 +114,7 @@ export class ReligionController extends Controller {
|
||||||
where: { id },
|
where: { id },
|
||||||
});
|
});
|
||||||
if (!delReligion) {
|
if (!delReligion) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลศาสนานี้");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await this.religionRepository.delete({ id: id });
|
await this.religionRepository.delete({ id: id });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue