Merge branch 'develop' into feature/unit-conversion
This commit is contained in:
@ -36,7 +36,7 @@ def delete_space_action(modeladmin, request, queryset):
|
|||||||
|
|
||||||
|
|
||||||
class SpaceAdmin(admin.ModelAdmin):
|
class SpaceAdmin(admin.ModelAdmin):
|
||||||
list_display = ('name', 'created_by', 'max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing', 'use_plural')
|
list_display = ('name', 'created_by', 'max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
|
||||||
search_fields = ('name', 'created_by__username')
|
search_fields = ('name', 'created_by__username')
|
||||||
list_filter = ('max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
|
list_filter = ('max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
|
||||||
date_hierarchy = 'created_at'
|
date_hierarchy = 'created_at'
|
||||||
|
@ -207,7 +207,7 @@
|
|||||||
v-if="!import_multiple">
|
v-if="!import_multiple">
|
||||||
|
|
||||||
<recipe-card :recipe="recipe_json" :detailed="false"
|
<recipe-card :recipe="recipe_json" :detailed="false"
|
||||||
:show_context_menu="false" :use_plural="use_plural"
|
:show_context_menu="false"
|
||||||
></recipe-card>
|
></recipe-card>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col>
|
<b-col>
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
<!-- model isn't paginated and loads in one API call -->
|
<!-- model isn't paginated and loads in one API call -->
|
||||||
<div v-if="!paginated">
|
<div v-if="!paginated">
|
||||||
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
|
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
|
||||||
:use_plural="use_plural"
|
|
||||||
:model="this_model" @item-action="startAction($event, 'left')"
|
:model="this_model" @item-action="startAction($event, 'left')"
|
||||||
@finish-action="finishAction"/>
|
@finish-action="finishAction"/>
|
||||||
</div>
|
</div>
|
||||||
@ -51,7 +50,6 @@
|
|||||||
<template v-slot:cards>
|
<template v-slot:cards>
|
||||||
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
|
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
|
||||||
:model="this_model"
|
:model="this_model"
|
||||||
:use_plural="use_plural"
|
|
||||||
@item-action="startAction($event, 'left')"
|
@item-action="startAction($event, 'left')"
|
||||||
@finish-action="finishAction"/>
|
@finish-action="finishAction"/>
|
||||||
</template>
|
</template>
|
||||||
@ -63,7 +61,6 @@
|
|||||||
<template v-slot:cards>
|
<template v-slot:cards>
|
||||||
<generic-horizontal-card v-for="i in items_right" v-bind:key="i.id" :item="i"
|
<generic-horizontal-card v-for="i in items_right" v-bind:key="i.id" :item="i"
|
||||||
:model="this_model"
|
:model="this_model"
|
||||||
:use_plural="use_plural"
|
|
||||||
@item-action="startAction($event, 'right')"
|
@item-action="startAction($event, 'right')"
|
||||||
@finish-action="finishAction"/>
|
@finish-action="finishAction"/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -572,7 +572,7 @@
|
|||||||
{{ $t("Enable_Amount") }}
|
{{ $t("Enable_Amount") }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<template v-if="use_plural">
|
|
||||||
<button type="button" class="dropdown-item"
|
<button type="button" class="dropdown-item"
|
||||||
v-if="!ingredient.always_use_plural_unit"
|
v-if="!ingredient.always_use_plural_unit"
|
||||||
@click="ingredient.always_use_plural_unit = true">
|
@click="ingredient.always_use_plural_unit = true">
|
||||||
@ -600,7 +600,7 @@
|
|||||||
<i class="fas fa-filter fa-fw"></i>
|
<i class="fas fa-filter fa-fw"></i>
|
||||||
{{ $t("Use_Plural_Food_Simple") }}
|
{{ $t("Use_Plural_Food_Simple") }}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
|
||||||
|
|
||||||
<button type="button" class="dropdown-item"
|
<button type="button" class="dropdown-item"
|
||||||
@click="copyTemplateReference(index, ingredient)">
|
@click="copyTemplateReference(index, ingredient)">
|
||||||
|
@ -90,7 +90,6 @@
|
|||||||
:ingredient_factor="ingredient_factor"
|
:ingredient_factor="ingredient_factor"
|
||||||
:servings="servings"
|
:servings="servings"
|
||||||
:header="true"
|
:header="true"
|
||||||
:use_plural="use_plural"
|
|
||||||
id="ingredient_container"
|
id="ingredient_container"
|
||||||
@checked-state-changed="updateIngredientCheckedState"
|
@checked-state-changed="updateIngredientCheckedState"
|
||||||
@change-servings="servings = $event"
|
@change-servings="servings = $event"
|
||||||
@ -124,7 +123,6 @@
|
|||||||
:step="s"
|
:step="s"
|
||||||
:ingredient_factor="ingredient_factor"
|
:ingredient_factor="ingredient_factor"
|
||||||
:index="index"
|
:index="index"
|
||||||
:use_plural="use_plural"
|
|
||||||
:start_time="start_time"
|
:start_time="start_time"
|
||||||
@update-start-time="updateStartTime"
|
@update-start-time="updateStartTime"
|
||||||
@checked-state-changed="updateIngredientCheckedState"
|
@checked-state-changed="updateIngredientCheckedState"
|
||||||
@ -228,7 +226,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
use_plural: false,
|
|
||||||
loading: true,
|
loading: true,
|
||||||
recipe: undefined,
|
recipe: undefined,
|
||||||
rootrecipe: undefined,
|
rootrecipe: undefined,
|
||||||
@ -251,10 +248,6 @@ export default {
|
|||||||
this.requestWakeLock()
|
this.requestWakeLock()
|
||||||
window.addEventListener('resize', this.handleResize);
|
window.addEventListener('resize', this.handleResize);
|
||||||
|
|
||||||
let apiClient = new ApiApiFactory()
|
|
||||||
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
|
|
||||||
this.use_plural = r.data.use_plural
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.destroyWakeLock()
|
this.destroyWakeLock()
|
||||||
|
@ -151,9 +151,6 @@
|
|||||||
<b-form-checkbox v-model="space.show_facet_count"> Facet Count</b-form-checkbox>
|
<b-form-checkbox v-model="space.show_facet_count"> Facet Count</b-form-checkbox>
|
||||||
<span class="text-muted small">{{ $t('facet_count_info') }}</span><br/>
|
<span class="text-muted small">{{ $t('facet_count_info') }}</span><br/>
|
||||||
|
|
||||||
<b-form-checkbox v-model="space.use_plural">Use Plural form</b-form-checkbox>
|
|
||||||
<span class="text-muted small">{{ $t('plural_usage_info') }}</span><br/>
|
|
||||||
|
|
||||||
<label>{{ $t('FoodInherit') }}</label>
|
<label>{{ $t('FoodInherit') }}</label>
|
||||||
<generic-multiselect :initial_selection="space.food_inherit"
|
<generic-multiselect :initial_selection="space.food_inherit"
|
||||||
:model="Models.FOOD_INHERIT_FIELDS"
|
:model="Models.FOOD_INHERIT_FIELDS"
|
||||||
|
@ -1,52 +1,103 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<hr/>
|
<div class="row" v-if="food">
|
||||||
|
<div class="col-12">
|
||||||
<div class="row">
|
<h2>{{ food.name }}</h2>
|
||||||
<div class="col col-md-12">
|
|
||||||
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 0.5rem;row-gap: 1rem; grid-auto-rows: max-content; ">
|
|
||||||
<b-list-group v-for="x in Array(5).keys()" v-bind:key="x">
|
|
||||||
<b-list-group-item >
|
|
||||||
<h4>Monday </h4>
|
|
||||||
</b-list-group-item>
|
|
||||||
<b-list-group-item v-for="y in Array(Math.round(Math.random()*4) ).keys()" v-bind:key="y">
|
|
||||||
<div class="d-flex flex-row align-items-center">
|
|
||||||
<div>
|
|
||||||
<b-img style="height: 50px; width: 50px; object-fit: cover" src="http://127.0.0.1:8000/media/recipes/6a2fd228-c589-4a14-b21f-365bca3fbd94_119.png" rounded="circle"></b-img>
|
|
||||||
</div>
|
|
||||||
<div class="flex-grow-1 ml-2">
|
|
||||||
<span class="two-row-text">{{ recipe.name }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</b-list-group-item>
|
|
||||||
<b-list-group-item class="justify-content-center text-center">
|
|
||||||
<b-button><i class="fa fa-plus"></i></b-button>
|
|
||||||
</b-list-group-item>
|
|
||||||
</b-list-group>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12">
|
<div class="col-12">
|
||||||
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 0.5rem;row-gap: 1rem; grid-auto-rows: max-content; ">
|
<b-form v-if="food">
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
<b-form-group :label="$t('Name')" description="">
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
<b-form-input v-model="food.name"></b-form-input>
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
</b-form-group>
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
<b-form-group :label="$t('Plural')" description="">
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
<b-form-input v-model="food.plural_name"></b-form-input>
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
</b-form-group>
|
||||||
<recipe-card :recipe="recipe" :detailed="false"></recipe-card>
|
|
||||||
|
|
||||||
|
<b-form-group :label="$t('Recipe')" :description="$t('food_recipe_help')">
|
||||||
|
<generic-multiselect
|
||||||
|
@change="food.recipe = $event.val;"
|
||||||
|
:model="Models.RECIPE"
|
||||||
|
:initial_selection="food.recipe"
|
||||||
|
label="name"
|
||||||
|
:multiple="false"
|
||||||
|
:placeholder="$t('Recipe')"
|
||||||
|
></generic-multiselect>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-form-group :description="$t('OnHand_help')">
|
||||||
|
<b-form-checkbox v-model="food.food_onhand">{{ $t('OnHand') }}</b-form-checkbox>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-form-group :description="$t('ignore_shopping_help')">
|
||||||
|
<b-form-checkbox v-model="food.ignore_shopping">{{ $t('Ignore_Shopping') }}</b-form-checkbox>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-form-group :label="$t('Shopping_Category')" :description="$t('shopping_category_help')">
|
||||||
|
<generic-multiselect
|
||||||
|
@change="food.supermarket_category = $event.val;"
|
||||||
|
:model="Models.SHOPPING_CATEGORY"
|
||||||
|
:initial_selection="food.supermarket_category"
|
||||||
|
label="name"
|
||||||
|
:multiple="false"
|
||||||
|
:placeholder="$t('Shopping_Category')"
|
||||||
|
></generic-multiselect>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
<!-- todo add conditions if false disable dont hide -->
|
||||||
|
<b-form-group :label="$t('Substitutes')" :description="$t('substitute_help')">
|
||||||
|
<generic-multiselect
|
||||||
|
@change="food.substitute = $event.val;"
|
||||||
|
:model="Models.FOOD"
|
||||||
|
:initial_selection="food.substitute"
|
||||||
|
label="name"
|
||||||
|
:multiple="false"
|
||||||
|
:placeholder="$t('Substitutes')"
|
||||||
|
></generic-multiselect>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-form-group :description="$t('substitute_siblings_help')">
|
||||||
|
<b-form-checkbox v-model="food.substitute_siblings">{{ $t('substitute_siblings') }}</b-form-checkbox>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-form-group :label="$t('InheritFields')" :description="$t('InheritFields_help')">
|
||||||
|
<generic-multiselect
|
||||||
|
@change="food.inherit_fields = $event.val;"
|
||||||
|
:model="Models.FOOD_INHERIT_FIELDS"
|
||||||
|
:initial_selection="food.inherit_fields"
|
||||||
|
label="name"
|
||||||
|
:multiple="false"
|
||||||
|
:placeholder="$t('InheritFields')"
|
||||||
|
></generic-multiselect>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-form-group :label="$t('ChildInheritFields')" :description="$t('ChildInheritFields_help')">
|
||||||
|
<generic-multiselect
|
||||||
|
@change="food.child_inherit_fields = $event.val;"
|
||||||
|
:model="Models.FOOD_INHERIT_FIELDS"
|
||||||
|
:initial_selection="food.child_inherit_fields"
|
||||||
|
label="name"
|
||||||
|
:multiple="false"
|
||||||
|
:placeholder="$t('ChildInheritFields')"
|
||||||
|
></generic-multiselect>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<!-- TODO change to a button -->
|
||||||
|
<b-form-group :description="$t('reset_children_help')">
|
||||||
|
<b-form-checkbox v-model="food.reset_inherit">{{ $t('reset_children') }}</b-form-checkbox>
|
||||||
|
</b-form-group>
|
||||||
|
|
||||||
|
<b-button variant="primary" @click="updateFood">{{ $t('Save') }}</b-button>
|
||||||
|
</b-form>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -58,6 +109,8 @@ import {BootstrapVue} from "bootstrap-vue"
|
|||||||
import "bootstrap-vue/dist/bootstrap-vue.css"
|
import "bootstrap-vue/dist/bootstrap-vue.css"
|
||||||
import {ApiApiFactory} from "@/utils/openapi/api";
|
import {ApiApiFactory} from "@/utils/openapi/api";
|
||||||
import RecipeCard from "@/components/RecipeCard.vue";
|
import RecipeCard from "@/components/RecipeCard.vue";
|
||||||
|
import GenericMultiselect from "@/components/GenericMultiselect.vue";
|
||||||
|
import {ApiMixin, StandardToasts} from "@/utils/utils";
|
||||||
|
|
||||||
|
|
||||||
Vue.use(BootstrapVue)
|
Vue.use(BootstrapVue)
|
||||||
@ -65,45 +118,38 @@ Vue.use(BootstrapVue)
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestView",
|
name: "TestView",
|
||||||
mixins: [],
|
mixins: [ApiMixin],
|
||||||
components: {RecipeCard},
|
components: {
|
||||||
|
GenericMultiselect
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recipe: undefined,
|
food: undefined,
|
||||||
recipe_detailed: false,
|
|
||||||
meal_plan: undefined
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$i18n.locale = window.CUSTOM_LOCALE
|
this.$i18n.locale = window.CUSTOM_LOCALE
|
||||||
let apiClient = new ApiApiFactory()
|
let apiClient = new ApiApiFactory()
|
||||||
apiClient.retrieveRecipe('119').then((r) => {
|
apiClient.retrieveFood('1').then((r) => {
|
||||||
this.recipe = r.data
|
this.food = r.data
|
||||||
})
|
|
||||||
apiClient.retrieveMealPlan('1').then((r) => {
|
|
||||||
this.meal_plan = 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: {},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.dot {
|
|
||||||
height: 40px;
|
|
||||||
width: 40px;
|
|
||||||
background-color: #bbb;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.two-row-text {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2; /* number of lines to show */
|
|
||||||
line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<cookbook-edit-card :book="book" v-if="current_page === 1" v-on:editing="cookbook_editing = $event" v-on:refresh="$emit('refresh')" @reload="$emit('reload')"></cookbook-edit-card>
|
<cookbook-edit-card :book="book" v-if="current_page === 1" v-on:editing="cookbook_editing = $event" v-on:refresh="$emit('refresh')" @reload="$emit('reload')"></cookbook-edit-card>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="flip" mode="out-in">
|
<transition name="flip" mode="out-in">
|
||||||
<recipe-card :recipe="display_recipes[0].recipe_content" v-if="current_page > 1" :key="display_recipes[0].recipe" :use_plural="use_plural"></recipe-card>
|
<recipe-card :recipe="display_recipes[0].recipe_content" v-if="current_page > 1" :key="display_recipes[0].recipe" ></recipe-card>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
|
@ -23,9 +23,9 @@
|
|||||||
<b-card-body class="m-0 py-0">
|
<b-card-body class="m-0 py-0">
|
||||||
<b-card-text class="h-100 my-0 d-flex flex-column" style="text-overflow: ellipsis">
|
<b-card-text class="h-100 my-0 d-flex flex-column" style="text-overflow: ellipsis">
|
||||||
<h5 class="m-0 mt-1 text-truncate">{{ item[title] }}</h5>
|
<h5 class="m-0 mt-1 text-truncate">{{ item[title] }}</h5>
|
||||||
<template v-if="use_plural">
|
|
||||||
<div v-if="item[plural] !== '' && item[plural] !== null" class="m-0 text-truncate">({{ $t("plural_short") }}: {{ item[plural] }})</div>
|
<div v-if="item[plural]!== '' && item[plural] !== null && item[plural] !== undefined" class="m-0 text-truncate">({{ $t("plural_short") }}: {{ item[plural] }})</div>
|
||||||
</template>
|
|
||||||
<div class="m-0 text-truncate">{{ item[subtitle] }}</div>
|
<div class="m-0 text-truncate">{{ item[subtitle] }}</div>
|
||||||
<div class="m-0 text-truncate small text-muted" v-if="getFullname">{{ getFullname }}</div>
|
<div class="m-0 text-truncate small text-muted" v-if="getFullname">{{ getFullname }}</div>
|
||||||
|
|
||||||
|
@ -17,10 +17,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td @click="done">
|
<td @click="done">
|
||||||
<template v-if="ingredient.unit !== null && !ingredient.no_amount">
|
<template v-if="ingredient.unit !== null && !ingredient.no_amount">
|
||||||
<template v-if="!use_plural">
|
<template >
|
||||||
<span>{{ ingredient.unit.name }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<template v-if="ingredient.unit.plural_name === '' || ingredient.unit.plural_name === null">
|
<template v-if="ingredient.unit.plural_name === '' || ingredient.unit.plural_name === null">
|
||||||
<span>{{ ingredient.unit.name }}</span>
|
<span>{{ ingredient.unit.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -38,10 +35,8 @@
|
|||||||
v-if="ingredient.food.recipe !== null" target="_blank"
|
v-if="ingredient.food.recipe !== null" target="_blank"
|
||||||
rel="noopener noreferrer">{{ ingredient.food.name }}</a>
|
rel="noopener noreferrer">{{ ingredient.food.name }}</a>
|
||||||
<template v-if="ingredient.food.recipe === null">
|
<template v-if="ingredient.food.recipe === null">
|
||||||
<template v-if="!use_plural">
|
|
||||||
<span>{{ ingredient.food.name }}</span>
|
<template>
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<template v-if="ingredient.food.plural_name === '' || ingredient.food.plural_name === null">
|
<template v-if="ingredient.food.plural_name === '' || ingredient.food.plural_name === null">
|
||||||
<span>{{ ingredient.food.name }}</span>
|
<span>{{ ingredient.food.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -84,7 +79,6 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
ingredient: Object,
|
ingredient: Object,
|
||||||
ingredient_factor: {type: Number, default: 1},
|
ingredient_factor: {type: Number, default: 1},
|
||||||
use_plural:{type: Boolean, default: false},
|
|
||||||
detailed: {type: Boolean, default: true},
|
detailed: {type: Boolean, default: true},
|
||||||
},
|
},
|
||||||
mixins: [ResolveUrlMixin],
|
mixins: [ResolveUrlMixin],
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
<table class="table table-sm mb-0">
|
<table class="table table-sm mb-0">
|
||||||
|
|
||||||
<ingredient-component v-for="i in steps.flatMap(s => s.ingredients)" v-bind:key="i.id"
|
<ingredient-component v-for="i in steps.flatMap(s => s.ingredients)" v-bind:key="i.id"
|
||||||
:use_plural="true"
|
|
||||||
:detailed="true"
|
:detailed="true"
|
||||||
:ingredient="i"
|
:ingredient="i"
|
||||||
:ingredient_factor="ingredient_factor"
|
:ingredient_factor="ingredient_factor"
|
||||||
|
@ -84,8 +84,7 @@
|
|||||||
:steps="recipe.steps"
|
:steps="recipe.steps"
|
||||||
:header="false"
|
:header="false"
|
||||||
:detailed="false"
|
:detailed="false"
|
||||||
:servings="recipe.servings"
|
:servings="recipe.servings"/>
|
||||||
:use_plural="use_plural"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<div class="col col-md-4"
|
<div class="col col-md-4"
|
||||||
v-if="step.ingredients.length > 0 && (recipe.steps.length > 1 || force_ingredients)">
|
v-if="step.ingredients.length > 0 && (recipe.steps.length > 1 || force_ingredients)">
|
||||||
<table class="table table-sm">
|
<table class="table table-sm">
|
||||||
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor" :use_plural="use_plural"
|
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor"
|
||||||
@checked-state-changed="$emit('checked-state-changed', $event)"/>
|
@checked-state-changed="$emit('checked-state-changed', $event)"/>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user