fixed import view step editor

This commit is contained in:
vabene1111
2023-01-19 19:12:25 +01:00
parent 68d4fb3b59
commit d1d568a9d3
2 changed files with 6 additions and 4 deletions

View File

@@ -75,6 +75,8 @@ def test_ingredient_parser():
# an amount # and it starts with a lowercase letter, then that # an amount # and it starts with a lowercase letter, then that
# is a unit ("etwas", "evtl.") does not apply to English tho # is a unit ("etwas", "evtl.") does not apply to English tho
# TODO maybe add/improve support for weired stuff like this https://www.rainbownourishments.com/vegan-lemon-tart/#recipe
ingredient_parser = IngredientParser(None, False, ignore_automations=True) ingredient_parser = IngredientParser(None, False, ignore_automations=True)
count = 0 count = 0

View File

@@ -24,10 +24,10 @@
<b-list-group-item v-for="i in s.ingredients" <b-list-group-item v-for="i in s.ingredients"
v-bind:key="i.original_text"><i v-bind:key="i.original_text"><i
class="fas fa-arrows-alt mr-2"></i> class="fas fa-arrows-alt mr-2"></i>
<b-badge variant="light">{{ i.amount }}</b-badge> <b-badge variant="light">{{ i.amount.toFixed(2) }}</b-badge>
<b-badge variant="secondary">{{ i.unit.name }}</b-badge> <b-badge variant="secondary" v-if="i.unit">{{ i.unit.name }}</b-badge>
<b-badge variant="info">{{ i.food.name }}</b-badge> <b-badge variant="info" v-if="i.food">{{ i.food.name }}</b-badge>
({{ i.original_text }}) <i>{{ i.original_text }}</i>
<b-button @click="current_edit_ingredient = i" v-b-modal.ingredient_edit_modal class="float-right btn-sm"><i class="fas fa-pencil-alt"></i></b-button> <b-button @click="current_edit_ingredient = i" v-b-modal.ingredient_edit_modal class="float-right btn-sm"><i class="fas fa-pencil-alt"></i></b-button>
</b-list-group-item> </b-list-group-item>
</draggable> </draggable>