Skip to content
Snippets Groups Projects

Resolve "Add date to timetable overview page route (like on calendar page)"

All threads resolved!
1 file
+ 7
1
Compare changes
  • Side-by-side
  • Inline
@@ -11,6 +11,7 @@ export default {
return {
calendarFocus: "",
calendarType: "week",
initialRouteFocusSet: false,
};
},
methods: {
@@ -29,6 +30,7 @@ export default {
this.$vuetify.breakpoint.mdAndDown ? "day" : "week",
);
} else {
this.initialRouteFocusSet = true;
this.$refs.calendarWithControls.setCalendarFocus(
[
this.$route.params.year,
@@ -47,7 +49,11 @@ export default {
// Do not redirect on first page load
if (oldValue === "") return;
// FIXME: avoid duplicate navigation on first page load when route params already contain date
// Do not redirect when calendar focus was just set with route param values
if (this.initialRouteFocusSet) {
this.initialRouteFocusSet = false;
return;
}
const [year, month, day] = newValue.split("-");
this.$router.push({
Loading