Fixed deleting meal plan entries did not work (fixes #255)

This commit is contained in:
Bernd Bestel 2019-06-08 16:30:45 +02:00
parent 91116ee768
commit 2b77bc6ae6
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -98,7 +98,7 @@ $("#add-recipe-modal").on("shown.bs.modal", function(e)
$(document).on("click", ".remove-recipe-button", 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(), { }, Grocy.Api.Delete('objects/meal_plan/' + mealPlanEntry.id.toString(), { },
function(result) function(result)