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
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)!;