-
+
+
+
+
-
-
-
+
+
+
+
+
+ {{ location.short }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/basta/src/components/food/SingleFood.vue b/basta/src/components/food/SingleFood.vue
index 0e63c3b..c8a321e 100644
--- a/basta/src/components/food/SingleFood.vue
+++ b/basta/src/components/food/SingleFood.vue
@@ -1,7 +1,7 @@
-
+
@@ -13,23 +13,34 @@
alt="Bild" width="80px">
-
-
- {{ food.name }}
-
-
-
+
+
+
+
+ {{ food.name }}
+
+
+
+
+
+
+
+
+
+ {{ food.price_student }} €
+
+
+
- {{ food.price_student }}
@@ -43,21 +54,27 @@
export default {
name: "SingleMenu",
- props: ['food', 'title', 'defaultImageUrl'],
+ props: ['food', 'title'],
components: {FaRating},
data() {
return {
userRating: this.food.rating,
star: '',
};
- }, created() {
+ },
+ computed: {
+ defaultImageUrl() {
+ return this.$store.getters.getDefaultImageLocation
+ },
+ },
+ created() {
// register the icon
this.star = Star;
// console.log(this.food.rating);
// this.userRating = this.food.rating;
},
watch: {
- userRating: function (newRating) {
+ userRating: function (newRating, oldRating) {
if (authentication.authenticated()) {
let url = CONFIG.API_ROOT_FOOD.concat('/meals/').concat(this.food.id).concat('/rating');
window.axios
@@ -68,6 +85,7 @@
}
)
.catch();
+ console.log(oldRating);
} else {
router.push({name: 'login'})
}
diff --git a/basta/src/components/food/TabMenu.vue b/basta/src/components/food/TabMenu.vue
index b9fb0f5..f958118 100644
--- a/basta/src/components/food/TabMenu.vue
+++ b/basta/src/components/food/TabMenu.vue
@@ -1,12 +1,11 @@
-
-
{{ title }}
+
@@ -20,7 +19,7 @@
export default {
name: "TabMenu",
- props: ['title', 'location', 'defaultImageUrl'],
+ props: ['title', 'location'],
components: {DayMenu, WeekMenu},
data() {
return {
@@ -38,8 +37,6 @@
.concat('&startdate=').concat(today_yyyymmdd)
.concat('&enddate=').concat(today_yyyymmdd))
.then(response => {
- // JSON responses are automatically parsed.
-
console.log(JSON.parse(JSON.stringify(response.data)));
if (response.data.length == 1) {
this.dayMenu = response.data[0];
@@ -79,5 +76,8 @@
diff --git a/basta/src/components/food/WeekMenu.vue b/basta/src/components/food/WeekMenu.vue
index d4b9a5d..59528f8 100644
--- a/basta/src/components/food/WeekMenu.vue
+++ b/basta/src/components/food/WeekMenu.vue
@@ -1,8 +1,8 @@
-