From 2b77bc6ae62b9973b1acf1216e79254de492d4ee Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 8 Jun 2019 16:30:45 +0200 Subject: [PATCH] Fixed deleting meal plan entries did not work (fixes #255) --- public/viewjs/mealplan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 2e7c61cd..e047c364 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -98,7 +98,7 @@ $("#add-recipe-modal").on("shown.bs.modal", function(e) $(document).on("click", ".remove-recipe-button", function(e) { - var mealPlanEntry = JSON.parse($(this).parent().parent().attr("data-meal-plan-entry")); + var mealPlanEntry = JSON.parse($(this).closest(".fc-h-event").attr("data-meal-plan-entry")); Grocy.Api.Delete('objects/meal_plan/' + mealPlanEntry.id.toString(), { }, function(result)