Everything works except refresh

This commit is contained in:
Erin
2020-07-09 16:54:50 -04:00
parent f4022c6cd5
commit ad1228e0ea
4 changed files with 87 additions and 16 deletions

View File

@@ -443,13 +443,28 @@ export default mixins(
} else if (key === 'workflow-settings') {
this.workflowSettingsDialogVisible = true;
} else if (key === 'workflow-new') {
this.$router.push({ name: 'NodeViewNew' });
const workflowId = this.$store.getters.workflowId;
const result = await this.dataHasChanged(workflowId);
if(result) {
const importConfirm = await this.confirmMessage(`When you switch workflows your current workflow changes will be lost.`, 'Save your Changes?', 'warning', 'Yes, switch workflows and forget changes');
if (importConfirm === true) {
this.$router.push({ name: 'NodeViewNew' });
this.$showMessage({
title: 'Workflow created',
message: 'A new workflow got created!',
type: 'success',
});
this.$showMessage({
title: 'Workflow created',
message: 'A new workflow got created!',
type: 'success',
});
}
} else {
this.$router.push({ name: 'NodeViewNew' });
this.$showMessage({
title: 'Workflow created',
message: 'A new workflow got created!',
type: 'success',
});
}
} else if (key === 'credentials-open') {
this.credentialOpenDialogVisible = true;
} else if (key === 'credentials-new') {