This commit is contained in:
Adisak 2025-12-22 17:05:54 +07:00
parent a963841306
commit 0caec00c75

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