renamed home page table headers and added filter table link to the completed instances page w/ burnettk

This commit is contained in:
jasquat 2023-05-01 15:52:11 -04:00
parent 3fbf184963
commit 817210cefa
No known key found for this signature in database
4 changed files with 40 additions and 49 deletions

View File

@ -1,16 +0,0 @@
import ProcessInstanceListTable from './ProcessInstanceListTable';
const paginationQueryParamPrefix = 'my_completed_instances';
export default function MyCompletedInstances() {
return (
<ProcessInstanceListTable
filtersEnabled={false}
paginationQueryParamPrefix={paginationQueryParamPrefix}
perPageOptions={[2, 5, 25]}
reportIdentifier="system_report_completed_instances_initiated_by_me"
showReports={false}
showActionsColumn
/>
);
}

View File

@ -1704,7 +1704,7 @@ export default function ProcessInstanceListTable({
} }
return ( return (
<Grid fullWidth condensed> <Grid fullWidth condensed>
<Column sm={{ span: 3 }} md={{ span: 4 }} lg={{ span: 3 }}> <Column sm={{ span: 3 }} md={{ span: 7 }} lg={{ span: 15 }}>
{headerElement} {headerElement}
</Column> </Column>
{filterButtonLink} {filterButtonLink}

View File

@ -19,12 +19,15 @@ export default function CompletedInstances() {
return userGroups.map((userGroup: string) => { return userGroups.map((userGroup: string) => {
const titleText = `This is a list of instances with tasks that were completed by the ${userGroup} group.`; const titleText = `This is a list of instances with tasks that were completed by the ${userGroup} group.`;
return ( const headerElement = (
<>
<h2 title={titleText} className="process-instance-table-header"> <h2 title={titleText} className="process-instance-table-header">
With tasks completed by <strong>{userGroup}</strong> Instances with tasks completed by <strong>{userGroup}</strong>
</h2> </h2>
);
return (
<ProcessInstanceListTable <ProcessInstanceListTable
headerElement={headerElement}
showLinkToReport
filtersEnabled={false} filtersEnabled={false}
paginationQueryParamPrefix="group_completed_instances" paginationQueryParamPrefix="group_completed_instances"
paginationClassName="with-large-bottom-margin" paginationClassName="with-large-bottom-margin"
@ -37,25 +40,33 @@ export default function CompletedInstances() {
]} ]}
showActionsColumn showActionsColumn
/> />
</>
); );
}); });
}; };
const startedByMeTitleText = const startedByMeTitleText =
'This is a list of instances you started that are now complete.'; 'This is a list of instances you started that are now complete.';
const startedByMeHeaderElement = (
<h2 title={startedByMeTitleText} className="process-instance-table-header">
Started by me
</h2>
);
const withTasksCompletedByMeTitleText = const withTasksCompletedByMeTitleText =
'This is a list of instances where you have completed tasks.'; 'This is a list of instances where you have completed tasks.';
const withTasksHeaderElement = (
<h2
title={withTasksCompletedByMeTitleText}
className="process-instance-table-header"
>
Instances with tasks completed by me
</h2>
);
return ( return (
<> <>
<h2
title={startedByMeTitleText}
className="process-instance-table-header"
>
Started by me
</h2>
<ProcessInstanceListTable <ProcessInstanceListTable
headerElement={startedByMeHeaderElement}
showLinkToReport
filtersEnabled={false} filtersEnabled={false}
paginationQueryParamPrefix="my_completed_instances" paginationQueryParamPrefix="my_completed_instances"
perPageOptions={[2, 5, 25]} perPageOptions={[2, 5, 25]}
@ -66,13 +77,9 @@ export default function CompletedInstances() {
autoReload autoReload
showActionsColumn showActionsColumn
/> />
<h2
title={withTasksCompletedByMeTitleText}
className="process-instance-table-header"
>
With tasks completed by me
</h2>
<ProcessInstanceListTable <ProcessInstanceListTable
headerElement={withTasksHeaderElement}
showLinkToReport
filtersEnabled={false} filtersEnabled={false}
paginationQueryParamPrefix="my_completed_tasks" paginationQueryParamPrefix="my_completed_tasks"
perPageOptions={[2, 5, 25]} perPageOptions={[2, 5, 25]}

View File

@ -22,7 +22,7 @@ export default function InProgressInstances() {
const titleText = `This is a list of instances with tasks that are waiting for the ${userGroup} group.`; const titleText = `This is a list of instances with tasks that are waiting for the ${userGroup} group.`;
const headerElement = ( const headerElement = (
<h2 title={titleText} className="process-instance-table-header"> <h2 title={titleText} className="process-instance-table-header">
Waiting for <strong>{userGroup}</strong> Instances with tasks waiting for <strong>{userGroup}</strong>
</h2> </h2>
); );
return ( return (
@ -61,7 +61,7 @@ export default function InProgressInstances() {
'This is a list of instances that have tasks that you can complete.'; 'This is a list of instances that have tasks that you can complete.';
const waitingForMeHeaderElement = ( const waitingForMeHeaderElement = (
<h2 title={waitingForMeTitleText} className="process-instance-table-header"> <h2 title={waitingForMeTitleText} className="process-instance-table-header">
Waiting for me Instances with tasks waiting for me
</h2> </h2>
); );