diff --git a/package.json b/package.json index 17b02c63a..0bd3a81e5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "chill", - "version": "2.0.0", - "devDependencies": { + "name": "chill", + "version": "2.0.0", + "devDependencies": { "@alexlafroscia/yaml-merge": "^4.0.0", "@apidevtools/swagger-cli": "^4.0.4", "@babel/core": "^7.20.5", @@ -34,12 +34,12 @@ "webpack-cli": "^5.0.1" }, "dependencies": { - "@fullcalendar/core": "^5.11.0", - "@fullcalendar/daygrid": "^5.11.0", - "@fullcalendar/interaction": "^5.11.0", - "@fullcalendar/list": "^5.11.0", - "@fullcalendar/timegrid": "^5.11.0", - "@fullcalendar/vue3": "^5.11.1", + "@fullcalendar/core": "^6.1.4", + "@fullcalendar/daygrid": "^6.1.4", + "@fullcalendar/interaction": "^6.1.4", + "@fullcalendar/list": "^6.1.4", + "@fullcalendar/timegrid": "^6.1.4", + "@fullcalendar/vue3": "^6.1.4", "@popperjs/core": "^2.9.2", "dropzone": "^5.7.6", "es6-promise": "^4.2.8", diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php index 504d48ffc..563bd3a38 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php @@ -22,6 +22,7 @@ use Chill\MainBundle\Entity\User; use DateTimeImmutable; use LogicException; use Psr\Log\LoggerInterface; +use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use function array_key_exists; @@ -74,9 +75,18 @@ class MapCalendarToUser public function getDefaultUserCalendar(string $idOrUserPrincipalName): ?array { - $value = $this->machineHttpClient->request('GET', "users/{$idOrUserPrincipalName}/calendars", [ - 'query' => ['$filter' => 'isDefaultCalendar eq true'], - ])->toArray()['value']; + try { + $value = $this->machineHttpClient->request('GET', "users/{$idOrUserPrincipalName}/calendars", [ + 'query' => ['$filter' => 'isDefaultCalendar eq true'], + ])->toArray()['value']; + } catch (ClientExceptionInterface $e) { + $this->logger->error('[MapCalendarToUser] Error while listing calendars for a user', [ + 'http_status_code' => $e->getResponse()->getStatusCode(), + 'id_user' => $idOrUserPrincipalName, + ]); + + return null; + } return $value[0] ?? null; } diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/types.ts b/src/Bundle/ChillCalendarBundle/Resources/public/types.ts index ebc7ab7be..c18cfea13 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/types.ts +++ b/src/Bundle/ChillCalendarBundle/Resources/public/types.ts @@ -1,4 +1,4 @@ -import {EventInput} from '@fullcalendar/vue3'; +import {EventInput} from '@fullcalendar/core'; import {DateTime, Location, User, UserAssociatedInterface} from '../../../ChillMainBundle/Resources/public/types' ; import {Person} from "../../../ChillPersonBundle/Resources/public/types"; diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue index 472bb525b..32b6b569b 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue +++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/App.vue @@ -116,7 +116,6 @@