Refresh citation details if tool node changes, augment workflow loading alert.

This commit is contained in:
guerler
2021-10-14 08:40:16 -04:00
parent a8701a3402
commit 3adbb84e79
2 changed files with 18 additions and 9 deletions
+17 -9
View File
@@ -133,18 +133,26 @@ export default {
citations: [],
};
},
watch: {
id() {
this.loadCitations();
},
},
created() {
if (this.hasCitations) {
getCitations("tools", this.id)
.then((citations) => {
this.citations = citations;
})
.catch((e) => {
console.error(e);
});
}
this.loadCitations();
},
methods: {
loadCitations() {
if (this.hasCitations) {
getCitations("tools", this.id)
.then((citations) => {
this.citations = citations;
})
.catch((e) => {
console.error(e);
});
}
},
copyBibtex() {
var text = "";
this.citations.forEach((citation) => {
@@ -1,6 +1,7 @@
<template>
<span>
<b-alert variant="danger" show v-if="error">
<h5>Workflow cannot be executed. Please resolve the following issue:</h5>
{{ error }}
</b-alert>
<span v-else>