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