face เลือกหัวหน้าทั้งหน่วยงาน #1597
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m11s
This commit is contained in:
parent
ca5b11e36b
commit
db36b250e3
1 changed files with 41 additions and 32 deletions
|
|
@ -865,6 +865,7 @@ export class WorkflowController extends Controller {
|
||||||
type?: string | null;
|
type?: string | null;
|
||||||
sortBy?: string | null;
|
sortBy?: string | null;
|
||||||
descending?: boolean;
|
descending?: boolean;
|
||||||
|
isAllDirector?: boolean;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const userKeycloak = body.keycloakId ?? request.user.sub;
|
const userKeycloak = body.keycloakId ?? request.user.sub;
|
||||||
|
|
@ -953,6 +954,13 @@ export class WorkflowController extends Controller {
|
||||||
let mainConditions: any[] = [];
|
let mainConditions: any[] = [];
|
||||||
|
|
||||||
if (type.trim().toUpperCase() === "OPERATE" || body.type === "employee") {
|
if (type.trim().toUpperCase() === "OPERATE" || body.type === "employee") {
|
||||||
|
|
||||||
|
if (body.isAllDirector === true) {
|
||||||
|
mainConditions = [
|
||||||
|
{ ...baseCondition, orgRootId: In(roodIds) }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
mainConditions = [
|
mainConditions = [
|
||||||
{ ...baseCondition, orgRootId: In(roodIds), orgChild1Id: IsNull() },
|
{ ...baseCondition, orgRootId: In(roodIds), orgChild1Id: IsNull() },
|
||||||
{
|
{
|
||||||
|
|
@ -985,6 +993,7 @@ export class WorkflowController extends Controller {
|
||||||
orgChild4Id: posMasterUser.orgChild4Id,
|
orgChild4Id: posMasterUser.orgChild4Id,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
}
|
||||||
} else if (isLowLevel) {
|
} else if (isLowLevel) {
|
||||||
mainConditions = [
|
mainConditions = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue