diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 1a45751a..74e60a10 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -4461,7 +4461,7 @@ export class OrganizationDotnetController extends Controller { ) { let typeCondition: any = {}; if (body.role === "CHILD" || body.role === "PARENT" || body.role === "BROTHER") { - if (body.role === "CHILD" || body.role === "BROTHER") { + if (body.role === "CHILD") { switch (body.node) { case 0: typeCondition = { @@ -4502,6 +4502,47 @@ export class OrganizationDotnetController extends Controller { typeCondition = {}; break; } + } else if (body.role === "BROTHER") { + switch (body.node) { + case 0: + typeCondition = { + orgRoot: { + ancestorDNA: body.nodeId, + }, + }; + break; + case 1: + typeCondition = { + orgRoot: { + ancestorDNA: body.nodeId, + }, + }; + break; + case 2: + typeCondition = { + orgChild1: { + ancestorDNA: body.nodeId, + }, + }; + break; + case 3: + typeCondition = { + orgChild2: { + ancestorDNA: body.nodeId, + }, + }; + break; + case 4: + typeCondition = { + orgChild3: { + ancestorDNA: body.nodeId, + }, + }; + break; + default: + typeCondition = {}; + break; + } } else if (body.role === "PARENT") { typeCondition = { orgRoot: {