From 0caec00c75ae030c45588761245ca3dc0d2253aa Mon Sep 17 00:00:00 2001 From: Adisak Date: Mon, 22 Dec 2025 17:05:54 +0700 Subject: [PATCH] fix --- .../OrganizationDotnetController.ts | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) 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: {