mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +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)
|
$vEvent->setDtStart($date)
|
||||||
->setDtEnd($date)
|
->setDtEnd($date)
|
||||||
->setSummary($event['title'])
|
->setSummary($event['title'])
|
||||||
|
->setDescription($event['description'])
|
||||||
->setNoTime($event['date_format'] === 'date')
|
->setNoTime($event['date_format'] === 'date')
|
||||||
->setUseTimezone(true);
|
->setUseTimezone(true);
|
||||||
|
|
||||||
|
@ -99,7 +99,8 @@ class CalendarService extends BaseService
|
|||||||
$mealPlanRecipeEvents[] = array(
|
$mealPlanRecipeEvents[] = array(
|
||||||
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
'title' => $titlePrefix . FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->includes_recipe_id)->name,
|
||||||
'start' => FindObjectInArrayByPropertyValue($recipes, 'id', $recipeOfCurrentDay->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