mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
some data in msgraph synchro and answer on calendar invite
This commit is contained in:
@@ -21,7 +21,6 @@ use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* Convert Chill Calendar event to Remote MS Graph event, and MS Graph
|
||||
@@ -35,14 +34,14 @@ class RemoteEventConverter
|
||||
|
||||
private DateTimeZone $defaultDateTimeZone;
|
||||
|
||||
private EngineInterface $engine;
|
||||
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private DateTimeZone $remoteDateTimeZone;
|
||||
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
private EngineInterface $engine;
|
||||
|
||||
public function __construct(EngineInterface $engine, PersonRenderInterface $personRender, TranslatorInterface $translator)
|
||||
{
|
||||
$this->engine = $engine;
|
||||
@@ -112,7 +111,7 @@ class RemoteEventConverter
|
||||
'@ChillCalendar/MSGraph/calendar_event_body.html.twig',
|
||||
['calendar' => $calendar]
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
$this->calendarToEventAttendeesOnly($calendar)
|
||||
);
|
||||
@@ -129,17 +128,6 @@ class RemoteEventConverter
|
||||
];
|
||||
}
|
||||
|
||||
private function buildInviteToAttendee(Invite $invite): array
|
||||
{
|
||||
return [
|
||||
'emailAddress' => [
|
||||
'address' => $invite->getUser()->getEmail(),
|
||||
'name' => $invite->getUser()->getLabel(),
|
||||
],
|
||||
'type' => 'Required',
|
||||
];
|
||||
}
|
||||
|
||||
public function convertAvailabilityToRemoteEvent(array $event): RemoteEvent
|
||||
{
|
||||
$startDate =
|
||||
@@ -193,4 +181,15 @@ class RemoteEventConverter
|
||||
{
|
||||
return new DateTimeZone('UTC');
|
||||
}
|
||||
|
||||
private function buildInviteToAttendee(Invite $invite): array
|
||||
{
|
||||
return [
|
||||
'emailAddress' => [
|
||||
'address' => $invite->getUser()->getEmail(),
|
||||
'name' => $invite->getUser()->getLabel(),
|
||||
],
|
||||
'type' => 'Required',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user