@extends('layout.default') @section('title', $L('Recipes')) @section('activeNav', 'recipes') @section('viewJsName', 'recipes') @section('content')

@yield('title') {{ $L('Add') }}

@foreach($recipes as $recipe) @endforeach
{{ $L('Name') }} {{ $L('Requirements fulfilled') }}
{{ $recipe->name }} @if(FindObjectInArrayByPropertyValue($recipesSumFulfillment, 'recipe_id', $recipe->id)->need_fulfilled == 1)@elseif(FindObjectInArrayByPropertyValue($recipesSumFulfillment, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1)@else@endif @if(FindObjectInArrayByPropertyValue($recipesSumFulfillment, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $L('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesSumFulfillment, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $L('Not enough in stock, #1 ingredients missing but already on the shopping list', FindObjectInArrayByPropertyValue($recipesSumFulfillment, 'recipe_id', $recipe->id)->missing_products_count) }}@else{{ $L('Not enough in stock, #1 ingredients missing', FindObjectInArrayByPropertyValue($recipesSumFulfillment, 'recipe_id', $recipe->id)->missing_products_count) }}@endif
@if($selectedRecipe !== null)
{{ $selectedRecipe->name }}     
@foreach($selectedRecipeSubRecipes as $selectedRecipeSubRecipe)

{{ $selectedRecipeSubRecipe->name }}

@php $selectedRecipeSubRecipePositionsFiltered = FindAllObjectsInArrayByPropertyValue($selectedRecipeSubRecipesPositions, 'recipe_id', $selectedRecipeSubRecipe->id); @endphp @if(count($selectedRecipeSubRecipePositionsFiltered) > 0)
{{ $L('Ingredients') }}
    @foreach($selectedRecipeSubRecipePositionsFiltered as $selectedRecipePosition)
  • {{ $selectedRecipePosition->amount }} {{ Pluralize($selectedRecipePosition->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name_plural) }} {{ FindObjectInArrayByPropertyValue($products, 'id', $selectedRecipePosition->product_id)->name }} @if(FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $L('Enough in stock') }} @else {{ $L('Not enough in stock, #1 missing, #2 already on shopping list', FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $selectedRecipePosition->id)->missing_amount, FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $selectedRecipePosition->id)->amount_on_shopping_list) }} @endif @if(!empty($selectedRecipePosition->note))
    {{ $selectedRecipePosition->note }}
    @endif
  • @endforeach
@endif @if(!empty($selectedRecipeSubRecipe->description))
{{ $L('Preparation') }}
{!! $selectedRecipeSubRecipe->description !!}
@endif @endforeach @if($selectedRecipePositions->count() > 0)
{{ $L('Ingredients') }}
    @php $lastGroup = 'undefined'; @endphp @foreach($selectedRecipePositions as $selectedRecipePosition) @if($lastGroup != $selectedRecipePosition->ingredient_group)
    {{ $selectedRecipePosition->ingredient_group }}
    @endif
  • {{ $selectedRecipePosition->amount }} {{ Pluralize($selectedRecipePosition->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $selectedRecipePosition->qu_id)->name_plural) }} {{ FindObjectInArrayByPropertyValue($products, 'id', $selectedRecipePosition->product_id)->name }} @if(FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $L('Enough in stock') }} @else {{ $L('Not enough in stock, #1 missing, #2 already on shopping list', FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $selectedRecipePosition->id)->missing_amount, FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $selectedRecipePosition->id)->amount_on_shopping_list) }} @endif @if(!empty($selectedRecipePosition->note))
    {{ $selectedRecipePosition->note }}
    @endif
  • @php $lastGroup = $selectedRecipePosition->ingredient_group; @endphp @endforeach
@endif @if(!empty($selectedRecipe->description))
{{ $L('Preparation') }}
{!! $selectedRecipe->description !!}
@endif
@endif
@stop