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

This commit is contained in:
Adisak 2025-12-22 17:06:24 +07:00
commit 0412e89fe5

View file

@ -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: {