Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop

This commit is contained in:
Kittapath 2024-06-26 00:07:04 +07:00
commit c53431f25b
2 changed files with 182 additions and 25 deletions

View file

@ -2818,57 +2818,57 @@ export class PositionController extends Controller {
typeCondition = {
orgRootId: body.nodeId,
orgChild1Id: IsNull(),
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 1) {
typeCondition = {
orgChild1Id: body.nodeId,
orgChild2Id: IsNull(),
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 2) {
typeCondition = {
orgChild2Id: body.nodeId,
orgChild3Id: IsNull(),
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 3) {
typeCondition = {
orgChild3Id: body.nodeId,
orgChild4Id: IsNull(),
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 4) {
typeCondition = {
orgChild4Id: body.nodeId,
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
}
} else {
if (body.node === 0) {
typeCondition = {
orgRootId: body.nodeId,
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 1) {
typeCondition = {
orgChild1Id: body.nodeId,
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 2) {
typeCondition = {
orgChild2Id: body.nodeId,
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 3) {
typeCondition = {
orgChild3Id: body.nodeId,
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
} else if (body.node === 4) {
typeCondition = {
orgChild4Id: body.nodeId,
current_holderId: body.isBlank == true ? IsNull() : Not(IsNull()),
current_holderId: body.isBlank == true ?? IsNull(),
};
}
}