diff --git a/spiffworkflow-frontend/src/components/TaskListTable.tsx b/spiffworkflow-frontend/src/components/TaskListTable.tsx index 287742e9..26577b3b 100644 --- a/spiffworkflow-frontend/src/components/TaskListTable.tsx +++ b/spiffworkflow-frontend/src/components/TaskListTable.tsx @@ -36,6 +36,7 @@ type OwnProps = { showDateStarted?: boolean; showLastUpdated?: boolean; hideIfNoTasks?: boolean; + canCompleteAllTasks?: boolean; }; export default function TaskListTable({ @@ -56,6 +57,7 @@ export default function TaskListTable({ showDateStarted = true, showLastUpdated = true, hideIfNoTasks = false, + canCompleteAllTasks = false, }: OwnProps) { const [searchParams] = useSearchParams(); const [tasks, setTasks] = useState(null); @@ -128,7 +130,10 @@ export default function TaskListTable({ const regex = new RegExp(`\\b(${preferredUsername}|${userEmail})\\b`); let hasAccessToCompleteTask = false; - if ((processInstanceTask.potential_owner_usernames || '').match(regex)) { + if ( + canCompleteAllTasks || + (processInstanceTask.potential_owner_usernames || '').match(regex) + ) { hasAccessToCompleteTask = true; } const rowElements = []; diff --git a/spiffworkflow-frontend/src/components/TasksWaitingForMyGroups.tsx b/spiffworkflow-frontend/src/components/TasksWaitingForMyGroups.tsx index dab0372b..1a07be72 100644 --- a/spiffworkflow-frontend/src/components/TasksWaitingForMyGroups.tsx +++ b/spiffworkflow-frontend/src/components/TasksWaitingForMyGroups.tsx @@ -29,6 +29,7 @@ export default function TasksWaitingForMyGroups() { textToShowIfEmpty="This group has no task assignments at this time." autoReload showWaitingOn={false} + canCompleteAllTasks /> ); }); diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx index 94775671..b7ffedb1 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx @@ -1111,6 +1111,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { showDateStarted={false} showLastUpdated={false} hideIfNoTasks + canCompleteAllTasks />