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
|
||||
groups:
|
||||
admin:
|
||||
users: [admin@spiffworkflow.org, nelson@spiffworkflow.org]
|
||||
users: [admin@example.com, nelson@example.com]
|
||||
group1:
|
||||
users: [jason@sartography.com, kevin@sartography.com]
|
||||
users: [jason@example.com, kevin@example.com]
|
||||
group2:
|
||||
users: [dan@sartography.com]
|
||||
users: [dan@example.com]
|
||||
group3:
|
||||
users: [jon@sartography.com]
|
||||
users: [jon@example.com]
|
||||
spiff_public:
|
||||
users: []
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import {
|
|||
} from '@carbon/icons-react';
|
||||
import { gray } from '@carbon/colors';
|
||||
|
||||
import { Can } from '@casl/react';
|
||||
import Editor, { DiffEditor } from '@monaco-editor/react';
|
||||
import MDEditor from '@uiw/react-md-editor';
|
||||
import HttpService from '../services/HttpService';
|
||||
|
@ -1372,14 +1373,16 @@ export default function ProcessModelEditDiagram() {
|
|||
const unsavedChangesMessage = () => {
|
||||
if (diagramHasChanges) {
|
||||
return (
|
||||
<Notification
|
||||
title="Unsaved changes."
|
||||
type="error"
|
||||
hideCloseButton
|
||||
data-qa="process-model-file-changed"
|
||||
>
|
||||
Please save to avoid losing your work.
|
||||
</Notification>
|
||||
<Can I="PUT" a={targetUris.processModelFileShowPath} ability={ability}>
|
||||
<Notification
|
||||
title="Unsaved changes."
|
||||
type="error"
|
||||
hideCloseButton
|
||||
data-qa="process-model-file-changed"
|
||||
>
|
||||
Please save to avoid losing your work.
|
||||
</Notification>
|
||||
</Can>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue