From 02195b84f857589865fd572df0aa335739e9c213 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 9 Nov 2022 13:19:01 -0500 Subject: [PATCH] fix breadcrumb --- .../src/routes/ProcessInstanceList.tsx | 3 -- .../src/routes/ProcessInstanceShow.tsx | 11 ++++-- .../src/routes/ProcessModelEditDiagram.tsx | 37 ++++++++----------- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx index ad77f002..04fcfd87 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx @@ -20,9 +20,6 @@ import { TableHeader, TableHead, TableRow, - TableBody, - TableCell, - Row, // @ts-ignore } from '@carbon/react'; import { PROCESS_STATUSES, DATE_FORMAT, DATE_FORMAT_CARBON } from '../config'; diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx index bd20ac31..f04ddda6 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx @@ -443,9 +443,14 @@ export default function ProcessInstanceShow() { return ( <>

Process Instance Id: {processInstanceToUse.id}

diff --git a/spiffworkflow-frontend/src/routes/ProcessModelEditDiagram.tsx b/spiffworkflow-frontend/src/routes/ProcessModelEditDiagram.tsx index 7d539c33..a60a42f0 100644 --- a/spiffworkflow-frontend/src/routes/ProcessModelEditDiagram.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessModelEditDiagram.tsx @@ -684,39 +684,34 @@ export default function ProcessModelEditDiagram() { * fixme: Not currently in use. This would only work for bpmn files within the process model. Which is right for DMN and json, but not right here. Need to merge in work on the nested process groups before tackling this. * @param processId */ + + const fileNameTemplatePath = + '/admin/process-models/:process_model_id/files/:file_name'; + const onLaunchBpmnEditor = (processId: string) => { const file = findFileNameForReferenceId(processId, 'bpmn'); if (file) { - const path = generatePath( - '/admin/process-models/:process_model_id/files/:file_name', - { - process_model_id: params.process_model_id, - file_name: file.name, - } - ); + const path = generatePath(fileNameTemplatePath, { + process_model_id: params.process_model_id, + file_name: file.name, + }); window.open(path); } }; const onLaunchJsonEditor = (fileName: string) => { - const path = generatePath( - '/admin/process-models/:process_model_id/files/:file_name', - { - process_model_id: params.process_model_id, - file_name: fileName, - } - ); + const path = generatePath(fileNameTemplatePath, { + process_model_id: params.process_model_id, + file_name: fileName, + }); window.open(path); }; const onLaunchDmnEditor = (processId: string) => { const file = findFileNameForReferenceId(processId, 'dmn'); if (file) { - const path = generatePath( - '/admin/process-models/:process_model_id/files/:file_name', - { - process_model_id: params.process_model_id, - file_name: file.name, - } - ); + const path = generatePath(fileNameTemplatePath, { + process_model_id: params.process_model_id, + file_name: file.name, + }); window.open(path); } };