make first step approved by default

This commit is contained in:
Joao Correia
2025-02-09 15:44:37 +00:00
parent 769b1b39d3
commit 6f6c5a4209

View File

@@ -55,6 +55,9 @@ export async function createApprovalWorkflowOnExamCreation(examAuthor: string, e
configuredWorkflow.examId = examId;
configuredWorkflow.entityId = entity;
configuredWorkflow.startDate = Date.now();
configuredWorkflow.steps[0].completed = true;
configuredWorkflow.steps[0].completedBy = examAuthor;
configuredWorkflow.steps[0].completedDate = Date.now();
try {
await createApprovalWorkflow("active-workflows", configuredWorkflow);