diff --git a/changelog/66_UNRELEASED_xxxx-xx-xx.md b/changelog/66_UNRELEASED_xxxx-xx-xx.md index 87d53737..591b6173 100644 --- a/changelog/66_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/66_UNRELEASED_xxxx-xx-xx.md @@ -79,5 +79,5 @@ ### API - The API endpoint `/stock/shoppinglist/clear` has now a new optional request body parameter `done_only` (to only remove done items from the given shopping list, defaults to `false`) -- The API endpoint `/chores/{choreId}/execute` has now a new optional request body parameter `skipped` (to skip the next chore schedule) +- The API endpoint `/chores/{choreId}/execute` has now a new optional request body parameter `skipped` (to skip the next chore schedule, defaults to `false`) - Fixed that the barcode lookup for the "Stock by-barcode" API endpoints was case sensitive diff --git a/services/CalendarService.php b/services/CalendarService.php index 802fcb3a..265fb9d0 100644 --- a/services/CalendarService.php +++ b/services/CalendarService.php @@ -144,8 +144,15 @@ class CalendarService extends BaseService $dateFormat = 'datetime'; } + $titlePrefix2 = ''; + if (!empty($section->name)) + { + $titlePrefix2 = $section->name . ': '; + } + + $mealPlanNotesEvents[] = [ - 'title' => $titlePrefix . $mealPlanDayNote->note, + 'title' => $titlePrefix . $titlePrefix2 . $mealPlanDayNote->note, 'start' => $start, 'date_format' => $dateFormat ]; @@ -165,8 +172,14 @@ class CalendarService extends BaseService $dateFormat = 'datetime'; } + $titlePrefix2 = ''; + if (!empty($section->name)) + { + $titlePrefix2 = $section->name . ': '; + } + $mealPlanProductEvents[] = [ - 'title' => $titlePrefix . FindObjectInArrayByPropertyValue($products, 'id', $mealPlanDayProduct->product_id)->name, + 'title' => $titlePrefix . $titlePrefix2 . FindObjectInArrayByPropertyValue($products, 'id', $mealPlanDayProduct->product_id)->name, 'start' => $start, 'date_format' => $dateFormat ];