From 9ae6b8e8941a7eb0ba62435f8ae03312008a9944 Mon Sep 17 00:00:00 2001 From: Joao Correia Date: Sun, 9 Feb 2025 16:55:50 +0000 Subject: [PATCH] make sure admin id is passed to step component if the admin is not assigned to the workflow but approved a step. --- src/pages/approval-workflows/[id]/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/approval-workflows/[id]/index.tsx b/src/pages/approval-workflows/[id]/index.tsx index 6cdaec9a..64a8026e 100644 --- a/src/pages/approval-workflows/[id]/index.tsx +++ b/src/pages/approval-workflows/[id]/index.tsx @@ -58,7 +58,13 @@ export const getServerSideProps = withIronSessionSsr(async ({ req, res, params } const allAssigneeIds: string[] = [ ...new Set( workflow.steps - .map(step => step.assignees) + .map((step) => { + const assignees = step.assignees; + if (step.completedBy) { + assignees.push(step.completedBy); + } + return assignees; + }) .flat() ) ];