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