mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Calendar descriptions (iCal export) (#417)
* controllers CalendarApiController: setDescription for events * services CalendarService: include link to mealplan in calendar descriptions
This commit is contained in:
parent
744fd03633
commit
c6ae8cc348
@ -38,6 +38,7 @@ class CalendarApiController extends BaseApiController
|
||||
$vEvent->setDtStart($date)
|
||||
->setDtEnd($date)
|
||||
->setSummary($event['title'])
|
||||
->setDescription($event['description'])
|
||||
->setNoTime($event['date_format'] === 'date')
|
||||
->setUseTimezone(true);
|
||||
|
||||
|
@ -99,7 +99,8 @@ class CalendarService extends BaseService
|
||||
$mealPlanRecipeEvents[] = array(
|
||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
||||
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name,
|
||||
'date_format' => 'date'
|
||||
'date_format' => 'date',
|
||||
'description' => GROCY_BASE_URL . '/mealplan' . '?week=' . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->recipe_id)->name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user