From 8d0b3a715eb446db2f9d09a8e67bc398ba6632ac Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Sun, 14 May 2017 12:07:54 +0200 Subject: [PATCH] Show data for monday on sunday --- src/App.vue | 2 +- src/components/Mensa.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index b4f7714..241fba7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -40,7 +40,7 @@ export default { 6: 'Samstag' }, where: 'zentralmensa', - when: '' + new Date().getDay() + when: '' + (new Date().getDay() || 1) } }, watch: { diff --git a/src/components/Mensa.vue b/src/components/Mensa.vue index 496afee..4efcb78 100644 --- a/src/components/Mensa.vue +++ b/src/components/Mensa.vue @@ -30,7 +30,7 @@ export default { this.$router.replace(this.$route.fullPath + '/') } if (!this.$route.params.tag) { - this.$router.push('' + new Date().getDay()) + this.$router.push('' + (new Date().getDay() || 1)) } this.loadMeals() } @@ -43,7 +43,7 @@ export default { } }, created () { - this.$router.replace(`/zentralmensa/${new Date().getDay()}`) + this.$router.replace(`/zentralmensa/${new Date().getDay() || 1}`) this.loadMeals() } }