From dfdf45fa569f37f8422c830019353e57afefa3c5 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 23 May 2022 22:28:45 +0200 Subject: [PATCH] Fixed meal plan product/note calendar items links (fixes #1897) --- changelog/68_UNRELEASED_xxxx-xx-xx.md | 2 +- services/CalendarService.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog/68_UNRELEASED_xxxx-xx-xx.md b/changelog/68_UNRELEASED_xxxx-xx-xx.md index 8c264f20..1b99aeec 100644 --- a/changelog/68_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/68_UNRELEASED_xxxx-xx-xx.md @@ -32,7 +32,7 @@ ### Calendar -- xxx +- Fixed that clicking on meal plan product and notes calendar entries redirected to an invalid page ### Tasks diff --git a/services/CalendarService.php b/services/CalendarService.php index 265fb9d0..dc8bc608 100644 --- a/services/CalendarService.php +++ b/services/CalendarService.php @@ -154,7 +154,8 @@ class CalendarService extends BaseService $mealPlanNotesEvents[] = [ 'title' => $titlePrefix . $titlePrefix2 . $mealPlanDayNote->note, 'start' => $start, - 'date_format' => $dateFormat + 'date_format' => $dateFormat, + 'link' => $this->UrlManager->ConstructUrl('/mealplan' . '?start=' . $start) ]; } @@ -181,7 +182,8 @@ class CalendarService extends BaseService $mealPlanProductEvents[] = [ 'title' => $titlePrefix . $titlePrefix2 . FindObjectInArrayByPropertyValue($products, 'id', $mealPlanDayProduct->product_id)->name, 'start' => $start, - 'date_format' => $dateFormat + 'date_format' => $dateFormat, + 'link' => $this->UrlManager->ConstructUrl('/mealplan' . '?start=' . $start) ]; } }