instanciate all workflows configured for an exam author based on different entities.

This commit is contained in:
Joao Correia
2025-02-05 12:37:53 +00:00
parent f4c7961caa
commit 6692c201e4
9 changed files with 129 additions and 67 deletions

View File

@@ -22,9 +22,9 @@ export const getApprovalWorkflowsByEntities = async (collection: string, ids: st
.toArray();
};
export const getApprovalWorkflowByFormIntaker = async (/* entityId: string, */ formIntakerId: string) => {
export const getApprovalWorkflowByFormIntaker = async (entityId: string, formIntakerId: string) => {
return await db.collection<ApprovalWorkflow>("configured-workflows").findOne({
/* entityId, */
entityId,
steps: {
$elemMatch: {
stepNumber: 1,