mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Added a product context menu on /stockjournal (the same as on /stockoverview) (closes #2239)
This commit is contained in:
@@ -129,3 +129,24 @@ $(document).on('click', '.undo-stock-booking-button', function(e)
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '.product-grocycode-label-print', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
document.activeElement.blur();
|
||||
|
||||
var productId = $(e.currentTarget).attr('data-product-id');
|
||||
Grocy.Api.Get('stock/products/' + productId + '/printlabel', function(labelData)
|
||||
{
|
||||
if (Grocy.Webhooks.labelprinter !== undefined)
|
||||
{
|
||||
Grocy.FrontendHelpers.RunWebhook(Grocy.Webhooks.labelprinter, labelData);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("click", ".product-name-cell", function(e)
|
||||
{
|
||||
Grocy.Components.ProductCard.Refresh($(e.currentTarget).attr("data-product-id"));
|
||||
$("#stockjournal-productcard-modal").modal("show");
|
||||
});
|
||||
|
Reference in New Issue
Block a user