updated some text for task tables w/ burnettk
This commit is contained in:
parent
bd88cd947e
commit
7a099eb68d
|
@ -1166,7 +1166,7 @@ paths:
|
|||
get:
|
||||
tags:
|
||||
- Process Instances
|
||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.user_groups_for_current_user
|
||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.user_group_list_for_current_user
|
||||
summary: Group identifiers for current logged in user
|
||||
responses:
|
||||
"200":
|
||||
|
|
|
@ -989,7 +989,7 @@ def process_instance_list(
|
|||
process_instance_query = process_instance_query.filter(
|
||||
SpiffLoggingModel.spiff_step == SpiffStepDetailsModel.spiff_step
|
||||
)
|
||||
if (group_identifier):
|
||||
if group_identifier:
|
||||
process_instance_query = process_instance_query.join(
|
||||
GroupModel,
|
||||
GroupModel.identifier == group_identifier,
|
||||
|
@ -1380,8 +1380,8 @@ def task_list_for_my_groups(
|
|||
)
|
||||
|
||||
|
||||
def user_groups_for_current_user() -> flask.wrappers.Response:
|
||||
"""User_groups_for_current_user."""
|
||||
def user_group_list_for_current_user() -> flask.wrappers.Response:
|
||||
"""User_group_list_for_current_user."""
|
||||
groups = g.user.groups
|
||||
# TODO: filter out the default group and have a way to know what is the default group
|
||||
group_identifiers = [i.identifier for i in groups if i.identifier != "everybody"]
|
||||
|
|
|
@ -27,15 +27,17 @@ type OwnProps = {
|
|||
autoReload?: boolean;
|
||||
showStartedBy?: boolean;
|
||||
showWaitingOn?: boolean;
|
||||
textToShowIfEmpty?: string;
|
||||
};
|
||||
|
||||
export default function TasksTable({
|
||||
export default function TaskListTable({
|
||||
apiPath,
|
||||
tableTitle,
|
||||
tableDescription,
|
||||
additionalParams,
|
||||
paginationQueryParamPrefix,
|
||||
paginationClassName,
|
||||
textToShowIfEmpty,
|
||||
autoReload = false,
|
||||
showStartedBy = true,
|
||||
showWaitingOn = true,
|
||||
|
@ -67,8 +69,9 @@ export default function TasksTable({
|
|||
};
|
||||
getTasks();
|
||||
if (autoReload) {
|
||||
refreshAtInterval(REFRESH_INTERVAL, REFRESH_TIMEOUT, getTasks);
|
||||
return refreshAtInterval(REFRESH_INTERVAL, REFRESH_TIMEOUT, getTasks);
|
||||
}
|
||||
return undefined;
|
||||
}, [
|
||||
searchParams,
|
||||
additionalParams,
|
||||
|
@ -164,7 +167,7 @@ export default function TasksTable({
|
|||
if (pagination && pagination.total < 1) {
|
||||
return (
|
||||
<p className="no-results-message with-large-bottom-margin">
|
||||
Your groups have no task assignments at this time.
|
||||
{textToShowIfEmpty}
|
||||
</p>
|
||||
);
|
||||
}
|
|
@ -1,15 +1,16 @@
|
|||
import TasksTable from './TasksTable';
|
||||
import TaskListTable from './TaskListTable';
|
||||
|
||||
const paginationQueryParamPrefix = 'tasks_for_my_open_processes';
|
||||
|
||||
export default function MyOpenProcesses() {
|
||||
return (
|
||||
<TasksTable
|
||||
<TaskListTable
|
||||
apiPath="/tasks/for-my-open-processes"
|
||||
paginationQueryParamPrefix={paginationQueryParamPrefix}
|
||||
tableTitle="My open instances"
|
||||
tableDescription="These tasks are for processes you started which are not complete. You may not have an action to take at this time. See below for tasks waiting on you."
|
||||
paginationClassName="with-large-bottom-margin"
|
||||
textToShowIfEmpty="There are no tasks for processes you started at this time."
|
||||
autoReload
|
||||
showStartedBy={false}
|
||||
/>
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import TasksTable from './TasksTable';
|
||||
import TaskListTable from './TaskListTable';
|
||||
|
||||
export default function TasksWaitingForMe() {
|
||||
return (
|
||||
<TasksTable
|
||||
<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}
|
||||
/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useEffect, useState } from 'react';
|
||||
import HttpService from '../services/HttpService';
|
||||
import TasksTable from './TasksTable';
|
||||
import TaskListTable from './TaskListTable';
|
||||
|
||||
export default function TasksWaitingForMyGroups() {
|
||||
const [userGroups, setUserGroups] = useState<string[] | null>(null);
|
||||
|
@ -19,13 +19,14 @@ export default function TasksWaitingForMyGroups() {
|
|||
|
||||
return userGroups.map((userGroup: string) => {
|
||||
return (
|
||||
<TasksTable
|
||||
<TaskListTable
|
||||
apiPath="/tasks/for-my-groups"
|
||||
additionalParams={`group_identifier=${userGroup}`}
|
||||
paginationQueryParamPrefix={`group-tasks-${userGroup}`}
|
||||
tableTitle={`Tasks waiting for ${userGroup} group`}
|
||||
tableDescription={`This is a list of tasks for the ${userGroup} group and can be completed by any member of the group.`}
|
||||
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}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue