mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-13 02:54:27 +00:00
avoid prompt to save if no save button (#1806)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
This commit is contained in:
parent
5e3831f4d6
commit
ce6dc339c8
@ -16,13 +16,13 @@ users:
|
|||||||
preferred_username: dan
|
preferred_username: dan
|
||||||
groups:
|
groups:
|
||||||
admin:
|
admin:
|
||||||
users: [admin@spiffworkflow.org, nelson@spiffworkflow.org]
|
users: [admin@example.com, nelson@example.com]
|
||||||
group1:
|
group1:
|
||||||
users: [jason@sartography.com, kevin@sartography.com]
|
users: [jason@example.com, kevin@example.com]
|
||||||
group2:
|
group2:
|
||||||
users: [dan@sartography.com]
|
users: [dan@example.com]
|
||||||
group3:
|
group3:
|
||||||
users: [jon@sartography.com]
|
users: [jon@example.com]
|
||||||
spiff_public:
|
spiff_public:
|
||||||
users: []
|
users: []
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ import {
|
|||||||
} from '@carbon/icons-react';
|
} from '@carbon/icons-react';
|
||||||
import { gray } from '@carbon/colors';
|
import { gray } from '@carbon/colors';
|
||||||
|
|
||||||
|
import { Can } from '@casl/react';
|
||||||
import Editor, { DiffEditor } from '@monaco-editor/react';
|
import Editor, { DiffEditor } from '@monaco-editor/react';
|
||||||
import MDEditor from '@uiw/react-md-editor';
|
import MDEditor from '@uiw/react-md-editor';
|
||||||
import HttpService from '../services/HttpService';
|
import HttpService from '../services/HttpService';
|
||||||
@ -1372,14 +1373,16 @@ export default function ProcessModelEditDiagram() {
|
|||||||
const unsavedChangesMessage = () => {
|
const unsavedChangesMessage = () => {
|
||||||
if (diagramHasChanges) {
|
if (diagramHasChanges) {
|
||||||
return (
|
return (
|
||||||
<Notification
|
<Can I="PUT" a={targetUris.processModelFileShowPath} ability={ability}>
|
||||||
title="Unsaved changes."
|
<Notification
|
||||||
type="error"
|
title="Unsaved changes."
|
||||||
hideCloseButton
|
type="error"
|
||||||
data-qa="process-model-file-changed"
|
hideCloseButton
|
||||||
>
|
data-qa="process-model-file-changed"
|
||||||
Please save to avoid losing your work.
|
>
|
||||||
</Notification>
|
Please save to avoid losing your work.
|
||||||
|
</Notification>
|
||||||
|
</Can>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user