This commit is contained in:
adisak 2025-10-21 15:27:41 +07:00
parent e59ccf88b3
commit 9ba31d40eb

View file

@ -4389,7 +4389,7 @@ export class OrganizationDotnetController extends Controller {
}, },
) { ) {
let typeCondition: any = {}; let typeCondition: any = {};
if (body.role === "CHILD" || body.role === "PARENT" || body.role === "ROOT") { if (body.role === "CHILD" || body.role === "PARENT") {
switch (body.node) { switch (body.node) {
case 0: case 0:
typeCondition = { typeCondition = {
@ -4516,6 +4516,12 @@ export class OrganizationDotnetController extends Controller {
typeCondition = {}; typeCondition = {};
break; break;
} }
} else if (body.role === "ROOT") {
typeCondition = {
orgRoot: {
ancestorDNA: body.nodeId,
},
};
} }
let profile = await this.profileRepo.find({ let profile = await this.profileRepo.find({