Add query parameters for pre-defined (not) activated by filters

pull/27/head
Manuel Kasper 2025-02-17 17:45:18 +01:00
rodzic db846228ee
commit 644e6ce953
2 zmienionych plików z 14 dodań i 3 usunięć

Wyświetl plik

@ -116,6 +116,17 @@ export default {
}
},
mounted () {
if (this.$route.query.activatedBy) {
this.clearFilter()
this.activatedByEnabled = true
this.activatedBy = this.$route.query.activatedBy
this.$router.replace({ path: this.$route.path })
} else if (this.$route.query.notActivatedBy) {
this.clearFilter()
this.notActivatedByEnabled = true
this.notActivatedBy = this.$route.query.notActivatedBy
this.$router.replace({ path: this.$route.path })
}
this.updateFilter()
},
watch: {

Wyświetl plik

@ -406,10 +406,10 @@ export default {
if (this.summit && this.summit.code) {
hash = '#/summits/' + this.summit.code
}
let fullPath = url + hash
if (!this.leavingRoute && this.$router.currentRoute.fullPath !== fullPath) {
let path = url + hash
if (!this.leavingRoute && this.$router.currentRoute.path !== path) {
this.lastSetUrl = url
this.$router.replace(fullPath)
this.$router.replace({ path, query: this.$router.currentRoute.query })
}
}
},