This commit is contained in:
adisak 2025-10-21 17:42:21 +07:00
parent 0929693703
commit 783bb95e16

View file

@ -4430,7 +4430,7 @@ export class OrganizationDotnetController extends Controller {
typeCondition = {}; typeCondition = {};
break; break;
} }
} else if (body.role === "OWNER") { } else if (body.role === "OWNER" || body.role === "ROOT") {
switch (body.reqNode) { switch (body.reqNode) {
case 0: case 0:
typeCondition = { typeCondition = {
@ -4516,12 +4516,6 @@ export class OrganizationDotnetController extends Controller {
typeCondition = {}; typeCondition = {};
break; break;
} }
} else if (body.role === "ROOT") {
typeCondition = {
orgRoot: {
ancestorDNA: body.nodeId,
},
};
} }
let profile = await this.profileRepo.find({ let profile = await this.profileRepo.find({
@ -4990,7 +4984,7 @@ export class OrganizationDotnetController extends Controller {
}, },
) { ) {
let typeCondition: any = {}; let typeCondition: any = {};
if (body.role === "CHILD" || body.role === "PARENT" || body.role === "ROOT") { if (body.role === "CHILD" || body.role === "PARENT") {
switch (body.node) { switch (body.node) {
case 0: case 0:
typeCondition = { typeCondition = {
@ -5034,7 +5028,7 @@ export class OrganizationDotnetController extends Controller {
typeCondition = {}; typeCondition = {};
break; break;
} }
} else if (body.role === "OWNER") { } else if (body.role === "OWNER" || body.role === "ROOT") {
switch (body.reqNode) { switch (body.reqNode) {
case 0: case 0:
typeCondition = { typeCondition = {