warnings fix :)

This commit is contained in:
mohit-nagaraj 2024-10-08 09:10:36 +05:30
parent 72849de1b4
commit 56b3cf412b
No known key found for this signature in database
3 changed files with 22 additions and 29 deletions

View file

@ -33,27 +33,27 @@
import { Modal } from "bootstrap"; import { Modal } from "bootstrap";
export default { export default {
beforeRouteLeave(to, from, next) {
this.cleanupModal();
next();
},
props: {}, props: {},
emits: [ "added" ], emits: [ "added" ],
data: () => ({ data: () => ({
modal: null, modal: null,
groupName: null, groupName: null,
}), }),
mounted() {
this.modal = new Modal(this.$refs.modal);
},
watch: { watch: {
$route(to, from) { $route(to, from) {
this.cleanupModal(); this.cleanupModal();
} }
}, },
mounted() {
this.modal = new Modal(this.$refs.modal);
},
beforeUnmount() { beforeUnmount() {
this.cleanupModal(); this.cleanupModal();
}, },
beforeRouteLeave(to, from, next) {
this.cleanupModal();
next();
},
methods: { methods: {
/** /**
* Show the confirm dialog * Show the confirm dialog

View file

@ -105,6 +105,10 @@ export default {
components: { components: {
Confirm, Confirm,
}, },
beforeRouteLeave(to, from, next) {
this.cleanupModal();
next();
},
props: {}, props: {},
emits: [ "added" ], emits: [ "added" ],
data() { data() {
@ -125,26 +129,17 @@ export default {
} }
}; };
}, },
mounted() {
this.modal = new Modal(this.$refs.modal);
},
beforeRouteLeave(to, from, next) {
this.cleanupModal();
next();
},
watch: { watch: {
$route(to, from) { $route(to, from) {
this.cleanupModal(); this.cleanupModal();
} }
}, },
mounted() {
this.modal = new Modal(this.$refs.modal);
},
beforeUnmount() { beforeUnmount() {
this.cleanupModal(); this.cleanupModal();
}, },
methods: { methods: {
/** /**
* Show dialog to confirm deletion * Show dialog to confirm deletion

View file

@ -155,6 +155,10 @@ export default {
Tag, Tag,
VueMultiselect, VueMultiselect,
}, },
beforeRouteLeave(to, from, next) {
this.cleanupModal();
next();
},
props: { props: {
/** /**
* Array of tags to be pre-selected * Array of tags to be pre-selected
@ -244,21 +248,15 @@ export default {
}; };
}, },
}, },
mounted() {
this.modal = new Modal(this.$refs.modal);
this.getExistingTags();
},
beforeRouteLeave(to, from, next) {
this.cleanupModal();
next();
},
watch: { watch: {
$route(to, from) { $route(to, from) {
this.cleanupModal(); this.cleanupModal();
} }
}, },
mounted() {
this.modal = new Modal(this.$refs.modal);
this.getExistingTags();
},
beforeUnmount() { beforeUnmount() {
this.cleanupModal(); this.cleanupModal();
}, },