mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
added button to add expired products to shoppinglist (#1026)
* added button to add expired products to shoppinglist
* Localizations are managed via Transifex
Revert "added button to add expired products to shoppinglist"
This reverts commit ad1ab5d6a0
.
* Revert unnecessary change
* Reuse existing function (GetExpiringProducts) to get expired products
Co-authored-by: Mario Klug <mario.klug@sourcefactory.at>
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -155,6 +155,20 @@ $(document).on('click', '#add-products-below-min-stock-amount', function(e)
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '#add-expired-products', function(e)
|
||||
{
|
||||
Grocy.Api.Post('stock/shoppinglist/add-expired-products', { "list_id": $("#selected-shopping-list").val() },
|
||||
function(result)
|
||||
{
|
||||
window.location.href = U('/shoppinglist?list=' + $("#selected-shopping-list").val());
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
console.error(xhr);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '#clear-shopping-list', function(e)
|
||||
{
|
||||
bootbox.confirm({
|
||||
|
Reference in New Issue
Block a user