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;
|
showDateStarted?: boolean;
|
||||||
showLastUpdated?: boolean;
|
showLastUpdated?: boolean;
|
||||||
hideIfNoTasks?: boolean;
|
hideIfNoTasks?: boolean;
|
||||||
|
canCompleteAllTasks?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function TaskListTable({
|
export default function TaskListTable({
|
||||||
|
@ -56,6 +57,7 @@ export default function TaskListTable({
|
||||||
showDateStarted = true,
|
showDateStarted = true,
|
||||||
showLastUpdated = true,
|
showLastUpdated = true,
|
||||||
hideIfNoTasks = false,
|
hideIfNoTasks = false,
|
||||||
|
canCompleteAllTasks = false,
|
||||||
}: OwnProps) {
|
}: OwnProps) {
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
const [tasks, setTasks] = useState<ProcessInstanceTask[] | null>(null);
|
const [tasks, setTasks] = useState<ProcessInstanceTask[] | null>(null);
|
||||||
|
@ -128,7 +130,10 @@ export default function TaskListTable({
|
||||||
|
|
||||||
const regex = new RegExp(`\\b(${preferredUsername}|${userEmail})\\b`);
|
const regex = new RegExp(`\\b(${preferredUsername}|${userEmail})\\b`);
|
||||||
let hasAccessToCompleteTask = false;
|
let hasAccessToCompleteTask = false;
|
||||||
if ((processInstanceTask.potential_owner_usernames || '').match(regex)) {
|
if (
|
||||||
|
canCompleteAllTasks ||
|
||||||
|
(processInstanceTask.potential_owner_usernames || '').match(regex)
|
||||||
|
) {
|
||||||
hasAccessToCompleteTask = true;
|
hasAccessToCompleteTask = true;
|
||||||
}
|
}
|
||||||
const rowElements = [];
|
const rowElements = [];
|
||||||
|
|
|
@ -29,6 +29,7 @@ export default function TasksWaitingForMyGroups() {
|
||||||
textToShowIfEmpty="This group has no task assignments at this time."
|
textToShowIfEmpty="This group has no task assignments at this time."
|
||||||
autoReload
|
autoReload
|
||||||
showWaitingOn={false}
|
showWaitingOn={false}
|
||||||
|
canCompleteAllTasks
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1111,6 +1111,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
showDateStarted={false}
|
showDateStarted={false}
|
||||||
showLastUpdated={false}
|
showLastUpdated={false}
|
||||||
hideIfNoTasks
|
hideIfNoTasks
|
||||||
|
canCompleteAllTasks
|
||||||
/>
|
/>
|
||||||
</Column>
|
</Column>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
Loading…
Reference in New Issue