diff --git a/public/viewjs/recipes.js b/public/viewjs/recipes.js index d176c435..e2fe7e49 100644 --- a/public/viewjs/recipes.js +++ b/public/viewjs/recipes.js @@ -75,6 +75,23 @@ $("#status-filter").on("change", function() } recipesTables.column(5).search(value).draw(); + + $('.recipe-gallery-item').removeClass('d-none'); + if (value !== "") + { + if (value === 'enoughinstock') + { + $('.recipe-gallery-item').not('.recipe-enoughinstock').addClass('d-none'); + } + else if (value === 'enoughinstockwithshoppinglist') + { + $('.recipe-gallery-item').not('.recipe-enoughinstockwithshoppinglist').addClass('d-none'); + } + if (value === 'notenoughinstock') + { + $('.recipe-gallery-item').not('.recipe-notenoughinstock').addClass('d-none'); + } + } }); $(".recipe-delete").on('click', function(e) diff --git a/views/productform.blade.php b/views/productform.blade.php index 807e5d40..cd1a9e90 100644 --- a/views/productform.blade.php +++ b/views/productform.blade.php @@ -457,7 +457,9 @@ {{ $__t('Barcode') }} {{ $__t('Factor purchase to stock quantity unit') }} - {{ $__t('Store') }} + @if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) + {{ $__t('Store') }} + @endif diff --git a/views/recipes.blade.php b/views/recipes.blade.php index 756aacd4..42ceeda1 100644 --- a/views/recipes.blade.php +++ b/views/recipes.blade.php @@ -47,7 +47,7 @@ @@ -121,7 +121,7 @@ {{ FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count }} - @if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1) enoughtinstock @elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1) enoughinstockwithshoppinglist @else notenoughinstock @endif + @if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1) enoughinstock @elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1) enoughinstockwithshoppinglist @else notenoughinstock @endif @foreach(FindAllObjectsInArrayByPropertyValue($recipePositionsResolved, 'recipe_id', $recipe->id) as $recipePos) @@ -144,7 +144,7 @@ id="gallery">
@foreach($recipes as $recipe) -