mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
fix bug when changing studiensemester on route search
This commit is contained in:
@@ -189,8 +189,15 @@ export default {
|
||||
'url_studiensemester_kurzbz': function (newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.studiensemesterKurzbz = newVal;
|
||||
this.$refs.stvList.updateUrl();
|
||||
this.$refs.details.reload();
|
||||
if(this.$route.name === 'search')
|
||||
{
|
||||
this.handleSearchUrl();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.$refs.stvList.updateUrl();
|
||||
this.$refs.details.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
'url_studiengang': function (newVal, oldVal) {
|
||||
@@ -298,9 +305,6 @@ export default {
|
||||
studiensemester_kurzbz: v
|
||||
}
|
||||
});
|
||||
|
||||
this.$refs.stvList.updateUrl();
|
||||
this.$refs.details.reload();
|
||||
},
|
||||
reloadList() {
|
||||
this.$refs.stvList.reload();
|
||||
@@ -325,26 +329,29 @@ export default {
|
||||
true
|
||||
);
|
||||
} else if (this.$route.params.searchstr) {
|
||||
const searchsettings = {
|
||||
searchstr: this.$route.params.searchstr,
|
||||
types: this.$route.params.types?.split('+') || []
|
||||
};
|
||||
|
||||
// init into student list
|
||||
this.$refs.stvList.updateUrl(
|
||||
ApiStv.students.search(searchsettings, this.studiensemesterKurzbz)
|
||||
);
|
||||
|
||||
// init into searchbar
|
||||
this.$refs.searchbar.searchsettings.searchstr = searchsettings.searchstr;
|
||||
this.$refs.searchbar.searchsettings.types = searchsettings.types;
|
||||
this.$nextTick(this.blurSearchbar);
|
||||
this.handleSearchUrl();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.clearTabulator();
|
||||
}
|
||||
},
|
||||
handleSearchUrl() {
|
||||
const searchsettings = {
|
||||
searchstr: this.$route.params.searchstr,
|
||||
types: this.$route.params.types?.split('+') || []
|
||||
};
|
||||
|
||||
// init into student list
|
||||
this.$refs.stvList.updateUrl(
|
||||
ApiStv.students.search(searchsettings, this.studiensemesterKurzbz)
|
||||
);
|
||||
|
||||
// init into searchbar
|
||||
this.$refs.searchbar.searchsettings.searchstr = searchsettings.searchstr;
|
||||
this.$refs.searchbar.searchsettings.types = searchsettings.types;
|
||||
this.$nextTick(this.blurSearchbar);
|
||||
},
|
||||
clearTabulator() {
|
||||
if(['index', 'studiensemester'].includes(this.$route.name))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user