0 && buildRecentProcessModelSection();
+ (recentProcessModels.length > 0 && buildRecentProcessModelSection()) ||
+ null;
if (pagination) {
+ if (tasksWaitingForMe === null && relevantProcessModelSection === null) {
+ return No tasks are waiting for you.
;
+ }
return (
<>
- {tasksWaitingForMeComponent()}
+ {tasksWaitingForMe}
{relevantProcessModelSection}
>
);
diff --git a/src/routes/MessageInstanceList.tsx b/src/routes/MessageInstanceList.tsx
index 6bc0a57d4..89bd6ac97 100644
--- a/src/routes/MessageInstanceList.tsx
+++ b/src/routes/MessageInstanceList.tsx
@@ -7,6 +7,8 @@ import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
import {
convertSecondsToFormattedDate,
getPageInfoFromSearchParams,
+ modifyProcessModelPath,
+ unModifyProcessModelPath,
} from '../helpers';
import HttpService from '../services/HttpService';
@@ -44,15 +46,9 @@ export default function MessageInstanceList() {
- {rowToUse.process_group_identifier}
-
- |
-
-
{rowToUse.process_model_identifier}
@@ -60,7 +56,9 @@ export default function MessageInstanceList() {
|
{rowToUse.process_instance_id}
@@ -80,7 +78,6 @@ export default function MessageInstanceList() {
Instance Id |
- Process Group |
Process Model |
Process Instance |
Message Model |
@@ -107,16 +104,29 @@ export default function MessageInstanceList() {
)}&process_instance_id=${searchParams.get('process_instance_id')}`;
breadcrumbElement = (
);
}
return (
<>
{breadcrumbElement}
- Messages
+ Messages
-
- Edit Process Group: {(processGroup as any).id}
+
+ Edit Process Group: {(processGroup as any).id}
({
id: '',
display_name: '',
description: '',
});
+ const hotCrumbs: HotCrumbItem[] = [['Process Groups', '/admin']];
+ if (parentGroupId) {
+ hotCrumbs.push(['', `process_group:${parentGroupId}:link`]);
+ }
+
return (
<>
-
- Add Process Group
+
+ Add Process Group
(null);
const [processModels, setProcessModels] = useState([]);
const [processGroups, setProcessGroups] = useState([]);
- const [pagination, setPagination] = useState(null);
+ const [modelPagination, setModelPagination] = useState(null);
+ const [groupPagination, setGroupPagination] = useState(null);
useEffect(() => {
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
const setProcessModelFromResult = (result: any) => {
setProcessModels(result.results);
- setPagination(result.pagination);
+ setModelPagination(result.pagination);
+ };
+ const setProcessGroupFromResult = (result: any) => {
+ setProcessGroups(result.results);
+ setGroupPagination(result.pagination);
};
const processResult = (result: any) => {
setProcessGroup(result);
@@ -33,7 +42,10 @@ export default function ProcessGroupShow() {
path: `/process-models?process_group_identifier=${unmodifiedProcessGroupId}&per_page=${perPage}&page=${page}`,
successCallback: setProcessModelFromResult,
});
- setProcessGroups(result.process_groups);
+ HttpService.makeCallToBackend({
+ path: `/process-groups?process_group_identifier=${unmodifiedProcessGroupId}&per_page=${perPage}&page=${page}`,
+ successCallback: setProcessGroupFromResult,
+ });
};
HttpService.makeCallToBackend({
path: `/process-groups/${params.process_group_id}`,
@@ -45,19 +57,19 @@ export default function ProcessGroupShow() {
if (processGroup === null) {
return null;
}
- const rows = processModels.map((row) => {
- const modifiedProcessModelId: String = (row as any).id.replace('/', ':');
+ const rows = processModels.map((row: ProcessModel) => {
+ const modifiedProcessModelId: String = modifyProcessModelPath((row as any).id);
return (
-
+
- {(row as any).id}
+ {row.id}
|
- {(row as any).display_name} |
+ {row.display_name} |
);
});
@@ -81,19 +93,19 @@ export default function ProcessGroupShow() {
if (processGroup === null) {
return null;
}
- const rows = processGroups.map((row) => {
- const modifiedProcessGroupId: String = modifyProcessModelPath((row as any).id);
+ const rows = processGroups.map((row: ProcessGroup) => {
+ const modifiedProcessGroupId: String = modifyProcessModelPath(row.id);
return (
-
+
- {(row as any).id}
+ {row.id}
|
- {(row as any).display_name} |
+ {row.display_name} |
);
});
@@ -113,15 +125,15 @@ export default function ProcessGroupShow() {
);
};
- if (processGroup && pagination) {
+ if (processGroup && groupPagination && modelPagination) {
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
- const modifiedProcessGroupId = modifyProcessModelPath((processGroup as any).id);
+ const modifiedProcessGroupId = modifyProcessModelPath(processGroup.id);
return (
<>
@@ -149,18 +161,18 @@ export default function ProcessGroupShow() {
>
diff --git a/src/routes/ProcessInstanceList.tsx b/src/routes/ProcessInstanceList.tsx
index 04fcfd875..b7c057344 100644
--- a/src/routes/ProcessInstanceList.tsx
+++ b/src/routes/ProcessInstanceList.tsx
@@ -41,6 +41,7 @@ import 'react-bootstrap-typeahead/css/Typeahead.css';
import 'react-bootstrap-typeahead/css/Typeahead.bs5.css';
import { PaginationObject, ProcessModel } from '../interfaces';
import ProcessModelSearch from '../components/ProcessModelSearch';
+import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
export default function ProcessInstanceList() {
const params = useParams();
@@ -471,26 +472,31 @@ export default function ProcessInstanceList() {
);
};
- const processInstanceTitleElement = () => {
+ const processInstanceBreadcrumbElement = () => {
const processModelFullIdentifier =
getProcessModelFullIdentifierFromSearchParams(searchParams);
if (processModelFullIdentifier === null) {
- return Process Instances;
+ return null;
}
+
return (
-
- Process Instances for:{' '}
-
- {processModelFullIdentifier}
-
-
+
);
};
+ const processInstanceTitleElement = () => {
+ return Process Instances;
+ };
+
const toggleShowFilterOptions = () => {
setShowFilterOptions(!showFilterOptions);
};
@@ -499,6 +505,7 @@ export default function ProcessInstanceList() {
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
return (
<>
+ {processInstanceBreadcrumbElement()}
{processInstanceTitleElement()}
{
- // return null;
const rows = processInstanceLogs.map((row) => {
const rowToUse = row as any;
- console.log(`rowToUse: ${rowToUse}`);
return (
{rowToUse.bpmn_process_identifier} |
@@ -57,7 +56,7 @@ export default function ProcessInstanceLogList() {
);
});
return (
-
+
Bpmn Process Identifier |
@@ -75,13 +74,25 @@ export default function ProcessInstanceLogList() {
};
if (pagination) {
+ console.log('params.process_model_id', params.process_model_id);
const { page, perPage } = getPageInfoFromSearchParams(searchParams);
return (
{
- navigate(
- `/admin/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/reports/${params.report_identifier}`
- );
+ navigate(`/admin/process-instances/reports/${params.report_identifier}`);
};
const navigateToProcessInstanceReports = (_result: any) => {
- navigate(
- `/admin/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/reports`
- );
+ navigate(`/admin/process-instances/reports`);
};
useEffect(() => {
@@ -111,8 +106,7 @@ export default function ProcessInstanceReportEdit() {
return (
<>
-
- Edit Process Instance Report: {params.report_identifier}
+ Edit Process Instance Report: {params.report_identifier}
{
HttpService.makeCallToBackend({
@@ -27,7 +22,7 @@ export default function ProcessInstanceReportList() {
{rowToUse.identifier}
@@ -49,15 +44,8 @@ export default function ProcessInstanceReportList() {
const headerStuff = (
<>
-
- Reports for Process Model: {params.process_model_id}
- | |