mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Added a filter for only done items on the /shoppinglist page (closes #1406)
This commit is contained in:
parent
70d51c757b
commit
135ac118b0
@ -41,6 +41,7 @@
|
||||
|
||||
### Shopping list improvements/fixes
|
||||
- The amount now defaults to `1` for adding items quicker
|
||||
- Added a status filter for only _done_ items
|
||||
- Fixed that shopping list prints had a grey background (thanks @Forceu)
|
||||
- Fixed the form validation on the shopping list item page (thanks @Forceu)
|
||||
- Fixed that when adding products to the shopping list from the stock overview page, the used quantity unit was always the products default purchase QU (and not the selected one)
|
||||
|
@ -2142,3 +2142,5 @@ msgstr ""
|
||||
msgid "Unable to print"
|
||||
msgstr ""
|
||||
|
||||
msgid "Only done items"
|
||||
msgstr ""
|
||||
|
@ -361,11 +361,11 @@ $(document).on('click', '.order-listitem-button', function(e)
|
||||
var statusInfoCell = $("#shoppinglistitem-" + listItemId + "-status-info");
|
||||
if (done == 1)
|
||||
{
|
||||
statusInfoCell.text(statusInfoCell.text().replace("xxUNDONExx", ""));
|
||||
statusInfoCell.text(statusInfoCell.text().replace("xxUNDONExx", "xxDONExx"));
|
||||
}
|
||||
else
|
||||
{
|
||||
statusInfoCell.text(statusInfoCell.text() + " xxUNDONExx");
|
||||
statusInfoCell.text(statusInfoCell.text().replace("xxDONExx", "xxUNDONExx"));
|
||||
}
|
||||
shoppingListTable.rows().invalidate().draw(false);
|
||||
|
||||
|
@ -131,6 +131,7 @@
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option class="@if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif"
|
||||
value="belowminstockamount">{{ $__t('Below min. stock amount') }}</option>
|
||||
<option value="xxDONExx">{{ $__t('Only done items') }}</option>
|
||||
<option value="xxUNDONExx">{{ $__t('Only undone items') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -239,7 +240,7 @@
|
||||
<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
|
||||
@if($listItem->done == 1) xxDONExx @else xxUNDONExx @endif
|
||||
</td>
|
||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
||||
<span class="locale-number locale-number-currency">{{ $listItem->last_price_unit }}</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user