feat: système de goals multiples avec animations et auto-save - #30
Merged
Conversation
…references - Restore initGoalsManager() in admin.js with chips UI and window.previewGoal sync - Remove stream_goal/event_goal input lookups from preview functions (replaced by window.previewGoal) - Fix event/edit.html.twig: replace event.goal references with eventGoals[0] ?? 1000 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fetch endpoints now return active goal in JSON response - JS detects goal change between polls, triggers fireworks + banner - CSS: particle burst animation, goal-reached banner, goal text flash - Goal text updates live to show the next objective Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bar fills to 100% when a goal is crossed, then shimmer/glow plays (2.4s) - Bar then resets to the new percentage relative to the next goal - Goal text updates live to show the next objective - Both stream and event donation bar endpoints now return active goal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backend: all 4 fetch endpoints now return allGoalsReached flag - Donation bar: stays at 100% when last goal is crossed (no reset) - Card: banner shows "Tous les objectifs atteints !" instead of "Prochain objectif" - Detection: justCrossedGoal catches both goal change AND last goal threshold crossing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…vent edit templates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dion reorder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace full card section with a compact toggle slider in the page header - Show simulation section (amount, reset, simulate form) only when mode is active - Show reload reminder only when mode is active Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Checkboxes don't submit their value when unchecked, so toggling off never reached the backend. The hidden input ensures toggle_test_mode=1 is always sent on form submit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- In triggerGoalAnimation: call updateDonationBar in the isLastGoal branch so the current-amount counter updates after the shimmer animation ends - In stream.js / event.js: initialize CountUp with currentAmount/100 (euros) instead of raw centimes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Cette branche implémente un système de goals (objectifs de collecte) multiples pour les streams et events, remplaçant l'ancien goal unique sur le widget donation. Les goals sont affichés sur le widget card avec des animations et gérés depuis l'interface d'administration. Elle introduit également la gestion de multi-admins sur un event.
Fonctionnalités implémentées
Backend
Goal+ migration17-add-goals-table.sql— tablegoalsavecstream_id,event_id,amount,label,orderGoalRepository— CRUD complet :findByStreamId,findByEventId,createGoal,updateGoal,deleteGoal,reorderGoalsAdminController— nouvelles routes POST pour ajouter/supprimer des goals avec auto-saveWidgetController— injection des goals dans le contexte du widget card16-drop-donation-widget-goal.sql— suppression de l'ancien champgoaldu widget donationEventRepository/StreamRepository— suppression des références à l'ancien champgoalMulti-admins sur un event
18-event-multi-admin.sql— ajout d'une colonneis_ownersuruser_right; les admins existants sont migrés enis_owner = 1UserRepository— nouvelles méthodes :selectEventAdmins,isEventOwner,deleteEventRight,insertRight(avec flagis_owner)AdminController— gestion des admins depuis la page d'édition d'un event : ajout par email (add_admin), suppression (remove_admin), réservé à l'owner de l'event ou à un admin globalFrontend — Widget card
Frontend — Interface admin
UX / Structure
Documentation
docs/goals-system.md— documentation complète : architecture, routes API, comportement frontend, guide d'utilisationMigrations à appliquer
Test plan
goaldu widget donation n'est plus présent