แก้ไขสิทธิ์ PARENT ให้เห็นข้อมูลทั้งหมดทุกหน่วยงาน #54
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m18s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m18s
This commit is contained in:
parent
da75287882
commit
caacf07c76
14 changed files with 113 additions and 79 deletions
|
|
@ -157,8 +157,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
condition = "orgRoot.ancestorDNA = :nodeId";
|
||||
conditionParams = { nodeId: body.nodeId };
|
||||
} else if (body.role === "PARENT") {
|
||||
condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
|
||||
conditionParams = { nodeId: body.nodeId };
|
||||
// condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
|
||||
// conditionParams = { nodeId: body.nodeId };
|
||||
} else if (body.role === "NORMAL") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -298,8 +298,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
condition = "orgRoot.ancestorDNA = :nodeId";
|
||||
conditionParams = { nodeId: body.nodeId };
|
||||
} else if (body.role === "PARENT") {
|
||||
condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
|
||||
conditionParams = { nodeId: body.nodeId };
|
||||
// condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
|
||||
// conditionParams = { nodeId: body.nodeId };
|
||||
} else if (body.role === "NORMAL") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -5743,7 +5743,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 === "PARENT" ||*/ body.role === "BROTHER") {
|
||||
if (body.role === "CHILD") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -5785,7 +5785,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "BROTHER") {
|
||||
}
|
||||
else if (body.role === "BROTHER") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -5826,15 +5827,16 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "PARENT") {
|
||||
typeCondition = {
|
||||
orgRoot: {
|
||||
ancestorDNA: body.nodeId,
|
||||
},
|
||||
orgChild1: Not(IsNull()),
|
||||
};
|
||||
}
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT") {
|
||||
}
|
||||
// else if (body.role === "PARENT") {
|
||||
// typeCondition = {
|
||||
// orgRoot: {
|
||||
// ancestorDNA: body.nodeId,
|
||||
// },
|
||||
// orgChild1: Not(IsNull()),
|
||||
// };
|
||||
// }
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT" || body.role === "PARENT") {
|
||||
switch (body.reqNode) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -6390,7 +6392,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 === "PARENT" ||*/ body.role === "BROTHER") {
|
||||
if (body.role === "CHILD") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -6432,7 +6434,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "BROTHER") {
|
||||
}
|
||||
else if (body.role === "BROTHER") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -6473,15 +6476,16 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "PARENT") {
|
||||
typeCondition = {
|
||||
orgRoot: {
|
||||
ancestorDNA: body.nodeId,
|
||||
},
|
||||
orgChild1: Not(IsNull()),
|
||||
};
|
||||
}
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT") {
|
||||
}
|
||||
// else if (body.role === "PARENT") {
|
||||
// typeCondition = {
|
||||
// orgRoot: {
|
||||
// ancestorDNA: body.nodeId,
|
||||
// },
|
||||
// orgChild1: Not(IsNull()),
|
||||
// };
|
||||
// }
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT" || body.role === "PARENT") {
|
||||
switch (body.reqNode) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -7800,7 +7804,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 === "PARENT" ||*/ body.role === "BROTHER") {
|
||||
if (body.role === "CHILD") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -7832,7 +7836,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "BROTHER") {
|
||||
}
|
||||
else if (body.role === "BROTHER") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -7863,13 +7868,14 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "PARENT") {
|
||||
typeCondition = {
|
||||
rootDnaId: body.nodeId,
|
||||
child1DnaId: Not(IsNull()),
|
||||
};
|
||||
}
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT") {
|
||||
}
|
||||
// else if (body.role === "PARENT") {
|
||||
// typeCondition = {
|
||||
// rootDnaId: body.nodeId,
|
||||
// child1DnaId: Not(IsNull()),
|
||||
// };
|
||||
// }
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT" || body.role === "PARENT") {
|
||||
switch (body.reqNode) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -8025,7 +8031,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 === "PARENT" ||*/ body.role === "BROTHER") {
|
||||
if (body.role === "CHILD") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -8067,7 +8073,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "BROTHER") {
|
||||
}
|
||||
else if (body.role === "BROTHER") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -8108,15 +8115,16 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "PARENT") {
|
||||
typeCondition = {
|
||||
orgRoot: {
|
||||
ancestorDNA: body.nodeId,
|
||||
},
|
||||
orgChild1: Not(IsNull()),
|
||||
};
|
||||
}
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT") {
|
||||
}
|
||||
// else if (body.role === "PARENT") {
|
||||
// typeCondition = {
|
||||
// orgRoot: {
|
||||
// ancestorDNA: body.nodeId,
|
||||
// },
|
||||
// orgChild1: Not(IsNull()),
|
||||
// };
|
||||
// }
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT" || body.role === "PARENT") {
|
||||
switch (body.reqNode) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -8369,7 +8377,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 === "PARENT" ||*/ body.role === "BROTHER") {
|
||||
if (body.role === "CHILD") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
|
|
@ -8401,7 +8409,8 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "BROTHER") {
|
||||
}
|
||||
else if (body.role === "BROTHER") {
|
||||
switch (body.node) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
@ -8432,13 +8441,14 @@ export class OrganizationDotnetController extends Controller {
|
|||
typeCondition = {};
|
||||
break;
|
||||
}
|
||||
} else if (body.role === "PARENT") {
|
||||
typeCondition = {
|
||||
rootDnaId: body.nodeId,
|
||||
child1DnaId: Not(IsNull()),
|
||||
};
|
||||
}
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT") {
|
||||
}
|
||||
// else if (body.role === "PARENT") {
|
||||
// typeCondition = {
|
||||
// rootDnaId: body.nodeId,
|
||||
// child1DnaId: Not(IsNull()),
|
||||
// };
|
||||
// }
|
||||
} else if (body.role === "OWNER" || body.role === "ROOT" || body.role === "PARENT") {
|
||||
switch (body.reqNode) {
|
||||
case 0:
|
||||
typeCondition = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue