Some refinements for #501

This commit is contained in:
Bernd Bestel
2020-01-21 20:45:34 +01:00
parent 3a36bdaf45
commit 0816359867
9 changed files with 52 additions and 55 deletions

View File

@@ -61,13 +61,7 @@
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'hint' => $__t('The ingredients listed here result in this amount of servings')
))
@include('components.productpicker', array(
'products' => $products,
'isRequired' => false,
'label' => 'Creates Product'
))
))
<div class="form-group">
<div class="form-check">
@@ -89,6 +83,15 @@
</div>
</div>
@include('components.productpicker', array(
'products' => $products,
'isRequired' => false,
'label' => 'Produces product',
'prefillById' => $recipe->product_id,
'disallowAllProductWorkflows' => true,
'hint' => $__t('When a product is selected, one unit (per serving in purchase quantity unit) will be added to stock on consuming this recipe')
))
@include('components.userfieldsform', array(
'userfields' => $userfields,
'entity' => 'recipes'
@@ -222,11 +225,6 @@
@endif
</div>
</div>
<div class="row mt-5">
<div class="col">
@include('components.productcard')
</div>
</div>
</div>
</div>

View File

@@ -137,7 +137,7 @@
<a class="btn btn-sm btn-outline-primary py-0 recipe-order-missing-button hide-when-embedded hide-on-fullscreen-card @if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $selectedRecipe->id)->need_fulfilled_with_shopping_list == 1) disabled @endif" href="#" data-toggle="tooltip" title="{{ $__t('Put missing products on shopping list') }}" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">
<i class="fas fa-cart-plus"></i>
</a>&nbsp;&nbsp;
<a id="selectedRecipeEditButton" class="btn btn-sm btn-outline-info hide-when-embedded hide-on-fullscreen-card py-0" href="{{ $U('/recipe/') }}{{ $selectedRecipe->id }}?product={{ $selectedRecipe->product_id }}">
<a id="selectedRecipeEditButton" class="btn btn-sm btn-outline-info hide-when-embedded hide-on-fullscreen-card py-0" href="{{ $U('/recipe/') }}{{ $selectedRecipe->id }}">
<i class="fas fa-edit"></i>
</a>
<a id="selectedRecipeDeleteButton" class="btn btn-sm btn-outline-danger hide-when-embedded hide-on-fullscreen-card py-0" href="#" data-recipe-id="{{ $selectedRecipe->id }}" data-recipe-name="{{ $selectedRecipe->name }}">