Merge branch 'upgrade-php82' of gitlab.com:Chill-Projet/chill-bundles into upgrade-php82

This commit is contained in:
Julie Lenaerts 2023-03-27 11:48:40 +02:00
commit 5a1296724b
12 changed files with 33 additions and 28 deletions

View File

@ -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",

View File

@ -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;
}

View File

@ -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";

View File

@ -116,7 +116,6 @@
<script>
import ConcernedGroups from 'ChillActivityAssets/vuejs/Activity/components/ConcernedGroups.vue';
import Location from 'ChillActivityAssets/vuejs/Activity/components/Location.vue';
import '@fullcalendar/core/vdom'; // solves problem with Vite
import frLocale from '@fullcalendar/core/locales/fr';
import FullCalendar from '@fullcalendar/vue3';
import dayGridPlugin from '@fullcalendar/daygrid';

View File

@ -3,7 +3,7 @@ import {ISOToDatetime} from '../../../../../../ChillMainBundle/Resources/public/
import {DateTime, User} from '../../../../../../ChillMainBundle/Resources/public/types';
import {CalendarLight, CalendarRange, CalendarRemote} from '../../../types';
import type {EventInputCalendarRange} from '../../../types';
import {EventInput} from '@fullcalendar/vue3';
import {EventInput} from '@fullcalendar/core';
export interface UserData {
user: User,

View File

@ -116,13 +116,11 @@
import type {
CalendarOptions,
DatesSetArg,
EventInput,
EventInstance
} from '@fullcalendar/vue3';
EventInput
} from '@fullcalendar/core';
import {reactive, computed, ref} from "vue";
import {useStore} from "vuex";
import {key} from './store';
import '@fullcalendar/core/vdom'; // solves problem with Vite
import FullCalendar from '@fullcalendar/vue3';
import frLocale from '@fullcalendar/core/locales/fr';
import interactionPlugin, {DropArg, EventResizeDoneArg} from "@fullcalendar/interaction";

View File

@ -26,7 +26,7 @@
<script setup lang="ts">
import Modal from "../../../../../../ChillMainBundle/Resources/public/vuejs/_components/Modal.vue";
import {computed, ref} from "vue";
import {EventApi} from "@fullcalendar/vue3";
import {EventApi} from "@fullcalendar/core";
import {useStore} from "vuex";
import {key} from "../store";
import {Location} from "../../../../../../ChillMainBundle/Resources/public/types";

View File

@ -2,7 +2,7 @@ import {State} from './../index';
import {ActionContext, Module} from 'vuex';
import {CalendarLight} from '../../../../types';
import {fetchCalendarLocalForUser} from '../../../Calendar/api';
import {EventInput} from '@fullcalendar/vue3';
import {EventInput} from '@fullcalendar/core';
import {localsToFullCalendarEvent} from "../../../Calendar/store/utils";
import {TransportExceptionInterface} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
import {COLORS} from "../../../Calendar/const";

View File

@ -4,7 +4,7 @@ import {CalendarRange, CalendarRangeCreate, CalendarRangeEdit, isEventInputCalen
import {Location} from "../../../../../../../ChillMainBundle/Resources/public/types";
import {fetchCalendarRangeForUser} from '../../../Calendar/api';
import {calendarRangeToFullCalendarEvent} from '../../../Calendar/store/utils';
import {EventInput} from '@fullcalendar/vue3';
import {EventInput} from '@fullcalendar/core';
import {makeFetch} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
import {
datetimeToISO,

View File

@ -2,7 +2,7 @@ import {State} from './../index';
import {ActionContext, Module} from 'vuex';
import {CalendarRemote} from '../../../../types';
import {fetchCalendarRemoteForUser} from '../../../Calendar/api';
import {EventInput, EventSource} from '@fullcalendar/vue3';
import {EventInput} from '@fullcalendar/core';
import {remoteToFullCalendarEvent} from "../../../Calendar/store/utils";
import {TransportExceptionInterface} from "../../../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
import {COLORS} from "../../../Calendar/const";

View File

@ -805,12 +805,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
/**
* @return $this
*/
public function setProfession(string $profession): self
public function setProfession(?string $profession): self
{
$this->profession = $profession;
$this->profession = (string) $profession;
return $this;
}

View File

@ -110,6 +110,7 @@ class ThirdPartyType extends AbstractType
->add('profession', TextType::class, [
'label' => 'thirdparty.Profession',
'required' => false,
'empty_data' => '',
])
->add('contactDataAnonymous', CheckboxType::class, [
'required' => false,