fix breadcrumb

This commit is contained in:
burnettk 2022-11-09 13:19:01 -05:00
parent b96b4d1596
commit 02195b84f8
3 changed files with 24 additions and 27 deletions

View File

@ -20,9 +20,6 @@ import {
TableHeader, TableHeader,
TableHead, TableHead,
TableRow, TableRow,
TableBody,
TableCell,
Row,
// @ts-ignore // @ts-ignore
} from '@carbon/react'; } from '@carbon/react';
import { PROCESS_STATUSES, DATE_FORMAT, DATE_FORMAT_CARBON } from '../config'; import { PROCESS_STATUSES, DATE_FORMAT, DATE_FORMAT_CARBON } from '../config';

View File

@ -443,9 +443,14 @@ export default function ProcessInstanceShow() {
return ( return (
<> <>
<ProcessBreadcrumb <ProcessBreadcrumb
processModelId={processModelId} hotCrumbs={[
processGroupId={params.process_group_id} ['Process Groups', '/admin'],
linkProcessModel [
`Process Model: ${processModelId}`,
`process_model:${processModelId}:link`,
],
[`Process Instance: ${params.process_instance_id}`],
]}
/> />
<Stack orientation="horizontal" gap={3}> <Stack orientation="horizontal" gap={3}>
<h2>Process Instance Id: {processInstanceToUse.id}</h2> <h2>Process Instance Id: {processInstanceToUse.id}</h2>

View File

@ -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. * 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 * @param processId
*/ */
const fileNameTemplatePath =
'/admin/process-models/:process_model_id/files/:file_name';
const onLaunchBpmnEditor = (processId: string) => { const onLaunchBpmnEditor = (processId: string) => {
const file = findFileNameForReferenceId(processId, 'bpmn'); const file = findFileNameForReferenceId(processId, 'bpmn');
if (file) { if (file) {
const path = generatePath( const path = generatePath(fileNameTemplatePath, {
'/admin/process-models/:process_model_id/files/:file_name', process_model_id: params.process_model_id,
{ file_name: file.name,
process_model_id: params.process_model_id, });
file_name: file.name,
}
);
window.open(path); window.open(path);
} }
}; };
const onLaunchJsonEditor = (fileName: string) => { const onLaunchJsonEditor = (fileName: string) => {
const path = generatePath( const path = generatePath(fileNameTemplatePath, {
'/admin/process-models/:process_model_id/files/:file_name', process_model_id: params.process_model_id,
{ file_name: fileName,
process_model_id: params.process_model_id, });
file_name: fileName,
}
);
window.open(path); window.open(path);
}; };
const onLaunchDmnEditor = (processId: string) => { const onLaunchDmnEditor = (processId: string) => {
const file = findFileNameForReferenceId(processId, 'dmn'); const file = findFileNameForReferenceId(processId, 'dmn');
if (file) { if (file) {
const path = generatePath( const path = generatePath(fileNameTemplatePath, {
'/admin/process-models/:process_model_id/files/:file_name', process_model_id: params.process_model_id,
{ file_name: file.name,
process_model_id: params.process_model_id, });
file_name: file.name,
}
);
window.open(path); window.open(path);
} }
}; };