Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m0s

This commit is contained in:
Adisak 2025-12-22 17:15:12 +07:00
commit d768f24754

View file

@ -5106,7 +5106,7 @@ export class OrganizationDotnetController extends Controller {
) { ) {
let typeCondition: any = {}; let typeCondition: any = {};
if (body.role === "CHILD" || body.role === "PARENT" || body.role === "BROTHER") { if (body.role === "CHILD" || body.role === "PARENT" || body.role === "BROTHER") {
if (body.role === "CHILD" || body.role === "BROTHER") { if (body.role === "CHILD") {
switch (body.node) { switch (body.node) {
case 0: case 0:
typeCondition = { typeCondition = {
@ -5147,6 +5147,47 @@ export class OrganizationDotnetController extends Controller {
typeCondition = {}; typeCondition = {};
break; 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") { } else if (body.role === "PARENT") {
typeCondition = { typeCondition = {
orgRoot: { orgRoot: {