-
-
-
- Monday
-
-
-
-
-
-
-
- {{ recipe.name }}
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('OnHand') }}
+
+
+
+ {{ $t('Ignore_Shopping') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('substitute_siblings') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('reset_children') }}
+
+
+ {{ $t('Save') }}
+
-
-
@@ -58,6 +109,8 @@ import {BootstrapVue} from "bootstrap-vue"
import "bootstrap-vue/dist/bootstrap-vue.css"
import {ApiApiFactory} from "@/utils/openapi/api";
import RecipeCard from "@/components/RecipeCard.vue";
+import GenericMultiselect from "@/components/GenericMultiselect.vue";
+import {ApiMixin, StandardToasts} from "@/utils/utils";
Vue.use(BootstrapVue)
@@ -65,45 +118,38 @@ Vue.use(BootstrapVue)
export default {
name: "TestView",
- mixins: [],
- components: {RecipeCard},
+ mixins: [ApiMixin],
+ components: {
+ GenericMultiselect
+ },
data() {
return {
- recipe: undefined,
- recipe_detailed: false,
- meal_plan: undefined
+ food: undefined,
+
}
},
mounted() {
this.$i18n.locale = window.CUSTOM_LOCALE
let apiClient = new ApiApiFactory()
- apiClient.retrieveRecipe('119').then((r) => {
- this.recipe = r.data
- })
- apiClient.retrieveMealPlan('1').then((r) => {
- this.meal_plan = r.data
+ apiClient.retrieveFood('1').then((r) => {
+ this.food = r.data
})
+
+ },
+ methods: {
+ updateFood: function () {
+ let apiClient = new ApiApiFactory()
+ apiClient.updateFood(this.food.id, this.food).then((r) => {
+ this.food = r.data
+ StandardToasts.makeStandardToast(this, StandardToasts.SUCCESS_UPDATE)
+ }).catch(err => {
+ StandardToasts.makeStandardToast(this, StandardToasts.FAIL_UPDATE, err)
+ })
+ }
},
- methods: {},
}
diff --git a/vue/src/components/CookbookSlider.vue b/vue/src/components/CookbookSlider.vue
index 0a07bd587..f2ccbb9af 100644
--- a/vue/src/components/CookbookSlider.vue
+++ b/vue/src/components/CookbookSlider.vue
@@ -12,7 +12,7 @@
-
+
diff --git a/vue/src/components/GenericHorizontalCard.vue b/vue/src/components/GenericHorizontalCard.vue
index 6c01630f7..ed43a1a2d 100644
--- a/vue/src/components/GenericHorizontalCard.vue
+++ b/vue/src/components/GenericHorizontalCard.vue
@@ -23,9 +23,9 @@
{{ item[title] }}
-
- ({{ $t("plural_short") }}: {{ item[plural] }})
-
+
+ ({{ $t("plural_short") }}: {{ item[plural] }})
+
{{ item[subtitle] }}
{{ getFullname }}
diff --git a/vue/src/components/IngredientComponent.vue b/vue/src/components/IngredientComponent.vue
index cb5de51ce..7749c9de3 100644
--- a/vue/src/components/IngredientComponent.vue
+++ b/vue/src/components/IngredientComponent.vue
@@ -17,10 +17,7 @@
-
- {{ ingredient.unit.name }}
-
-
+
{{ ingredient.unit.name }}
@@ -38,10 +35,8 @@
v-if="ingredient.food.recipe !== null" target="_blank"
rel="noopener noreferrer">{{ ingredient.food.name }}
-
- {{ ingredient.food.name }}
-
-
+
+
{{ ingredient.food.name }}
@@ -84,7 +79,6 @@ export default {
props: {
ingredient: Object,
ingredient_factor: {type: Number, default: 1},
- use_plural:{type: Boolean, default: false},
detailed: {type: Boolean, default: true},
},
mixins: [ResolveUrlMixin],
diff --git a/vue/src/components/Modals/ShoppingModal.vue b/vue/src/components/Modals/ShoppingModal.vue
index 01b917890..47798de13 100644
--- a/vue/src/components/Modals/ShoppingModal.vue
+++ b/vue/src/components/Modals/ShoppingModal.vue
@@ -14,7 +14,6 @@
+ :servings="recipe.servings"/>
diff --git a/vue/src/components/StepComponent.vue b/vue/src/components/StepComponent.vue
index 11f5714d2..8b5fbfb8c 100644
--- a/vue/src/components/StepComponent.vue
+++ b/vue/src/components/StepComponent.vue
@@ -35,7 +35,7 @@
|