This commit is contained in:
Adisak 2025-12-22 17:14:56 +07:00
parent 0caec00c75
commit f605f59b6e

View file

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