From f605f59b6e91a56074b1e180ec509073b17c7063 Mon Sep 17 00:00:00 2001 From: Adisak Date: Mon, 22 Dec 2025 17:14:56 +0700 Subject: [PATCH] #2146 --- .../OrganizationDotnetController.ts | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 74e60a10..0f47fff5 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -5106,7 +5106,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 = { @@ -5147,6 +5147,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: {