This commit is contained in:
Chris Scoggins
2022-02-01 10:13:58 -06:00
parent 203ff1a6ec
commit c45bf3a994
10 changed files with 159 additions and 173 deletions

View File

@ -131,8 +131,9 @@ export default {
let flat_items = []
let item = undefined
let label = this.form.list_label.split("::")
this.list_label = label[1]
itemlist.forEach((x) => {
item = {}
item = { ...x }
for (const [k, v] of Object.entries(x)) {
if (k == label[0]) {
item["id"] = v.id
@ -144,6 +145,7 @@ export default {
flat_items.push(item)
})
this.first_run = false
return flat_items
},
unflattenItem: function (itemList) {

View File

@ -55,6 +55,7 @@
</b-input-group-prepend>
<b-form-spinbutton min="1" v-model="recipe_servings" inline style="height: 3em"></b-form-spinbutton>
<CustomInputSpinButton v-model.number="recipe_servings" style="height: 3em" />
<b-input-group-append>
<b-button variant="secondary" @click="$bvModal.hide(`shopping_${modal_id}`)">{{ $t("Cancel") }} </b-button>
@ -75,10 +76,11 @@ const { ApiApiFactory } = require("@/utils/openapi/api")
import { StandardToasts } from "@/utils/utils"
import IngredientsCard from "@/components/IngredientsCard"
import LoadingSpinner from "@/components/LoadingSpinner"
import CustomInputSpinButton from "@/components/CustomInputSpinButton"
export default {
name: "ShoppingModal",
components: { IngredientsCard, LoadingSpinner },
components: { IngredientsCard, LoadingSpinner, CustomInputSpinButton },
mixins: [],
props: {
recipe: { required: true, type: Object },