diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue index d3e2f741dc426740088c946c9037a08ea621598e..c17d9772f6038b3ef06b824f25a8104016b20525 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue @@ -307,13 +307,8 @@ export default { // integrate into docsByDay } }, - gotoDate(date, scroll) { - // show + setDate(date) { this.$router.replace({ hash: date }) - console.log('hash', this.$route.hash); - // assure - this.assureDate(DateTime.fromISO(date)); - // scroll }, onIntersect(entries, observer) { const entry = entries[0]; @@ -325,7 +320,7 @@ export default { if (this.visible[0] > entry.target.dataset.date || this.visible.length === 0) { // coming is new first (top) date this.visible.unshift(entry.target.dataset.date); - console.log('current', this.visible[0]); + this.setDate(this.visible[0]); } else if (this.visible[this.visible.length -1] < entry.target.dataset.date) { // coming is new last (bottom) date this.visible.push(entry.target.dataset.date); @@ -340,7 +335,7 @@ export default { } else if (this.visible[0] === entry.target.dataset.date) { // first (top) visible date is going this.visible.shift() - console.log('current', this.visible[0]); + this.setDate(this.visible[0]); } else if (this.visible[this.visible.length - 1] === entry.target.dataset.date) { // last (bottom) visible date is going this.visible.pop()