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) ]; } }