Améliorations des événements : autorisation, participation et calendrier#49
Améliorations des événements : autorisation, participation et calendrier#49
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements group-based access control for events and refactors the participation modal into a reusable component. It enables events to be restricted to specific groups and prevents unauthorized participation.
- Adds group membership validation for event participation
- Extracts duplicated participation modal code into a reusable partial template
- Conditionally displays form fields based on event type (training vs. contest)
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Helper/EventHelper.php | Adds canLicenseeParticipateInEvent() and getAllParticipantsForEvent() methods for group-based access control |
| src/Controller/EventController.php | Validates participation permissions and passes authorization status to templates |
| src/Form/EventParticipationType.php | Makes form fields conditional based on event type and sets appropriate defaults |
| src/Entity/EventParticipation.php | Makes targetType field nullable for non-contest events |
| templates/event/_participation_modal.html.twig | New reusable modal component supporting both contest and training events |
| templates/event/show_training.html.twig | Uses new modal partial and adds group-based button disabling |
| templates/event/show_default.html.twig | Uses new modal partial and adds group-based button disabling |
| templates/event/show_contest.html.twig | Uses new modal partial and adds group-based button disabling |
| migrations/Version20251102230310.php | Database migration to make target_type nullable |
| Makefile | Adds start-fg command for foreground Docker Compose execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rectional hover highlighting
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|


Fonctionnalités ajoutées
🔐 Autorisation par groupe
🎯 États de participation dynamiques
📋 Liste de participants améliorée
📆 Grille calendrier améliorée
repeat(7, 1fr)pour une grille uniforme✨ Interface unifiée
🔒 Sécurité et qualité du code
e('html_attr')'data'dans les formulaires<span>pour compatibilité Bootstrap📚 Documentation et outillage
sitemap.xmletrobots.txtpour éviter les 404Modifications techniques
Backend (PHP)
EventHelper: méthodescanLicenseeParticipateInEvent()etgetAllParticipantsForEvent()EventParticipationType: choix conditionnels selon le type d'événement, suppression de l'option'data'EventController: validation d'autorisation avant persistanceFrontend (Templates)
templates/event/index.html.twig: grille calendrier avec survol et contrôleur Stimulustemplates/event/show_*.html.twig: tooltips contextuels, affichage des groupes, attributs sécuriséstemplates/event/_participation_modal.html.twig: composant réutilisableFrontend (Assets)
assets/controllers/event_highlight_controller.ts: interactions de survol bidirectionnellesassets/styles/_calendar.scss: positionnement sticky, effets de survolassets/styles/_events.scss: styles de surlignage pour la listeBase de données
target_typenullable pour les entraînementsDocumentation
AGENTS.md: documentation pour assistants IATODO.md: roadmap d'améliorationspublic/sitemap.xml: sitemap vide mais validepublic/robots.txt: directives pour robots d'indexationstart-fg� Corrections de bugs
show_default.html.twig'data'supprimée)