Added an option to filter for only undone items on the shopping list (closes #452)

This commit is contained in:
Bernd Bestel
2020-01-24 22:26:36 +01:00
parent ad54253d72
commit 3cbeea7d95
4 changed files with 21 additions and 1 deletions

View File

@@ -83,6 +83,7 @@
<select class="form-control" id="status-filter">
<option class="bg-white" value="all">{{ $__t('All') }}</option>
<option class="bg-info" value="belowminstockamount">{{ $__t('Below min. stock amount') }}</option>
<option class="bg-white" value="xxUNDONExx">{{ $__t('Only undone items') }}</option>
</select>
</div>
</div>
@@ -135,8 +136,9 @@
<td class="d-none">
@if(!empty(FindObjectInArrayByPropertyValue($products, 'id', $listItem->product_id)->product_group_id)) {{ FindObjectInArrayByPropertyValue($productGroups, 'id', FindObjectInArrayByPropertyValue($products, 'id', $listItem->product_id)->product_group_id)->name }} @else <span class="font-italic font-weight-light">{{ $__t('Ungrouped') }}</span> @endif
</td>
<td class="d-none">
<td id="shoppinglistitem-{{ $listItem->id }}-status-info" class="d-none">
@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) belowminstockamount @endif
@if($listItem->done != 1) xxUNDONExx @endif
</td>
@include('components.userfields_tbody', array(