Added a button to jump to the journal on the product/chore/battery card

This commit is contained in:
Bernd Bestel
2019-09-27 14:19:06 +02:00
parent 9ba4585143
commit 81f6b58fe4
7 changed files with 16 additions and 0 deletions

View File

@@ -71,7 +71,9 @@ Grocy.Components.ProductCard.Refresh = function(productId)
}
$('#productcard-product-edit-button').attr("href", U("/product/" + productDetails.product.id.toString() + '?' + 'returnto=' + encodeURIComponent(Grocy.CurrentUrlRelative)));
$('#productcard-product-journal-button').attr("href", U("/stockjournal?product=" + productDetails.product.id.toString()));
$('#productcard-product-edit-button').removeClass("disabled");
$('#productcard-product-journal-button').removeClass("disabled");
if (productDetails.last_price !== null)
{