update(MyLv VueRouter History): update the currentSemester based on the studiensemester param of the VueRouter history

This commit is contained in:
SimonGschnell
2025-08-11 11:17:59 +02:00
parent 3c3038362a
commit 03397b7272
+6
View File
@@ -89,6 +89,12 @@ export default {
this.currentSemester = this.nearestSem;
});
},
beforeRouteUpdate(to, from, next){
if (to.params.studiensemester && this.studiensemester.filter(s => s.studiensemester_kurzbz == to.params.studiensemester).length && to.params.studiensemester != this.currentSemester)
this.currentSemester = to.params.studiensemester;
next();
},
template: `
<h2>{{$p.t('lehre/myLV')}}</h2>