handle remote events 'isAllDay' and fix cs

This commit is contained in:
2022-06-29 15:29:22 +02:00
parent 849e7158e4
commit adad4313a6
8 changed files with 61 additions and 56 deletions

View File

@@ -196,7 +196,8 @@ class RemoteEventConverter
$event['subject'],
'',
$startDate,
$endDate
$endDate,
$event['isAllDay']
);
}

View File

@@ -100,7 +100,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
'query' => [
'startDateTime' => $startDate->format(DateTimeImmutable::ATOM),
'endDateTime' => $endDate->format(DateTimeImmutable::ATOM),
'$select' => 'id,subject,start,end',
'$select' => 'id,subject,start,end,isAllDay',
],
]
)->toArray();

View File

@@ -38,12 +38,18 @@ class RemoteEvent
*/
public string $title;
public function __construct(string $id, string $title, string $description, DateTimeImmutable $startDate, DateTimeImmutable $endDate)
/**
* @Serializer\Groups({"read"})
*/
public bool $isAllDay;
public function __construct(string $id, string $title, string $description, DateTimeImmutable $startDate, DateTimeImmutable $endDate, bool $isAllDay = false)
{
$this->id = $id;
$this->title = $title;
$this->description = $description;
$this->startDate = $startDate;
$this->endDate = $endDate;
$this->isAllDay = $isAllDay;
}
}