diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx index 9b6f1492a..279322a63 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx @@ -1,9 +1,4 @@ -import React, { - ReactComponentElement, - useContext, - useEffect, - useState, -} from 'react'; +import { useContext, useEffect, useState } from 'react'; import Editor from '@monaco-editor/react'; import { useParams, @@ -49,7 +44,6 @@ import { PermissionsToCheck, ProcessData, ProcessInstance, - ProcessInstanceMetadata, ProcessInstanceTask, } from '../interfaces'; import { usePermissionFetcher } from '../hooks/PermissionService'; @@ -167,11 +161,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { variant, ]); - // useEffect(() => { - // setTimeout(() => setDisplayDetails(!displayDetails), 1 * 2000); - // // setTimeout(() => setDisplayDetails(false), 1 * 6000); - // }, [displayDetails]); - const deleteProcessInstance = () => { HttpService.makeCallToBackend({ path: targetUris.processInstanceActionPath, @@ -295,38 +284,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { }); }; - const processMetadataDisplayArea = () => { - if ( - !processInstance || - (processInstance.process_metadata && - processInstance.process_metadata.length < 1) - ) { - return null; - } - const metadataComponents: any[] = []; - (processInstance.process_metadata || []).forEach( - (processInstanceMetadata: ProcessInstanceMetadata) => { - metadataComponents.push( - - - {processInstanceMetadata.key} - - - {processInstanceMetadata.value} - - - ); - } - ); - return ( - <> -
- {metadataComponents} - - ); - // return metadataComponents; - }; - const detailedViewElement = () => { if (!processInstance) { return null; @@ -374,15 +331,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { {processInstance.bpmn_version_control_type}) - - - Process model revision:{' '} - - - {processInstance.bpmn_version_control_identifier} ( - {processInstance.bpmn_version_control_type}) - - ); } @@ -400,68 +348,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { ); }; - let deets: any = null; - if (processInstance) { - if (displayDetails) { - deets = ( - <> - - - - - - Updated At:{' '} - - - {convertSecondsToFormattedDateTime( - processInstance.updated_at_in_seconds - )} - - - - - Created At:{' '} - - - {convertSecondsToFormattedDateTime( - processInstance.created_at_in_seconds - )} - - - - - Process model revision:{' '} - - - {processInstance.bpmn_version_control_identifier} ( - {processInstance.bpmn_version_control_type}) - - - - ); - } else { - deets = ( - - - - ); - } - } - const getInfoTag = () => { if (!processInstance) { return null; @@ -496,11 +382,8 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { statusIcon = ; } - const details = detailedViewElement(); - return ( <> - {/* Started By:{' '} @@ -520,7 +403,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { {currentEndDateTag} - */} Status:{' '} @@ -531,11 +413,8 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { - {/* detailedViewElement() */} - {deets} - {/* + {detailedViewElement()}
- */} @@ -1123,7 +1002,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { [`Process Instance Id: ${processInstance.id}`], ]} /> - {/*

Process Instance Id: {processInstance.id} @@ -1152,8 +1030,12 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { /> - */} {getInfoTag()} +
+ {taskUpdateDisplayArea()} + {processDataDisplayArea()} + {stepsElement()} +
- {/*
*/} - {/* {stepsElement()} */} - {/*
*/} - {taskUpdateDisplayArea()} - {processDataDisplayArea()}
);