mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Optimized GROCY_FEATURE_FLAG_STOCK handling (closes #966)
This commit is contained in:
@@ -126,6 +126,12 @@ var calendar = $("#calendar").fullCalendar({
|
||||
costsAndCaloriesPerServing = '<h5 class="small text-truncate"><span class="locale-number locale-number-generic">' + resolvedRecipe.calories + '</span> kcal ' + __t('per serving') + '<h5>';
|
||||
}
|
||||
|
||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK)
|
||||
{
|
||||
fulfillmentIconHtml = "";
|
||||
fulfillmentInfoHtml = "";
|
||||
}
|
||||
|
||||
element.html('\
|
||||
<div> \
|
||||
<h5 class="text-truncate">' + recipe.name + '<h5> \
|
||||
@@ -274,6 +280,12 @@ var calendar = $("#calendar").fullCalendar({
|
||||
{
|
||||
$("#calendar").fullCalendar("gotoDate", GetUriParam("week"));
|
||||
}
|
||||
|
||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK)
|
||||
{
|
||||
$(".recipe-order-missing-button").addClass("d-none");
|
||||
$(".recipe-consume-button").addClass("d-none");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
@@ -546,7 +546,7 @@ $("img.barcode").each(function()
|
||||
img.attr("src", dummyCanvas.toDataURL("image/png"));
|
||||
});
|
||||
|
||||
if ($(window).width() < 768)
|
||||
if ($(window).width() < 768 || !Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK)
|
||||
{
|
||||
$("#filter-container").removeClass("border-bottom");
|
||||
}
|
||||
|
@@ -145,8 +145,6 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
|
||||
if (productId)
|
||||
{
|
||||
Grocy.Components.ProductCard.Refresh(productId);
|
||||
|
||||
Grocy.Api.Get('stock/products/' + productId,
|
||||
function(productDetails)
|
||||
{
|
||||
|
Reference in New Issue
Block a user