Fixed recipe ingredient stock fulfillment icon for nested recipes (fixes #1851)

This commit is contained in:
Bernd Bestel 2022-04-09 22:07:56 +02:00
parent e9421e9102
commit c0a727fcfc
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -500,7 +500,7 @@
</span>
@if(GROCY_FEATURE_FLAG_STOCK)
<span class="d-print-none">
@if($selectedRecipePosition->need_fulfilled == 1)<i class="fa-solid fa-check text-success"></i>@elseif($selectedRecipePosition->need_fulfilled_with_shopping_list == 1)<i class="fa-solid fa-exclamation text-warning"></i>@else<i class="fa-solid fa-times text-danger"></i>@endif
@if(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1)<i class="fa-solid fa-check text-success"></i>@elseif(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled_with_shopping_list == 1)<i class="fa-solid fa-exclamation text-warning"></i>@else<i class="fa-solid fa-times text-danger"></i>@endif
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $__t('Enough in stock') }} @else {{ $__t('Not enough in stock, %1$s missing, %2$s already on shopping list', round($selectedRecipePosition->missing_amount, 2), round($selectedRecipePosition->amount_on_shopping_list, 2)) }} @endif</span>
</span>
@endif