users can always complete tasks on process instance show page and on task group table on home page w/ burnettk
This commit is contained in:
parent
4d81907966
commit
4d4e0c9a57
|
@ -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<ProcessInstanceTask[] | null>(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 = [];
|
||||
|
|
|
@ -29,6 +29,7 @@ export default function TasksWaitingForMyGroups() {
|
|||
textToShowIfEmpty="This group has no task assignments at this time."
|
||||
autoReload
|
||||
showWaitingOn={false}
|
||||
canCompleteAllTasks
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
|
|
@ -1111,6 +1111,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
showDateStarted={false}
|
||||
showLastUpdated={false}
|
||||
hideIfNoTasks
|
||||
canCompleteAllTasks
|
||||
/>
|
||||
</Column>
|
||||
</Grid>
|
||||
|
|
Loading…
Reference in New Issue