mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 08:44:58 +00:00
Compare commits
27 Commits
add-module
...
2.24.1
Author | SHA1 | Date | |
---|---|---|---|
c3fce4783a
|
|||
be8901a5c4
|
|||
6f28d154c8
|
|||
5dfbdad13d
|
|||
b3e2d4ff9f | |||
01c2848a83
|
|||
d0ee381627
|
|||
8b1b255050
|
|||
2bef3c3878
|
|||
cea44d1788
|
|||
84069e03dc
|
|||
ad5e780936
|
|||
19accc4d00
|
|||
6cb085f5f7
|
|||
97239ada84
|
|||
643156f822 | |||
ff0b205591 | |||
2d67843901 | |||
2b09e1459c | |||
029524ba2c | |||
fa91e9494d | |||
4e72d6fea1
|
|||
5666b8b647
|
|||
|
0573f56782 | ||
|
3bee18b0fa | ||
|
843698a1d8 | ||
|
499640e48b |
22
.changes/v2.23.0.md
Normal file
22
.changes/v2.23.0.md
Normal file
@@ -0,0 +1,22 @@
|
||||
## v2.23.0 - 2024-07-19
|
||||
### Feature
|
||||
* ([#123](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/123)) Add a button to duplicate calendar ranges from a week to another one
|
||||
* [admin] filter users by active / inactive in the admin user's list
|
||||
* ([#273](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/273)) Add the possibility to mark all notifications as read
|
||||
|
||||
|
||||
* Handle duplicate reference id in the import of reference addresses
|
||||
* Do not update the "createdAt" column when importing postal code which does not change
|
||||
* Display filename on file upload within the UI interface
|
||||
### Fixed
|
||||
* ([#271](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/271)) Take into account the acp closing date in the acp works date filter
|
||||
|
||||
### Traduction française des principaux changements
|
||||
- Ajout d'un bouton pour dupliquer les périodes de disponibilités d'une semaine à une autre;
|
||||
- dans l'interface d'administration, filtre sur les utilisateurs actifs. Par défaut, seul les utilisateurs
|
||||
actifs sont affichés;
|
||||
- Nouveau bouton pour indiquer toutes les notifications comme lues;
|
||||
- Améliorations sur l'import des adresses et des codes postaux;
|
||||
- Affiche le nom du fichier déposé quand on téléverse un fichier depuis le poste de travail local;
|
||||
- Agrandit l'icône du type de fichier dans l'interface de dépôt de fichier;
|
||||
- correction: tient compte de la date de fermeture du parcours dans les filtres sur les actions d'accompagnement.
|
3
.changes/v2.24.0.md
Normal file
3
.changes/v2.24.0.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## v2.24.0 - 2024-09-11
|
||||
### Feature
|
||||
* ([#306](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/306)) When a document is converted or downloaded in the browser, this document is removed from the browser memory after 45s. Future click on the button re-download the document.
|
5
.changes/v2.24.1.md
Normal file
5
.changes/v2.24.1.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## v2.24.1 - 2024-10-02
|
||||
### Fixed
|
||||
* ([#308](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/308)) Show only the current referrer in the page "show" for an accompanying period workf
|
||||
* ([#309](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/309)) Correctly compute the grouping by referrer aggregator
|
||||
|
33
CHANGELOG.md
33
CHANGELOG.md
@@ -6,6 +6,39 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v2.24.1 - 2024-10-02
|
||||
### Fixed
|
||||
* ([#308](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/308)) Show only the current referrer in the page "show" for an accompanying period workf
|
||||
* ([#309](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/309)) Correctly compute the grouping by referrer aggregator
|
||||
|
||||
|
||||
## v2.24.0 - 2024-09-11
|
||||
### Feature
|
||||
* ([#306](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/306)) When a document is converted or downloaded in the browser, this document is removed from the browser memory after 45s. Future click on the button re-download the document.
|
||||
|
||||
## v2.23.0 - 2024-07-19
|
||||
### Feature
|
||||
* ([#123](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/123)) Add a button to duplicate calendar ranges from a week to another one
|
||||
* [admin] filter users by active / inactive in the admin user's list
|
||||
* ([#273](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/273)) Add the possibility to mark all notifications as read
|
||||
|
||||
|
||||
* Handle duplicate reference id in the import of reference addresses
|
||||
* Do not update the "createdAt" column when importing postal code which does not change
|
||||
* Display filename on file upload within the UI interface
|
||||
### Fixed
|
||||
* ([#271](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/271)) Take into account the acp closing date in the acp works date filter
|
||||
|
||||
### Traduction française des principaux changements
|
||||
- Ajout d'un bouton pour dupliquer les périodes de disponibilités d'une semaine à une autre;
|
||||
- dans l'interface d'administration, filtre sur les utilisateurs actifs. Par défaut, seul les utilisateurs
|
||||
actifs sont affichés;
|
||||
- Nouveau bouton pour indiquer toutes les notifications comme lues;
|
||||
- Améliorations sur l'import des adresses et des codes postaux;
|
||||
- Affiche le nom du fichier déposé quand on téléverse un fichier depuis le poste de travail local;
|
||||
- Agrandit l'icône du type de fichier dans l'interface de dépôt de fichier;
|
||||
- correction: tient compte de la date de fermeture du parcours dans les filtres sur les actions d'accompagnement.
|
||||
|
||||
## v2.22.2 - 2024-07-03
|
||||
### Fixed
|
||||
* Remove scope required for event participation stats
|
||||
|
@@ -39,9 +39,12 @@ Implements a :code:`Chill\MainBundle\Cron\CronJobInterface`. Here is an example:
|
||||
use Chill\MainBundle\Entity\CronJobExecution;
|
||||
use DateInterval;
|
||||
use DateTimeImmutable;
|
||||
use Symfony\Component\Clock\ClockInterface;
|
||||
|
||||
class MyCronJob implements CronJobInterface
|
||||
{
|
||||
function __construct(private ClockInterface $clock) {}
|
||||
|
||||
public function canRun(?CronJobExecution $cronJobExecution): bool
|
||||
{
|
||||
// the parameter $cronJobExecution contains data about the last execution of the cronjob
|
||||
@@ -56,7 +59,7 @@ Implements a :code:`Chill\MainBundle\Cron\CronJobInterface`. Here is an example:
|
||||
|
||||
// this cron job should be executed if the last execution is greater than one day, but only during the night
|
||||
|
||||
$now = new DateTimeImmutable('now');
|
||||
$now = $clock->now();
|
||||
|
||||
return $cronJobExecution->getLastStart() < $now->sub(new DateInterval('P1D'))
|
||||
&& in_array($now->format('H'), self::ACCEPTED_HOURS, true)
|
||||
@@ -69,10 +72,15 @@ Implements a :code:`Chill\MainBundle\Cron\CronJobInterface`. Here is an example:
|
||||
return 'arbitrary-and-unique-key';
|
||||
}
|
||||
|
||||
public function run(): void
|
||||
public function run(array $lastExecutionData): void
|
||||
{
|
||||
// here, we execute the command
|
||||
}
|
||||
|
||||
// we return execution data, which will be served for next execution
|
||||
// this data should be easily serializable in a json column: it should contains
|
||||
// only int, string, etc. Avoid storing object
|
||||
return ['last-execution-id' => 0];
|
||||
}
|
||||
}
|
||||
|
||||
How are cron job scheduled ?
|
||||
|
@@ -28,7 +28,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
public function __construct(
|
||||
protected ActivityReasonCategoryRepository $activityReasonCategoryRepository,
|
||||
protected ActivityReasonRepository $activityReasonRepository,
|
||||
protected TranslatableStringHelper $translatableStringHelper
|
||||
protected TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class CreatorScopeAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepository $scopeRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
/**
|
||||
* The action for this report.
|
||||
*/
|
||||
protected string $action = 'sum'
|
||||
protected string $action = 'sum',
|
||||
) {
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class ListActivityHelper
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper,
|
||||
private readonly UserHelper $userHelper
|
||||
private readonly UserHelper $userHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private TranslatorInterface $translator
|
||||
private TranslatorInterface $translator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
||||
{
|
||||
public function __construct(
|
||||
protected TranslatableStringHelperInterface $translatableStringHelper,
|
||||
protected ActivityTypeRepositoryInterface $activityTypeRepository
|
||||
protected ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class UsersJobFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly UserJobRepositoryInterface $userJobRepository
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class UsersScopeFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,7 @@ class ActivityType extends AbstractType
|
||||
protected TranslatableStringHelper $translatableStringHelper,
|
||||
protected array $timeChoices,
|
||||
protected SocialIssueRender $socialIssueRender,
|
||||
protected SocialActionRender $socialActionRender
|
||||
protected SocialActionRender $socialActionRender,
|
||||
) {
|
||||
if (!$tokenStorage->getToken()->getUser() instanceof User) {
|
||||
throw new \RuntimeException('you should have a valid user');
|
||||
|
@@ -27,7 +27,7 @@ class PickActivityReasonType extends AbstractType
|
||||
public function __construct(
|
||||
private readonly ActivityReasonRepository $activityReasonRepository,
|
||||
private readonly ActivityReasonRender $reasonRender,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
|
||||
private EntityManagerInterface $em,
|
||||
private CenterResolverManagerInterface $centerResolverManager,
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
||||
private Security $security
|
||||
private Security $security,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ class ActivityReasonRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(
|
||||
ManagerRegistry $registry,
|
||||
private readonly RequestStack $requestStack
|
||||
private readonly RequestStack $requestStack,
|
||||
) {
|
||||
parent::__construct($registry, ActivityReason::class);
|
||||
}
|
||||
|
@@ -75,7 +75,7 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
|
||||
|
||||
public function __construct(
|
||||
protected Security $security,
|
||||
VoterHelperFactoryInterface $voterHelperFactory
|
||||
VoterHelperFactoryInterface $voterHelperFactory,
|
||||
) {
|
||||
$this->voterHelper = $voterHelperFactory->generate(self::class)
|
||||
->addCheckFor(Person::class, [self::SEE, self::CREATE])
|
||||
|
@@ -50,7 +50,7 @@ class ActivityContext implements
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly BaseContextData $baseContextData,
|
||||
private readonly ThirdPartyRender $thirdPartyRender,
|
||||
private readonly ThirdPartyRepository $thirdPartyRepository
|
||||
private readonly ThirdPartyRepository $thirdPartyRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
private readonly SocialIssueRepository $socialIssueRepository,
|
||||
private readonly ThirdPartyRepository $thirdPartyRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly UserRepository $userRepository
|
||||
private readonly UserRepository $userRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -76,7 +76,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
|
||||
*/
|
||||
protected function getTranslatableStringHelper(
|
||||
$locale = 'en',
|
||||
$fallbackLocale = 'en'
|
||||
$fallbackLocale = 'en',
|
||||
) {
|
||||
$prophet = new \Prophecy\Prophet();
|
||||
$requestStack = $prophet->prophesize();
|
||||
|
@@ -138,7 +138,7 @@ final class ActivityVoterTest extends KernelTestCase
|
||||
Scope $scope,
|
||||
Center $center,
|
||||
$attribute,
|
||||
$message
|
||||
$message,
|
||||
) {
|
||||
$token = $this->prepareToken($user);
|
||||
$activity = $this->prepareActivity($scope, $this->preparePerson($center));
|
||||
|
@@ -32,7 +32,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
|
||||
protected EntityManagerInterface $em,
|
||||
protected AuthorizationHelperInterface $helper,
|
||||
TokenStorageInterface $storage,
|
||||
protected ActivityACLAwareRepository $aclAwareRepository
|
||||
protected ActivityACLAwareRepository $aclAwareRepository,
|
||||
) {
|
||||
if (!$storage->getToken()->getUser() instanceof User) {
|
||||
throw new \RuntimeException('A user should be authenticated !');
|
||||
|
@@ -66,7 +66,7 @@ final class AsideActivityController extends CRUDController
|
||||
string $action,
|
||||
$query,
|
||||
Request $request,
|
||||
PaginatorInterface $paginator
|
||||
PaginatorInterface $paginator,
|
||||
) {
|
||||
if ('index' === $action) {
|
||||
return $query->orderBy('e.date', 'DESC');
|
||||
|
@@ -22,7 +22,7 @@ class ByActivityTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly AsideActivityCategoryRepository $asideActivityCategoryRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class ByUserJobAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class ByUserScopeAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn
|
||||
private AsideActivityCategoryRepository $asideActivityCategoryRepository,
|
||||
private CategoryRender $categoryRender,
|
||||
private LocationRepository $locationRepository,
|
||||
private TranslatableStringHelperInterface $translatableStringHelper
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class ByActivityTypeFilter implements FilterInterface
|
||||
public function __construct(
|
||||
private readonly CategoryRender $categoryRender,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly AsideActivityCategoryRepository $asideActivityTypeRepository
|
||||
private readonly AsideActivityCategoryRepository $asideActivityTypeRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
final readonly class ByLocationFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(
|
||||
private Security $security
|
||||
private Security $security,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class ByUserJobFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly UserJobRepositoryInterface $userJobRepository
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class ByUserScopeFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
CountNotificationTask $counter,
|
||||
TokenStorageInterface $tokenStorage,
|
||||
TranslatorInterface $translator,
|
||||
AuthorizationCheckerInterface $authorizationChecker
|
||||
AuthorizationCheckerInterface $authorizationChecker,
|
||||
) {
|
||||
$this->counter = $counter;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
|
@@ -26,7 +26,7 @@ class AsideActivityVoter extends AbstractChillVoter implements ProvideRoleHierar
|
||||
private readonly VoterHelperInterface $voterHelper;
|
||||
|
||||
public function __construct(
|
||||
VoterHelperFactoryInterface $voterHelperFactory
|
||||
VoterHelperFactoryInterface $voterHelperFactory,
|
||||
) {
|
||||
$this->voterHelper = $voterHelperFactory
|
||||
->generate(self::class)
|
||||
|
@@ -45,7 +45,7 @@ class SendTestShortMessageOnCalendarCommand extends Command
|
||||
private readonly PhoneNumberHelperInterface $phoneNumberHelper,
|
||||
private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder,
|
||||
private readonly ShortMessageTransporterInterface $transporter,
|
||||
private readonly UserRepositoryInterface $userRepository
|
||||
private readonly UserRepositoryInterface $userRepository,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ class CalendarController extends AbstractController
|
||||
private readonly PersonRepository $personRepository,
|
||||
private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||
private readonly UserRepositoryInterface $userRepository,
|
||||
private readonly TranslatorInterface $translator
|
||||
private readonly TranslatorInterface $translator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private UserJobRepository $jobRepository,
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(
|
||||
private ScopeRepository $scopeRepository,
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ final readonly class JobFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
private UserJobRepositoryInterface $userJobRepository
|
||||
private UserJobRepositoryInterface $userJobRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ class ScopeFilter implements FilterInterface
|
||||
public function __construct(
|
||||
protected TranslatorInterface $translator,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
private readonly ScopeRepositoryInterface $scopeRepository
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ class CalendarType extends AbstractType
|
||||
private readonly IdToUsersDataTransformer $idToUsersDataTransformer,
|
||||
private readonly IdToLocationDataTransformer $idToLocationDataTransformer,
|
||||
private readonly ThirdPartiesToIdDataTransformer $partiesToIdDataTransformer,
|
||||
private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer
|
||||
private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -46,7 +46,7 @@ class CalendarMessage
|
||||
public function __construct(
|
||||
Calendar $calendar,
|
||||
private readonly string $action,
|
||||
User $byUser
|
||||
User $byUser,
|
||||
) {
|
||||
$this->calendarId = $calendar->getId();
|
||||
$this->byUserId = $byUser->getId();
|
||||
|
@@ -60,7 +60,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
|
||||
'alwaysEnabled' => true,
|
||||
'scheduled' => RemoteEventConverter::convertStringDateWithoutTimezone($automaticRepliesSettings['scheduledStartDateTime']['dateTime']) < $this->clock->now()
|
||||
&& RemoteEventConverter::convertStringDateWithoutTimezone($automaticRepliesSettings['scheduledEndDateTime']['dateTime']) > $this->clock->now(),
|
||||
default => throw new UserAbsenceSyncException('this status is not documented by Microsoft')
|
||||
default => throw new UserAbsenceSyncException('this status is not documented by Microsoft'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -179,7 +179,7 @@ class MapCalendarToUser
|
||||
User $user,
|
||||
int $expiration,
|
||||
?string $id = null,
|
||||
?string $secret = null
|
||||
?string $secret = null,
|
||||
): void {
|
||||
$user->setAttributeByDomain(self::METADATA_KEY, self::EXPIRATION_SUBSCRIPTION_EVENT, $expiration);
|
||||
|
||||
|
@@ -57,7 +57,7 @@ class RemoteEventConverter
|
||||
private readonly LocationConverter $locationConverter,
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly PersonRenderInterface $personRender,
|
||||
private readonly TranslatorInterface $translator
|
||||
private readonly TranslatorInterface $translator,
|
||||
) {
|
||||
$this->defaultDateTimeZone = (new \DateTimeImmutable())->getTimezone();
|
||||
$this->remoteDateTimeZone = self::getRemoteTimeZone();
|
||||
|
@@ -353,7 +353,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
||||
[
|
||||
'id' => $id,
|
||||
'lastModifiedDateTime' => $lastModified,
|
||||
'changeKey' => $changeKey
|
||||
'changeKey' => $changeKey,
|
||||
] = $this->createOnRemote($eventData, $calendar->getMainUser(), 'calendar_'.$calendar->getId());
|
||||
|
||||
if (null === $id) {
|
||||
@@ -429,7 +429,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
||||
[
|
||||
'id' => $id,
|
||||
'lastModifiedDateTime' => $lastModified,
|
||||
'changeKey' => $changeKey
|
||||
'changeKey' => $changeKey,
|
||||
] = $this->createOnRemote(
|
||||
$eventData,
|
||||
$calendarRange->getUser(),
|
||||
@@ -566,7 +566,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
||||
[
|
||||
'id' => $id,
|
||||
'lastModifiedDateTime' => $lastModified,
|
||||
'changeKey' => $changeKey
|
||||
'changeKey' => $changeKey,
|
||||
] = $this->patchOnRemote(
|
||||
$calendar->getRemoteId(),
|
||||
$eventData,
|
||||
|
@@ -43,7 +43,7 @@ class RemoteEvent
|
||||
/**
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public bool $isAllDay = false
|
||||
public bool $isAllDay = false,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ class CalendarRangeRepository implements ObjectRepository
|
||||
\DateTimeImmutable $from,
|
||||
\DateTimeImmutable $to,
|
||||
?int $limit = null,
|
||||
?int $offset = null
|
||||
?int $offset = null,
|
||||
): array {
|
||||
$qb = $this->buildQueryAvailableRangesForUser($user, $from, $to);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<label class="form-label">{{ $t('created_availabilities') }}</label>
|
||||
<label class="form-label">{{ $t("created_availabilities") }}</label>
|
||||
<vue-multiselect
|
||||
v-model="pickedLocation"
|
||||
:options="locations"
|
||||
@@ -14,10 +14,15 @@
|
||||
></vue-multiselect>
|
||||
</div>
|
||||
</div>
|
||||
<div class="display-options row justify-content-between" style="margin-top: 1rem;">
|
||||
<div
|
||||
class="display-options row justify-content-between"
|
||||
style="margin-top: 1rem"
|
||||
>
|
||||
<div class="col-sm-9 col-xs-12">
|
||||
<div class="input-group mb-3">
|
||||
<label class="input-group-text" for="slotDuration">Durée des créneaux</label>
|
||||
<label class="input-group-text" for="slotDuration"
|
||||
>Durée des créneaux</label
|
||||
>
|
||||
<select v-model="slotDuration" id="slotDuration" class="form-select">
|
||||
<option value="00:05:00">5 minutes</option>
|
||||
<option value="00:10:00">10 minutes</option>
|
||||
@@ -58,13 +63,20 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 col-xs-12">
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="float-end">
|
||||
<div class="form-check input-group">
|
||||
<span class="input-group-text">
|
||||
<input id="showHideWE" class="mt-0" type="checkbox" v-model="showWeekends">
|
||||
<input
|
||||
id="showHideWE"
|
||||
class="mt-0"
|
||||
type="checkbox"
|
||||
v-model="showWeekends"
|
||||
/>
|
||||
</span>
|
||||
<label for="showHideWE" class="form-check-label input-group-text">Week-ends</label>
|
||||
<label for="showHideWE" class="form-check-label input-group-text"
|
||||
>Week-ends</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,39 +84,86 @@
|
||||
<FullCalendar :options="calendarOptions" ref="calendarRef">
|
||||
<template v-slot:eventContent="arg: EventApi">
|
||||
<span :class="eventClasses(arg.event)">
|
||||
<b v-if="arg.event.extendedProps.is === 'remote'">{{ arg.event.title}}</b>
|
||||
<b v-else-if="arg.event.extendedProps.is === 'range'">{{ arg.timeText }} - {{ arg.event.extendedProps.locationName }}</b>
|
||||
<b v-else-if="arg.event.extendedProps.is === 'local'">{{ arg.event.title}}</b>
|
||||
<b v-else >no 'is'</b>
|
||||
<a v-if="arg.event.extendedProps.is === 'range'" class="fa fa-fw fa-times delete"
|
||||
@click.prevent="onClickDelete(arg.event)">
|
||||
</a>
|
||||
</span>
|
||||
<b v-if="arg.event.extendedProps.is === 'remote'">{{
|
||||
arg.event.title
|
||||
}}</b>
|
||||
<b v-else-if="arg.event.extendedProps.is === 'range'"
|
||||
>{{ arg.timeText }} - {{ arg.event.extendedProps.locationName }}</b
|
||||
>
|
||||
<b v-else-if="arg.event.extendedProps.is === 'local'">{{
|
||||
arg.event.title
|
||||
}}</b>
|
||||
<b v-else>no 'is'</b>
|
||||
<a
|
||||
v-if="arg.event.extendedProps.is === 'range'"
|
||||
class="fa fa-fw fa-times delete"
|
||||
@click.prevent="onClickDelete(arg.event)"
|
||||
>
|
||||
</a>
|
||||
</span>
|
||||
</template>
|
||||
</FullCalendar>
|
||||
|
||||
<div id="copy-widget">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-sm-4 col-xs-12">
|
||||
<h6 class="chill-red">{{ $t('copy_range_from_to') }}</h6>
|
||||
</div>
|
||||
<div class="col-sm-3 col-xs-12">
|
||||
<input class="form-control" type="date" v-model="copyFrom" />
|
||||
</div>
|
||||
<div class="col-sm-1 col-xs-12" style="text-align: center; font-size: x-large;">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</div>
|
||||
<div class="col-sm-3 col-xs-12" >
|
||||
<input class="form-control" type="date" v-model="copyTo" />
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button class="btn btn-action" @click="copyDay">
|
||||
{{ $t('copy_range') }}
|
||||
</button>
|
||||
<div class="container mt-2 mb-2">
|
||||
|
||||
<div class="row justify-content-between align-items-center mb-4">
|
||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||
<h6 class="chill-red">{{ $t("copy_range_from_to") }}</h6>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-9 col-md-2">
|
||||
<select v-model="dayOrWeek" id="dayOrWeek" class="form-select">
|
||||
<option value="day">{{ $t("from_day_to_day") }}</option>
|
||||
<option value="week">{{ $t("from_week_to_week") }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<template v-if="dayOrWeek === 'day'">
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<input class="form-control" type="date" v-model="copyFrom" />
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-1 col-md-1 copy-chevron">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<input class="form-control" type="date" v-model="copyTo" />
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-5 col-md-1">
|
||||
<button class="btn btn-action float-end" @click="copyDay">
|
||||
{{ $t("copy_range") }}
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<select
|
||||
v-model="copyFromWeek"
|
||||
id="copyFromWeek"
|
||||
class="form-select"
|
||||
>
|
||||
<option v-for="w in lastWeeks" :value="w.value" :key="w.value">
|
||||
{{ w.text }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-1 col-md-1 copy-chevron">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<select v-model="copyToWeek" id="copyToWeek" class="form-select">
|
||||
<option v-for="w in nextWeeks" :value="w.value" :key="w.value">
|
||||
{{ w.text }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-5 col-md-1">
|
||||
<button class="btn btn-action float-end" @click="copyWeek">
|
||||
{{ $t("copy_range") }}
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- not directly seen, but include in a modal -->
|
||||
@@ -112,42 +171,95 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import type {
|
||||
CalendarOptions,
|
||||
DatesSetArg,
|
||||
EventInput
|
||||
} from '@fullcalendar/core';
|
||||
import {reactive, computed, ref} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
import {key} from './store';
|
||||
import FullCalendar from '@fullcalendar/vue3';
|
||||
import frLocale from '@fullcalendar/core/locales/fr';
|
||||
import interactionPlugin, {DropArg, EventResizeDoneArg} from "@fullcalendar/interaction";
|
||||
EventInput,
|
||||
} from "@fullcalendar/core";
|
||||
import { reactive, computed, ref, onMounted } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { key } from "./store";
|
||||
import FullCalendar from "@fullcalendar/vue3";
|
||||
import frLocale from "@fullcalendar/core/locales/fr";
|
||||
import interactionPlugin, {
|
||||
DropArg,
|
||||
EventResizeDoneArg,
|
||||
} from "@fullcalendar/interaction";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import {EventApi, DateSelectArg, EventDropArg, EventClickArg} from "@fullcalendar/core";
|
||||
import {ISOToDate} from "../../../../../ChillMainBundle/Resources/public/chill/js/date";
|
||||
import {
|
||||
EventApi,
|
||||
DateSelectArg,
|
||||
EventDropArg,
|
||||
EventClickArg,
|
||||
} from "@fullcalendar/core";
|
||||
import {
|
||||
dateToISO,
|
||||
ISOToDate,
|
||||
} from "../../../../../ChillMainBundle/Resources/public/chill/js/date";
|
||||
import VueMultiselect from "vue-multiselect";
|
||||
import {Location} from "../../../../../ChillMainBundle/Resources/public/types";
|
||||
import { Location } from "../../../../../ChillMainBundle/Resources/public/types";
|
||||
import EditLocation from "./Components/EditLocation.vue";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const store = useStore(key);
|
||||
|
||||
const {t} = useI18n();
|
||||
const { t } = useI18n();
|
||||
|
||||
const showWeekends = ref(false);
|
||||
const slotDuration = ref('00:05:00');
|
||||
const slotMinTime = ref('09:00:00');
|
||||
const slotMaxTime = ref('18:00:00');
|
||||
const slotDuration = ref("00:15:00");
|
||||
const slotMinTime = ref("09:00:00");
|
||||
const slotMaxTime = ref("18:00:00");
|
||||
const copyFrom = ref<string | null>(null);
|
||||
const copyTo = ref<string | null>(null);
|
||||
const editLocation = ref<InstanceType<typeof EditLocation> | null>(null)
|
||||
const editLocation = ref<InstanceType<typeof EditLocation> | null>(null);
|
||||
const dayOrWeek = ref("day");
|
||||
const copyFromWeek = ref<string | null>(null);
|
||||
const copyToWeek = ref<string | null>(null);
|
||||
|
||||
interface Weeks {
|
||||
value: string | null;
|
||||
text: string;
|
||||
}
|
||||
|
||||
const getMonday = (week: number): Date => {
|
||||
const lastMonday = new Date();
|
||||
lastMonday.setDate(
|
||||
lastMonday.getDate() - ((lastMonday.getDay() + 6) % 7) + week * 7
|
||||
);
|
||||
return lastMonday;
|
||||
};
|
||||
|
||||
const dateOptions: Intl.DateTimeFormatOptions = {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
};
|
||||
|
||||
const lastWeeks = computed((): Weeks[] =>
|
||||
Array.from(Array(30).keys()).map((w) => {
|
||||
const lastMonday = getMonday(15-w);
|
||||
return {
|
||||
value: dateToISO(lastMonday),
|
||||
text: `Semaine du ${lastMonday.toLocaleDateString("fr-FR", dateOptions)}`,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
const nextWeeks = computed((): Weeks[] =>
|
||||
Array.from(Array(52).keys()).map((w) => {
|
||||
const nextMonday = getMonday(w + 1);
|
||||
return {
|
||||
value: dateToISO(nextMonday),
|
||||
text: `Semaine du ${nextMonday.toLocaleDateString("fr-FR", dateOptions)}`,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
const baseOptions = ref<CalendarOptions>({
|
||||
locale: frLocale,
|
||||
plugins: [interactionPlugin, timeGridPlugin],
|
||||
initialView: 'timeGridWeek',
|
||||
initialView: "timeGridWeek",
|
||||
initialDate: new Date(),
|
||||
scrollTimeReset: false,
|
||||
selectable: true,
|
||||
@@ -164,9 +276,9 @@ const baseOptions = ref<CalendarOptions>({
|
||||
selectMirror: false,
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'timeGridWeek,timeGridDay'
|
||||
left: "prev,next today",
|
||||
center: "title",
|
||||
right: "timeGridWeek,timeGridDay",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -180,20 +292,23 @@ const locations = computed<Location[]>(() => {
|
||||
|
||||
const pickedLocation = computed<Location | null>({
|
||||
get(): Location | null {
|
||||
return store.state.locations.locationPicked || store.state.locations.currentLocation;
|
||||
return (
|
||||
store.state.locations.locationPicked ||
|
||||
store.state.locations.currentLocation
|
||||
);
|
||||
},
|
||||
set(newLocation: Location | null): void {
|
||||
store.commit('locations/setLocationPicked', newLocation, {root: true});
|
||||
}
|
||||
})
|
||||
store.commit("locations/setLocationPicked", newLocation, { root: true });
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* return the show classes for the event
|
||||
* @param arg
|
||||
*/
|
||||
const eventClasses = function(arg: EventApi): object {
|
||||
return {'calendarRangeItems': true};
|
||||
}
|
||||
const eventClasses = function (arg: EventApi): object {
|
||||
return { calendarRangeItems: true };
|
||||
};
|
||||
|
||||
/*
|
||||
// currently, all events are stored into calendarRanges, due to reactivity bug
|
||||
@@ -230,51 +345,60 @@ const calendarOptions = computed((): CalendarOptions => {
|
||||
* launched when the calendar range date change
|
||||
*/
|
||||
function onDatesSet(event: DatesSetArg): void {
|
||||
store.dispatch('fullCalendar/setCurrentDatesView', {start: event.start, end: event.end});
|
||||
store.dispatch("fullCalendar/setCurrentDatesView", {
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
});
|
||||
}
|
||||
|
||||
function onDateSelect(event: DateSelectArg): void {
|
||||
|
||||
if (null === pickedLocation.value) {
|
||||
window.alert("Indiquez une localisation avant de créer une période de disponibilité.");
|
||||
window.alert(
|
||||
"Indiquez une localisation avant de créer une période de disponibilité."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
store.dispatch('calendarRanges/createRange', {start: event.start, end: event.end, location: pickedLocation.value});
|
||||
store.dispatch("calendarRanges/createRange", {
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
location: pickedLocation.value,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* When a calendar range is deleted
|
||||
*/
|
||||
function onClickDelete(event: EventApi): void {
|
||||
console.log('onClickDelete', event);
|
||||
|
||||
if (event.extendedProps.is !== 'range') {
|
||||
if (event.extendedProps.is !== "range") {
|
||||
return;
|
||||
}
|
||||
|
||||
store.dispatch('calendarRanges/deleteRange', event.extendedProps.calendarRangeId);
|
||||
store.dispatch(
|
||||
"calendarRanges/deleteRange",
|
||||
event.extendedProps.calendarRangeId
|
||||
);
|
||||
}
|
||||
|
||||
function onEventDropOrResize(payload: EventDropArg | EventResizeDoneArg) {
|
||||
if (payload.event.extendedProps.is !== 'range') {
|
||||
if (payload.event.extendedProps.is !== "range") {
|
||||
return;
|
||||
}
|
||||
const changedEvent = payload.event;
|
||||
|
||||
store.dispatch('calendarRanges/patchRangeTime', {
|
||||
store.dispatch("calendarRanges/patchRangeTime", {
|
||||
calendarRangeId: payload.event.extendedProps.calendarRangeId,
|
||||
start: payload.event.start,
|
||||
end: payload.event.end,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function onEventClick(payload: EventClickArg): void {
|
||||
// @ts-ignore TS does not recognize the target. But it does exists.
|
||||
if (payload.jsEvent.target.classList.contains('delete')) {
|
||||
if (payload.jsEvent.target.classList.contains("delete")) {
|
||||
return;
|
||||
}
|
||||
if (payload.event.extendedProps.is !== 'range') {
|
||||
if (payload.event.extendedProps.is !== "range") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -285,10 +409,26 @@ function copyDay() {
|
||||
if (null === copyFrom.value || null === copyTo.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
store.dispatch('calendarRanges/copyFromDayToAnotherDay', {from: ISOToDate(copyFrom.value), to: ISOToDate(copyTo.value)})
|
||||
store.dispatch("calendarRanges/copyFromDayToAnotherDay", {
|
||||
from: ISOToDate(copyFrom.value),
|
||||
to: ISOToDate(copyTo.value),
|
||||
});
|
||||
}
|
||||
|
||||
function copyWeek() {
|
||||
if (null === copyFromWeek.value || null === copyToWeek.value) {
|
||||
return;
|
||||
}
|
||||
store.dispatch("calendarRanges/copyFromWeekToAnotherWeek", {
|
||||
fromMonday: ISOToDate(copyFromWeek.value),
|
||||
toMonday: ISOToDate(copyToWeek.value),
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
copyFromWeek.value = dateToISO(getMonday(0));
|
||||
copyToWeek.value = dateToISO(getMonday(1));
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -299,4 +439,9 @@ function copyDay() {
|
||||
z-index: 9999999999;
|
||||
padding: 0.25rem 0 0.25rem;
|
||||
}
|
||||
div.copy-chevron {
|
||||
text-align: center;
|
||||
font-size: x-large;
|
||||
width: 2rem;
|
||||
}
|
||||
</style>
|
||||
|
@@ -5,11 +5,9 @@ const appMessages = {
|
||||
show_my_calendar: "Afficher mon calendrier",
|
||||
show_weekends: "Afficher les week-ends",
|
||||
copy_range: "Copier",
|
||||
copy_range_from_to: "Copier les plages d'un jour à l'autre",
|
||||
copy_range_to_next_day: "Copier les plages du jour au jour suivant",
|
||||
copy_range_from_day: "Copier les plages du ",
|
||||
to_the_next_day: " au jour suivant",
|
||||
copy_range_to_next_week: "Copier les plages de la semaine à la semaine suivante",
|
||||
copy_range_from_to: "Copier les plages",
|
||||
from_day_to_day: "d'un jour à l'autre",
|
||||
from_week_to_week: "d'une semaine à l'autre",
|
||||
copy_range_how_to: "Créez les plages de disponibilités durant une journée et copiez-les facilement au jour suivant avec ce bouton. Si les week-ends sont cachés, le jour suivant un vendredi sera le lundi.",
|
||||
new_range_to_save: "Nouvelles plages à enregistrer",
|
||||
update_range_to_save: "Plages à modifier",
|
||||
|
@@ -52,6 +52,23 @@ export default <Module<CalendarRangesState, State>>{
|
||||
}
|
||||
}
|
||||
|
||||
return founds;
|
||||
},
|
||||
getRangesOnWeek: (state: CalendarRangesState) => (mondayDate: Date): EventInputCalendarRange[] => {
|
||||
const founds = [];
|
||||
for (let d of Array.from(Array(7).keys())) {
|
||||
const dateOfWeek = new Date(mondayDate);
|
||||
dateOfWeek.setDate(mondayDate.getDate() + d);
|
||||
const dateStr = <string>dateToISO(dateOfWeek);
|
||||
for (let range of state.ranges) {
|
||||
if (isEventInputCalendarRange(range)
|
||||
&& range.start.startsWith(dateStr)
|
||||
) {
|
||||
founds.push(range);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return founds;
|
||||
},
|
||||
},
|
||||
@@ -238,7 +255,7 @@ export default <Module<CalendarRangesState, State>>{
|
||||
|
||||
for (let r of rangesToCopy) {
|
||||
let start = new Date(<Date>ISOToDatetime(r.start));
|
||||
start.setFullYear(to.getFullYear(), to.getMonth(), to.getDate())
|
||||
start.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
|
||||
let end = new Date(<Date>ISOToDatetime(r.end));
|
||||
end.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
|
||||
let location = ctx.rootGetters['locations/getLocationById'](r.locationId);
|
||||
@@ -246,6 +263,23 @@ export default <Module<CalendarRangesState, State>>{
|
||||
promises.push(ctx.dispatch('createRange', {start, end, location}));
|
||||
}
|
||||
|
||||
return Promise.all(promises).then(_ => Promise.resolve(null));
|
||||
},
|
||||
copyFromWeekToAnotherWeek(ctx, {fromMonday, toMonday}: {fromMonday: Date, toMonday: Date}): Promise<null> {
|
||||
|
||||
const rangesToCopy: EventInputCalendarRange[] = ctx.getters['getRangesOnWeek'](fromMonday);
|
||||
const promises = [];
|
||||
const diffTime = toMonday.getTime() - fromMonday.getTime();
|
||||
for (let r of rangesToCopy) {
|
||||
let start = new Date(<Date>ISOToDatetime(r.start));
|
||||
let end = new Date(<Date>ISOToDatetime(r.end));
|
||||
start.setTime(start.getTime() + diffTime);
|
||||
end.setTime(end.getTime() + diffTime);
|
||||
let location = ctx.rootGetters['locations/getLocationById'](r.locationId);
|
||||
|
||||
promises.push(ctx.dispatch('createRange', {start, end, location}));
|
||||
}
|
||||
|
||||
return Promise.all(promises).then(_ => Promise.resolve(null));
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ final readonly class CalendarContext implements CalendarContextInterface
|
||||
private PersonRepository $personRepository,
|
||||
private ThirdPartyRender $thirdPartyRender,
|
||||
private ThirdPartyRepository $thirdPartyRepository,
|
||||
private TranslatableStringHelperInterface $translatableStringHelper
|
||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
|
||||
|
||||
public function __construct(
|
||||
private Security $security,
|
||||
private EntityManagerInterface $em
|
||||
private EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe
|
||||
|
||||
public function __construct(
|
||||
private Security $security,
|
||||
private EntityManagerInterface $em
|
||||
private EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -156,7 +156,7 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
|
||||
private function buildMultiToIdDataTransformer(
|
||||
string $classTransformer,
|
||||
string $objClass
|
||||
string $objClass,
|
||||
) {
|
||||
$transformer = $this->prophesize($classTransformer);
|
||||
$transformer->transform(Argument::type('array'))
|
||||
@@ -195,7 +195,7 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
|
||||
private function buildSingleToIdDataTransformer(
|
||||
string $classTransformer,
|
||||
string $class
|
||||
string $class,
|
||||
) {
|
||||
$transformer = $this->prophesize($classTransformer);
|
||||
$transformer->transform(Argument::type('object'))
|
||||
|
@@ -203,7 +203,7 @@ final class CalendarContextTest extends TestCase
|
||||
|
||||
private function buildCalendarContext(
|
||||
?EntityManagerInterface $entityManager = null,
|
||||
?NormalizerInterface $normalizer = null
|
||||
?NormalizerInterface $normalizer = null,
|
||||
): CalendarContext {
|
||||
$baseContext = $this->prophesize(BaseContextData::class);
|
||||
$baseContext->getData(null)->willReturn(['base_context' => 'data']);
|
||||
|
@@ -43,7 +43,7 @@ class CreateFieldsOnGroupCommand extends Command
|
||||
private readonly EntityManager $entityManager,
|
||||
private readonly ValidatorInterface $validator,
|
||||
private $availableLanguages,
|
||||
private $customizablesEntities
|
||||
private $customizablesEntities,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
/**
|
||||
* @var TranslatableStringHelper Helper that find the string in current locale from an array of translation
|
||||
*/
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ class CustomFieldDate extends AbstractCustomField
|
||||
|
||||
public function __construct(
|
||||
private readonly Environment $templating,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ class CustomFieldNumber extends AbstractCustomField
|
||||
|
||||
public function __construct(
|
||||
private readonly Environment $templating,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ class CustomFieldText extends AbstractCustomField
|
||||
|
||||
public function __construct(
|
||||
private readonly Environment $templating,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ class CustomFieldTitle extends AbstractCustomField
|
||||
/**
|
||||
* @var TranslatableStringHelper Helper that find the string in current locale from an array of translation
|
||||
*/
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class CustomFieldsGroupType extends AbstractType
|
||||
public function __construct(
|
||||
private readonly array $customizableEntities,
|
||||
// TODO : add comment about this variable
|
||||
private readonly TranslatorInterface $translator
|
||||
private readonly TranslatorInterface $translator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
DocGeneratorTemplate $template,
|
||||
string $entityClassName,
|
||||
int $entityId,
|
||||
Request $request
|
||||
Request $request,
|
||||
): Response {
|
||||
return $this->generateDocFromTemplate(
|
||||
$template,
|
||||
@@ -84,7 +84,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
DocGeneratorTemplate $template,
|
||||
string $entityClassName,
|
||||
int $entityId,
|
||||
Request $request
|
||||
Request $request,
|
||||
): Response {
|
||||
return $this->generateDocFromTemplate(
|
||||
$template,
|
||||
@@ -159,7 +159,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
DocGeneratorTemplate $template,
|
||||
int $entityId,
|
||||
Request $request,
|
||||
bool $isTest
|
||||
bool $isTest,
|
||||
): Response {
|
||||
try {
|
||||
$context = $this->contextManager->getContextByDocGeneratorTemplate($template);
|
||||
|
@@ -28,7 +28,7 @@ final class RelatorioDriver implements DriverInterface
|
||||
public function __construct(
|
||||
private readonly HttpClientInterface $client,
|
||||
ParameterBagInterface $parameterBag,
|
||||
private readonly LoggerInterface $logger
|
||||
private readonly LoggerInterface $logger,
|
||||
) {
|
||||
$this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url'];
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
|
||||
public function __construct(
|
||||
private readonly ClassMetadataFactoryInterface $classMetadataFactory,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
$this->propertyAccess = PropertyAccess::createPropertyAccessor();
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ class Generator implements GeneratorInterface
|
||||
private readonly DriverInterface $driver,
|
||||
private readonly ManagerRegistry $objectManagerRegistry,
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly StoredObjectManagerInterface $storedObjectManager
|
||||
private readonly StoredObjectManagerInterface $storedObjectManager,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ final readonly class OnGenerationFails implements EventSubscriberInterface
|
||||
private MailerInterface $mailer,
|
||||
private StoredObjectRepositoryInterface $storedObjectRepository,
|
||||
private TranslatorInterface $translator,
|
||||
private UserRepositoryInterface $userRepository
|
||||
private UserRepositoryInterface $userRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ final class BaseContextDataTest extends KernelTestCase
|
||||
}
|
||||
|
||||
private function buildBaseContext(
|
||||
?NormalizerInterface $normalizer = null
|
||||
?NormalizerInterface $normalizer = null,
|
||||
): BaseContextData {
|
||||
return new BaseContextData(
|
||||
$normalizer ?? self::$container->get(NormalizerInterface::class)
|
||||
|
@@ -36,7 +36,7 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
public function __construct(
|
||||
protected TranslatorInterface $translator,
|
||||
protected EventDispatcherInterface $eventDispatcher,
|
||||
protected AuthorizationHelper $authorizationHelper
|
||||
protected AuthorizationHelper $authorizationHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ class DocumentPersonController extends AbstractController
|
||||
public function __construct(
|
||||
protected TranslatorInterface $translator,
|
||||
protected EventDispatcherInterface $eventDispatcher,
|
||||
protected AuthorizationHelper $authorizationHelper
|
||||
protected AuthorizationHelper $authorizationHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ class DocumentCategory
|
||||
*
|
||||
* @var int The id which is unique inside the bundle
|
||||
*/
|
||||
private $idInsideBundle
|
||||
private $idInsideBundle,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -138,7 +138,7 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
|
||||
public function __construct(/**
|
||||
* @ORM\Column(type="text", options={"default": "ready"})
|
||||
*/
|
||||
private string $status = 'ready'
|
||||
private string $status = 'ready',
|
||||
) {
|
||||
$this->uuid = Uuid::uuid4();
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
final class AccompanyingCourseDocumentType extends AbstractType
|
||||
{
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
class StoredObjectDataTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly SerializerInterface $serializer
|
||||
private readonly SerializerInterface $serializer,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ interface GenericDocForAccompanyingPeriodProviderInterface
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
?string $origin = null
|
||||
?string $origin = null,
|
||||
): FetchQueryInterface;
|
||||
|
||||
/**
|
||||
|
@@ -20,7 +20,7 @@ interface GenericDocForPersonProviderInterface
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
?string $origin = null
|
||||
?string $origin = null,
|
||||
): FetchQueryInterface;
|
||||
|
||||
/**
|
||||
|
@@ -46,7 +46,7 @@ final readonly class Manager
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
array $places = [],
|
||||
): int {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
|
||||
|
||||
@@ -76,7 +76,7 @@ final readonly class Manager
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
array $places = [],
|
||||
): int {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
|
||||
|
||||
@@ -97,7 +97,7 @@ final readonly class Manager
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
array $places = [],
|
||||
): iterable {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
|
||||
|
||||
@@ -140,7 +140,7 @@ final readonly class Manager
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
array $places = [],
|
||||
): iterable {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
|
||||
|
||||
|
@@ -35,7 +35,7 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
?string $origin = null
|
||||
?string $origin = null,
|
||||
): FetchQueryInterface {
|
||||
return $this->personDocumentACLAwareRepository->buildFetchQueryForPerson(
|
||||
$person,
|
||||
|
@@ -31,13 +31,13 @@ interface PersonDocumentACLAwareRepositoryInterface
|
||||
Person $person,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null
|
||||
?string $content = null,
|
||||
): FetchQueryInterface;
|
||||
|
||||
public function buildFetchQueryForAccompanyingPeriod(
|
||||
AccompanyingPeriod $period,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null
|
||||
?string $content = null,
|
||||
): FetchQueryInterface;
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ readonly class PersonDocumentRepository implements ObjectRepository
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(
|
||||
private EntityManagerInterface $entityManager
|
||||
private EntityManagerInterface $entityManager,
|
||||
) {
|
||||
$this->repository = $this->entityManager->getRepository($this->getClassName());
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ const emit = defineEmits<{
|
||||
|
||||
const is_dragging: Ref<boolean> = ref(false);
|
||||
const uploading: Ref<boolean> = ref(false);
|
||||
const display_filename: Ref<string|null> = ref(null);
|
||||
|
||||
const has_existing_doc = computed<boolean>(() => {
|
||||
return props.existingDoc !== undefined && props.existingDoc !== null;
|
||||
@@ -79,6 +80,7 @@ const onFileChange = async (event: Event): Promise<void> => {
|
||||
|
||||
const handleFile = async (file: File): Promise<void> => {
|
||||
uploading.value = true;
|
||||
display_filename.value = file.name;
|
||||
const type = file.type;
|
||||
const buffer = await file.arrayBuffer();
|
||||
const [encrypted, iv, jsonWebKey] = await encryptFile(buffer);
|
||||
@@ -103,7 +105,7 @@ const handleFile = async (file: File): Promise<void> => {
|
||||
<template>
|
||||
<div class="drop-file">
|
||||
<div v-if="!uploading" :class="{ area: true, dragging: is_dragging}" @click="onZoneClick" @dragover="onDragOver" @dragleave="onDragLeave" @drop="onDrop">
|
||||
<p v-if="has_existing_doc">
|
||||
<p v-if="has_existing_doc" class="file-icon">
|
||||
<i class="fa fa-file-pdf-o" v-if="props.existingDoc?.type === 'application/pdf'"></i>
|
||||
<i class="fa fa-file-word-o" v-else-if="props.existingDoc?.type === 'application/vnd.oasis.opendocument.text'"></i>
|
||||
<i class="fa fa-file-word-o" v-else-if="props.existingDoc?.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'"></i>
|
||||
@@ -115,6 +117,8 @@ const handleFile = async (file: File): Promise<void> => {
|
||||
<i class="fa fa-file-archive-o" v-else-if="props.existingDoc?.type === 'application/x-zip-compressed'"></i>
|
||||
<i class="fa fa-file-code-o" v-else ></i>
|
||||
</p>
|
||||
|
||||
<p v-if="display_filename !== null" class="display-filename">{{ display_filename }}</p>
|
||||
<!-- todo i18n -->
|
||||
<p v-if="has_existing_doc">Déposez un document ou cliquez ici pour remplacer le document existant</p>
|
||||
<p v-else>Déposez un document ou cliquez ici pour ouvrir le navigateur de fichier</p>
|
||||
@@ -130,9 +134,18 @@ const handleFile = async (file: File): Promise<void> => {
|
||||
.drop-file {
|
||||
width: 100%;
|
||||
|
||||
.file-icon {
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
.display-filename {
|
||||
font-variant: small-caps;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
& > .area, & > .waiting {
|
||||
width: 100%;
|
||||
height: 8rem;
|
||||
height: 10rem;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -149,7 +162,4 @@ const handleFile = async (file: File): Promise<void> => {
|
||||
}
|
||||
}
|
||||
|
||||
div.chill-collection ul.list-entry li.entry:nth-child(2n) {
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a :class="props.classes" @click="download_and_open($event)">
|
||||
<a :class="props.classes" @click="download_and_open($event)" ref="btn">
|
||||
<i class="fa fa-file-pdf-o"></i>
|
||||
Télécharger en pdf
|
||||
</a>
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import {build_convert_link, download_and_decrypt_doc, download_doc} from "./helpers";
|
||||
import mime from "mime";
|
||||
import {reactive} from "vue";
|
||||
import {reactive, ref} from "vue";
|
||||
import {StoredObject, StoredObjectCreated} from "../../types";
|
||||
|
||||
interface ConvertButtonConfig {
|
||||
@@ -24,6 +24,7 @@ interface DownloadButtonState {
|
||||
|
||||
const props = defineProps<ConvertButtonConfig>();
|
||||
const state: DownloadButtonState = reactive({content: null});
|
||||
const btn = ref<HTMLAnchorElement | null>(null);
|
||||
|
||||
async function download_and_open(event: Event): Promise<void> {
|
||||
const button = event.target as HTMLAnchorElement;
|
||||
@@ -41,6 +42,14 @@ async function download_and_open(event: Event): Promise<void> {
|
||||
}
|
||||
|
||||
button.click();
|
||||
const reset_pending = setTimeout(reset_state, 45000);
|
||||
}
|
||||
|
||||
function reset_state(): void {
|
||||
state.content = null;
|
||||
btn.value?.removeAttribute('download');
|
||||
btn.value?.removeAttribute('href');
|
||||
btn.value?.removeAttribute('type');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@@ -86,6 +86,14 @@ async function download_and_open(event: Event): Promise<void> {
|
||||
console.log('openbutton after next tick', open_button.value);
|
||||
open_button.value?.click();
|
||||
console.log('open button should have been clicked');
|
||||
|
||||
const timer = setTimeout(reset_state, 45000);
|
||||
}
|
||||
|
||||
function reset_state(): void {
|
||||
state.href_url = '#';
|
||||
state.is_ready = false;
|
||||
state.is_running = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@@ -40,7 +40,7 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov
|
||||
public function __construct(
|
||||
protected LoggerInterface $logger,
|
||||
protected Security $security,
|
||||
VoterHelperFactoryInterface $voterHelperFactory
|
||||
VoterHelperFactoryInterface $voterHelperFactory,
|
||||
) {
|
||||
$this->voterHelper = $voterHelperFactory
|
||||
->generate(self::class)
|
||||
|
@@ -40,7 +40,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
|
||||
public function __construct(
|
||||
protected LoggerInterface $logger,
|
||||
protected Security $security,
|
||||
VoterHelperFactoryInterface $voterHelperFactory
|
||||
VoterHelperFactoryInterface $voterHelperFactory,
|
||||
) {
|
||||
$this->voterHelper = $voterHelperFactory
|
||||
->generate(self::class)
|
||||
|
@@ -49,7 +49,7 @@ class StoredObjectVoter extends Voter
|
||||
|
||||
return match ($askedRole) {
|
||||
StoredObjectRoleEnum::SEE => StoredObjectRoleEnum::EDIT === $tokenRoleAuthorization || StoredObjectRoleEnum::SEE === $tokenRoleAuthorization,
|
||||
StoredObjectRoleEnum::EDIT => StoredObjectRoleEnum::EDIT === $tokenRoleAuthorization
|
||||
StoredObjectRoleEnum::EDIT => StoredObjectRoleEnum::EDIT === $tokenRoleAuthorization,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class DavTokenAuthenticationEventSubscriber implements EventSubscriberInterface
|
||||
$token->setAttribute(self::ACTIONS, match ($payload['e']) {
|
||||
0 => StoredObjectRoleEnum::SEE,
|
||||
1 => StoredObjectRoleEnum::EDIT,
|
||||
default => throw new \UnexpectedValueException('unsupported value for e parameter')
|
||||
default => throw new \UnexpectedValueException('unsupported value for e parameter'),
|
||||
});
|
||||
|
||||
$token->setAttribute(self::STORED_OBJECT, $payload['so']);
|
||||
|
@@ -32,7 +32,7 @@ final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwa
|
||||
|
||||
public function __construct(
|
||||
private readonly JWTDavTokenProviderInterface $JWTDavTokenProvider,
|
||||
private readonly UrlGeneratorInterface $urlGenerator
|
||||
private readonly UrlGeneratorInterface $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -94,7 +94,7 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
|
||||
AccompanyingPeriod $period,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null
|
||||
?string $content = null,
|
||||
): void {
|
||||
$centerManager = $this->prophesize(CenterResolverManagerInterface::class);
|
||||
$centerManager->resolveCenters(Argument::type(Person::class))
|
||||
|
@@ -29,7 +29,7 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
|
||||
*/
|
||||
public function __construct(
|
||||
EntityManagerInterface $em,
|
||||
private readonly TranslatorInterface $translator
|
||||
private readonly TranslatorInterface $translator,
|
||||
) {
|
||||
$this->repository = $em->getRepository(AccompanyingCourseDocument::class);
|
||||
}
|
||||
|
@@ -555,7 +555,7 @@ final class ParticipationController extends AbstractController
|
||||
protected function handleRequest(
|
||||
Request $request,
|
||||
Participation $participation,
|
||||
bool $multiple = false
|
||||
bool $multiple = false,
|
||||
): array|Participation {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
|
||||
{
|
||||
public function __construct(
|
||||
protected TranslatableStringHelperInterface $translatableStringHelper,
|
||||
protected EventTypeRepository $eventTypeRepository
|
||||
protected EventTypeRepository $eventTypeRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
public function __construct(
|
||||
protected TranslatableStringHelperInterface $translatableStringHelper,
|
||||
protected RoleRepository $roleRepository
|
||||
protected RoleRepository $roleRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function __construct(
|
||||
EntityRepository $eventRepository,
|
||||
?array $centers = null
|
||||
?array $centers = null,
|
||||
) {
|
||||
$this->eventRepository = $eventRepository;
|
||||
|
||||
|
@@ -42,7 +42,7 @@ final class PickEventType extends AbstractType
|
||||
private readonly AuthorizationHelperInterface $authorizationHelper,
|
||||
private readonly UrlGeneratorInterface $urlGenerator,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly Security $security
|
||||
private readonly Security $security,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ final class PickRoleType extends AbstractType
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly RoleRepository $roleRepository
|
||||
private readonly RoleRepository $roleRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user