diff --git a/brewman/static/partial/recipe-detail.html b/brewman/static/partial/recipe-detail.html
index 8d213ec5..04d9459a 100644
--- a/brewman/static/partial/recipe-detail.html
+++ b/brewman/static/partial/recipe-detail.html
@@ -32,7 +32,7 @@
-
diff --git a/brewman/static/scripts/recipe.js b/brewman/static/scripts/recipe.js
index 77d5a177..613cab06 100644
--- a/brewman/static/scripts/recipe.js
+++ b/brewman/static/scripts/recipe.js
@@ -14,6 +14,7 @@ var RecipeController = ['$scope', '$location', '$window', '$modal', 'asDateFilte
recipe.ValidFrom = moment(recipe.ValidFrom, 'DD-MMM-YYYY').toDate();
recipe.ValidTo = moment(recipe.ValidTo, 'DD-MMM-YYYY').toDate();
$scope.recipe = recipe;
+ $scope.foIngredient = recipe.RecipeItems > 0;
$scope.costPrice = 0;
function getOld(productID, recipeItems) {
@@ -40,7 +41,8 @@ var RecipeController = ['$scope', '$location', '$window', '$modal', 'asDateFilte
}
delete $scope.quantity;
delete $scope.product;
- $scope.foProduct = true;
+ $scope.searchIngredient = '';
+ $scope.foIngredient = true;
};
$scope.removeItem = function (item) {
@@ -106,8 +108,6 @@ var RecipeController = ['$scope', '$location', '$window', '$modal', 'asDateFilte
$scope.delete();
});
};
- $scope.foName = true;
-
$scope.products = function ($viewValue, options) {
return Product.autocomplete(angular.extend({term: $viewValue, count: 20, a: true, e: true}, options)).$promise;
};