feat: Show toast when saving workflow sharing settings (#4684)

This commit is contained in:
Alex Grozav 2022-11-22 13:26:03 +02:00 committed by GitHub
parent 173badc4e0
commit 6f8d0de55d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View file

@ -205,9 +205,20 @@ export default mixins(
});
};
const workflowId = await saveWorkflowPromise();
await this.workflowsEEStore.saveWorkflowSharedWith({ workflowId, sharedWith: this.sharedWith });
this.loading = false;
try {
const workflowId = await saveWorkflowPromise();
await this.workflowsEEStore.saveWorkflowSharedWith({ workflowId, sharedWith: this.sharedWith });
this.$showMessage({
title: this.$locale.baseText('workflows.shareModal.onSave.success.title'),
type: 'success',
});
} catch (error) {
this.$showError(error, this.$locale.baseText('workflows.shareModal.onSave.error.title'));
} finally {
this.modalBus.$emit('close');
this.loading = false;
}
},
async onAddSharee(userId: string) {
const { id, firstName, lastName, email } = this.usersStore.getUserById(userId)!;

View file

@ -1378,6 +1378,8 @@
"workflows.shareModal.list.delete.confirm.message": "<strong>This might cause the workflow to stop working:</strong> if {name} is the only user with access to credentials used in this workflow, those credentials will also be removed from {workflow}.",
"workflows.shareModal.list.delete.confirm.confirmButtonText": "Remove access",
"workflows.shareModal.list.delete.confirm.cancelButtonText": "Cancel",
"workflows.shareModal.onSave.success.title": "Workflow sharing settings have been saved",
"workflows.shareModal.onSave.error.title": "There was a problem saving sharing settings",
"workflows.shareModal.saveBeforeClose.title": "Save sharing changes?",
"workflows.shareModal.saveBeforeClose.message": "You have unsaved changes. Do you want to save them before closing?",
"workflows.shareModal.saveBeforeClose.confirmButtonText": "Save",