mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-22 14:18:27 +00:00
remove unused task things
This commit is contained in:
parent
f359c5f90e
commit
5d4770f75e
@ -1,17 +0,0 @@
|
||||
import TaskListTable from './TaskListTable';
|
||||
|
||||
export default function TasksWaitingForMe() {
|
||||
return (
|
||||
<TaskListTable
|
||||
apiPath="/tasks/for-me"
|
||||
paginationQueryParamPrefix="tasks_waiting_for_me"
|
||||
tableTitle="Tasks waiting for me"
|
||||
tableDescription="These processes are waiting on you to complete the next task. All are processes created by others that are now actionable by you."
|
||||
paginationClassName="with-large-bottom-margin"
|
||||
textToShowIfEmpty="No tasks are waiting for you."
|
||||
autoReload
|
||||
showWaitingOn={false}
|
||||
canCompleteAllTasks
|
||||
/>
|
||||
);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import HttpService from '../services/HttpService';
|
||||
import TaskListTable from './TaskListTable';
|
||||
|
||||
export default function TasksWaitingForMyGroups() {
|
||||
const [userGroups, setUserGroups] = useState<string[] | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
HttpService.makeCallToBackend({
|
||||
path: `/user-groups/for-current-user`,
|
||||
successCallback: setUserGroups,
|
||||
});
|
||||
}, [setUserGroups]);
|
||||
|
||||
const tableComponents = () => {
|
||||
if (!userGroups) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return userGroups.map((userGroup: string) => {
|
||||
return (
|
||||
<TaskListTable
|
||||
apiPath="/tasks/for-my-groups"
|
||||
additionalParams={`user_group_identifier=${userGroup}`}
|
||||
paginationQueryParamPrefix={`group-tasks-${userGroup}`}
|
||||
tableTitle={`Tasks waiting for group: ${userGroup}`}
|
||||
tableDescription={`This is a list of tasks for the ${userGroup} group. They can be completed by any member of the group.`}
|
||||
paginationClassName="with-large-bottom-margin"
|
||||
textToShowIfEmpty="This group has no task assignments at this time."
|
||||
autoReload
|
||||
showWaitingOn={false}
|
||||
canCompleteAllTasks
|
||||
/>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
if (userGroups) {
|
||||
return <>{tableComponents()}</>;
|
||||
}
|
||||
return null;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user