แก้ tree org

This commit is contained in:
Kittapath 2024-06-20 16:10:19 +07:00
parent 7f21756928
commit 5ca15d5433
3 changed files with 55 additions and 3 deletions

View file

@ -122,7 +122,7 @@ export class OrgChild1Controller {
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found. orgChild1Rank");
}
if (rootIdExits.orgRootRankSub != "DISTRICT") {
if (rootIdExits.orgRootRankSub != "DISTRICT" && rootIdExits.orgRootRankSub != "OFFICE") {
const chkCode = await this.child1Repository.findOne({
where: {
orgRevisionId: rootIdExits.orgRevisionId,
@ -223,7 +223,7 @@ export class OrgChild1Controller {
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found.");
}
if (rootIdExits.orgRootRankSub != "DISTRICT") {
if (rootIdExits.orgRootRankSub != "DISTRICT" && rootIdExits.orgRootRankSub != "OFFICE") {
const chkCode = await this.child1Repository.findOne({
where: {
id: Not(id),