mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Implemented a "recipes due score" (closes #1813)
This commit is contained in:
@@ -118,7 +118,14 @@
|
||||
</th>
|
||||
<th>{{ $__t('Name') }}</th>
|
||||
<th class="allow-grouping">{{ $__t('Desired servings') }}</th>
|
||||
<th data-shadow-rowgroup-column="7"
|
||||
<th class="allow-grouping">
|
||||
{{ $__t('Due score') }}
|
||||
<i class="fas fa-question-circle text-muted small"
|
||||
data-toggle="tooltip"
|
||||
data-trigger="hover click"
|
||||
title="{{ $__t('The higher this number is, the more ingredients currently in stock are due soon, overdue or already expired') }}"></i>
|
||||
</th>
|
||||
<th data-shadow-rowgroup-column="8"
|
||||
class="@if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif allow-grouping">{{ $__t('Requirements fulfilled') }}</th>
|
||||
<th class="d-none">Hidden status for sorting of "Requirements fulfilled" column</th>
|
||||
<th class="d-none">Hidden status for filtering by status</th>
|
||||
@@ -185,6 +192,9 @@
|
||||
<td>
|
||||
{{ $recipe->desired_servings }}
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->due_score }}
|
||||
</td>
|
||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif">
|
||||
@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $__t('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $__n(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count, 'Not enough in stock, %s ingredient missing but already on the shopping list', 'Not enough in stock, %s ingredients missing but already on the shopping list') }}@else{{ $__n(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count, 'Not enough in stock, %s ingredient missing', 'Not enough in stock, %s ingredients missing') }}@endif</span>
|
||||
|
Reference in New Issue
Block a user