Speiseplan der Mensen der Georg-August-Universität Göttingen https://mensa.schneider-hosting.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1016 B

<template>
<div class="hello">
<nav>
<router-link v-for="day in days" :to="'/' + $route.params.mensa + '/' + day" :key="day">{{dayOfWeek[day]}}</router-link>
</nav>
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'mensa',
data () {
return {
days: [1, 2, 3, 4, 5, 6],
dayOfWeek: {
1: 'Montag',
2: 'Dienstag',
3: 'Mittwoch',
4: 'Donnerstag',
5: 'Freitag',
6: 'Samstag'
}
}
},
watch: {
'$route': function () {
if (!this.$route.fullPath.endsWith('/')) {
this.$router.replace(this.$route.fullPath + '/')
}
if (!this.$route.params.tag) {
this.$router.push('' + new Date().getDay())
}
}
},
mounted () {
if (!this.$route.fullPath.endsWith('/')) {
this.$router.replace(this.$route.fullPath + '/')
}
if (!this.$route.params.tag) {
this.$router.push('' + new Date().getDay())
}
}
}
</script>
<style></style>