diff --git a/resources/js/components/PlanningComponent.vue b/resources/js/components/PlanningComponent.vue index 15f020c..bce9dac 100644 --- a/resources/js/components/PlanningComponent.vue +++ b/resources/js/components/PlanningComponent.vue @@ -277,6 +277,15 @@ export default { default: this.dDisplay = false } }, + resetModalFields() { + this.$set(this, 'currentType' , null) + this.$set(this, 'value' , { + label: null, + value: null + }) + this.$refs.type.value = '' + this.$refs.morph.value = '' + }, search (search = null) { this.$nextTick(() => { this.error = null @@ -357,10 +366,7 @@ export default { this.$refs.text.value = cellData.text this.$nextTick(() => { let route = null - this.value = { - label: null, - value: null - } + this.resetModalFields() switch(this.currentModel) { case 'tickets': this.dDisplay = true @@ -382,19 +388,6 @@ export default { break default: this.dDisplay = false } - if(route) { - axios.get(route).then(response => { - this.value = response.data - }).catch(error => { - if(error.response.status === 429) { - location.reload() - } - this.error = error - }).then(() => { - this.loading = false - }) - this.search() - } }) }, limitLines(e) {