mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +00:00
Added an option to filter for only undone items on the shopping list (closes #452)
This commit is contained in:
parent
ad54253d72
commit
3cbeea7d95
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
### Shopping list improvements/fixes
|
### Shopping list improvements/fixes
|
||||||
- Added a compact view to have better shopping list for shopping trips (new button "Compact view" in the header, additionally this is automatically enabled on mobile devices / when screen width is < 768 px)
|
- Added a compact view to have better shopping list for shopping trips (new button "Compact view" in the header, additionally this is automatically enabled on mobile devices / when screen width is < 768 px)
|
||||||
|
- It's now possible to filter for only undone (not striked through) items (new option in the "Filter by status" dropdown)
|
||||||
- Fixed that when `FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS` was set to `false`, the shopping list appeared empty after some actions
|
- Fixed that when `FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS` was set to `false`, the shopping list appeared empty after some actions
|
||||||
|
|
||||||
### Recipe improvements
|
### Recipe improvements
|
||||||
|
@ -1648,3 +1648,6 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Normal view"
|
msgid "Normal view"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Only undone items"
|
||||||
|
msgstr ""
|
||||||
|
@ -282,6 +282,20 @@ $(document).on('click', '.order-listitem-button', function(e)
|
|||||||
console.error(xhr);
|
console.error(xhr);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
var statusInfoCell = $("#shoppinglistitem-" + listItemId + "-status-info");
|
||||||
|
if (done == 1)
|
||||||
|
{
|
||||||
|
statusInfoCell.text(statusInfoCell.text().replace("xxUNDONExx", ""));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
statusInfoCell.text(statusInfoCell.text() + " xxUNDONExx");
|
||||||
|
}
|
||||||
|
shoppingListTable.rows().invalidate().draw(false);
|
||||||
|
|
||||||
|
$("#status-filter").trigger("change");
|
||||||
});
|
});
|
||||||
|
|
||||||
function OnListItemRemoved()
|
function OnListItemRemoved()
|
||||||
|
@ -83,6 +83,7 @@
|
|||||||
<select class="form-control" id="status-filter">
|
<select class="form-control" id="status-filter">
|
||||||
<option class="bg-white" value="all">{{ $__t('All') }}</option>
|
<option class="bg-white" value="all">{{ $__t('All') }}</option>
|
||||||
<option class="bg-info" value="belowminstockamount">{{ $__t('Below min. stock amount') }}</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>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -135,8 +136,9 @@
|
|||||||
<td class="d-none">
|
<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
|
@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>
|
||||||
<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(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) belowminstockamount @endif
|
||||||
|
@if($listItem->done != 1) xxUNDONExx @endif
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@include('components.userfields_tbody', array(
|
@include('components.userfields_tbody', array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user