Minor fixes for the launch buttons.
This commit is contained in:
parent
dfff56e460
commit
ac1a972c73
|
@ -640,21 +640,13 @@ export default function ProcessModelEditDiagram() {
|
||||||
const markdownEditor = () => {
|
const markdownEditor = () => {
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
size="xl"
|
open={showMarkdownEditor}
|
||||||
show={showMarkdownEditor}
|
modalHeading={`Edit Markdown`}
|
||||||
onHide={handleMarkdownEditorClose}
|
primaryButtonText="Close"
|
||||||
|
onRequestSubmit={handleMarkdownEditorClose}
|
||||||
|
size="lg"
|
||||||
>
|
>
|
||||||
<Modal.Header closeButton>
|
<MDEditor height={500} highlightEnable={false} value={markdownText} onChange={setMarkdownText} />
|
||||||
<Modal.Title>Edit Markdown Content</Modal.Title>
|
|
||||||
</Modal.Header>
|
|
||||||
<Modal.Body>
|
|
||||||
<MDEditor value={markdownText} onChange={setMarkdownText} />
|
|
||||||
</Modal.Body>
|
|
||||||
<Modal.Footer>
|
|
||||||
<Button variant="secondary" onClick={handleMarkdownEditorClose}>
|
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
</Modal.Footer>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -684,33 +676,41 @@ export default function ProcessModelEditDiagram() {
|
||||||
* @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(fileNameTemplatePath, {
|
const path = generatePath(
|
||||||
process_model_id: params.process_model_id,
|
'/admin/process-models/:process_model_id/files/:file_name',
|
||||||
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(fileNameTemplatePath, {
|
const path = generatePath(
|
||||||
process_model_id: params.process_model_id,
|
'/admin/process-models/:process_model_id/form/:file_name',
|
||||||
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(fileNameTemplatePath, {
|
const path = generatePath(
|
||||||
process_model_id: params.process_model_id,
|
'/admin/process-models/:process_model_id/files/:file_name',
|
||||||
file_name: file.name,
|
{
|
||||||
});
|
process_model_id: params.process_model_id,
|
||||||
|
file_name: file.name,
|
||||||
|
}
|
||||||
|
);
|
||||||
window.open(path);
|
window.open(path);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue