no message
This commit is contained in:
parent
8acd2a97c7
commit
85ba718bbd
1 changed files with 5 additions and 16 deletions
|
|
@ -64,10 +64,7 @@ export class PosLevelController extends Controller {
|
|||
},
|
||||
});
|
||||
if (!chkPosTypeId) {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.NOT_FOUND,
|
||||
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
|
||||
);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่งนี้");
|
||||
}
|
||||
|
||||
const chkPosLevelName = await this.posLevelRepository.findOne({
|
||||
|
|
@ -77,10 +74,7 @@ export class PosLevelController extends Controller {
|
|||
},
|
||||
});
|
||||
if (chkPosLevelName) {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.NOT_FOUND,
|
||||
"ชื่อระดับตำแหน่งนี้มีอยู่ในระบบแล้ว",
|
||||
);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ชื่อระดับตำแหน่งนี้มีอยู่ในระบบแล้ว");
|
||||
}
|
||||
|
||||
const validPosLevelAuthority = ["HEAD", "DEPUTY", "GOVERNOR"];
|
||||
|
|
@ -127,10 +121,7 @@ export class PosLevelController extends Controller {
|
|||
},
|
||||
});
|
||||
if (!chkPosTypeId) {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.NOT_FOUND,
|
||||
"ไม่พบข้อมูลประเภทตำแหน่งนี้"
|
||||
);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลประเภทตำแหน่งนี้");
|
||||
}
|
||||
|
||||
const chkPosLevelName = await this.posLevelRepository.findOne({
|
||||
|
|
@ -141,10 +132,7 @@ export class PosLevelController extends Controller {
|
|||
},
|
||||
});
|
||||
if (chkPosLevelName) {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.NOT_FOUND,
|
||||
"ชื่อระดับตำแหน่งนี้มีอยู่ในระบบแล้ว",
|
||||
);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ชื่อระดับตำแหน่งนี้มีอยู่ในระบบแล้ว");
|
||||
}
|
||||
const validPosLevelAuthority = ["HEAD", "DEPUTY", "GOVERNOR"];
|
||||
if (
|
||||
|
|
@ -246,6 +234,7 @@ export class PosLevelController extends Controller {
|
|||
const posLevel = await this.posLevelRepository.find({
|
||||
select: ["id", "posLevelName", "posLevelRank", "posLevelAuthority", "posTypeId"],
|
||||
relations: ["posType"],
|
||||
order: { posLevelRank: "ASC" },
|
||||
});
|
||||
// if (!posLevel) {
|
||||
// return new HttpSuccess([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue