diff --git a/app/javascript/vue/dashboard/new_task.vue b/app/javascript/vue/dashboard/new_task.vue
index 3edee0e36..5743df771 100644
--- a/app/javascript/vue/dashboard/new_task.vue
+++ b/app/javascript/vue/dashboard/new_task.vue
@@ -49,10 +49,10 @@
-
@@ -116,11 +116,16 @@ export default {
userRoles: [],
taskName: '',
publicProject: false,
- defaultRole: null
+ defaultRole: null,
+ creatingTask: false
};
},
methods: {
createMyModule() {
+ if (this.creatingTask) return;
+
+ this.creatingTask = true;
+
axios.post(this.createUrl, {
my_module: {
name: this.taskName
@@ -137,6 +142,7 @@ export default {
}
})
.then((response) => {
+ this.creatingTask = false;
window.location.href = response.data.my_module_path;
});
},
@@ -151,6 +157,14 @@ export default {
this.selectedExperiment = value;
this.newExperimentName = label;
},
+ closeModal() {
+ $('#create-task-modal').modal('hide');
+ this.taskName = '';
+ this.selectedProject = null;
+ this.newProjectName = '';
+ this.selectedExperiment = null;
+ this.newExperimentName = '';
+ },
fetchUserRoles() {
axios.get(this.rolesUrl)
.then((response) => {
diff --git a/app/javascript/vue/shared/select_dropdown.vue b/app/javascript/vue/shared/select_dropdown.vue
index b4141969c..cae93d036 100644
--- a/app/javascript/vue/shared/select_dropdown.vue
+++ b/app/javascript/vue/shared/select_dropdown.vue
@@ -272,6 +272,9 @@ export default {
this.$refs.search?.focus();
});
}
+ },
+ urlParams() {
+ this.fetchOptions();
}
},
methods: {