diff --git a/public/viewjs/recipes.js b/public/viewjs/recipes.js index c79829dc..e2fe7e49 100644 --- a/public/viewjs/recipes.js +++ b/public/viewjs/recipes.js @@ -77,14 +77,20 @@ $("#status-filter").on("change", function() recipesTables.column(5).search(value).draw(); $('.recipe-gallery-item').removeClass('d-none'); - if(value !== "") + if (value !== "") { - if(value === 'enoughtinstock') - $('.recipe-gallery-item').not('.recipe-enoughtinstock').addClass('d-none'); - if(value === 'enoughinstockwithshoppinglist') + 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') + } + if (value === 'notenoughinstock') + { $('.recipe-gallery-item').not('.recipe-notenoughinstock').addClass('d-none'); + } } }); diff --git a/views/recipes.blade.php b/views/recipes.blade.php index e28ad07a..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 }}