mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 11:27:03 +00:00
Display "Track date only"-chores as all-day also in iCal API endpoint (references #941)
This commit is contained in:
@@ -22,12 +22,18 @@ class CalendarApiController extends BaseApiController
|
||||
$date->setTime(23, 59, 59);
|
||||
}
|
||||
|
||||
$description = '';
|
||||
if (isset($event['description']))
|
||||
{
|
||||
$description = $event['description'];
|
||||
}
|
||||
|
||||
$vEvent = new \Eluceo\iCal\Component\Event();
|
||||
$vEvent->setDtStart($date)
|
||||
->setDtEnd($date)
|
||||
->setSummary($event['title'])
|
||||
->setDescription($event['description'])
|
||||
->setNoTime($event['date_format'] === 'date')
|
||||
->setDescription($description)
|
||||
->setNoTime($event['date_format'] === 'date' || (isset($event['allDay']) && $event['allDay']))
|
||||
->setUseTimezone(true);
|
||||
|
||||
$vCalendar->addComponent($vEvent);
|
||||
|
Reference in New Issue
Block a user