- Filter available form intakers so that no form intaker can be in two workflows at once.

- add getApprovalWorkflowByIntaker to prepare workflow start after exam creation.
- fix builder bug with step keys
- ignore edit view for now because it will only be available for active workflows and not configured workflows.
This commit is contained in:
Joao Correia
2025-02-02 22:40:05 +00:00
parent 16545d2075
commit 835a9bee03
5 changed files with 97 additions and 31 deletions

View File

@@ -31,7 +31,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
const configuredWorkflows: ApprovalWorkflow[] = filteredWorkflows;
const entitiesIds: string[] = userEntitiesWithLabel.map((e) => e.id);
await replaceApprovalWorkflowsByEntities("configured-workflows", configuredWorkflows, entitiesIds);
await replaceApprovalWorkflowsByEntities(configuredWorkflows, entitiesIds);
return res.status(201).json({ ok: true });
}