Loading module/Evenementiel/config/module.config.php +4 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Evenementiel\Service\Notification\NotificationServiceFactory; use Evenementiel\Service\Url\UrlService; use Evenementiel\Service\Url\UrlServiceFactory; use Evenementiel\View\Helper\InscriptionButtonHelper; use Evenementiel\View\Helper\InscriptionPlaces; use Evenementiel\View\Helper\PopulateCollection; use Evenementiel\View\Helper\RenderPlacesCollection; Loading Loading @@ -73,10 +74,12 @@ return array( 'factories' => [ PopulateCollection::class => Laminas\ServiceManager\Factory\InvokableFactory::class, RenderPlacesCollection::class => Laminas\ServiceManager\Factory\InvokableFactory::class, InscriptionPlaces::class => Laminas\ServiceManager\Factory\InvokableFactory::class, ], 'aliases' => [ 'populateCollection' => PopulateCollection::class, 'renderPlacesCollection' => RenderPlacesCollection::class 'renderPlacesCollection' => RenderPlacesCollection::class, 'inscriptionPlaces' => InscriptionPlaces::class, ], Loading module/Evenementiel/src/Controller/EvenementController.php +3 −2 Original line number Diff line number Diff line Loading @@ -579,6 +579,7 @@ class EvenementController extends AbstractActionController if ($existingInscription !== null) { $existingInscription->dehistoriser(); $existingInscription->setNombrePlacesDemandees($inscription->getNombrePlacesDemandees()); $existingInscription->setPlaces($inscription->getPlaces()); $inscription = $existingInscription; } else { $inscription->setParticipant($participant); Loading @@ -586,8 +587,8 @@ class EvenementController extends AbstractActionController $this->getInscriptionService()->create($inscription); $this->getEtatInstanceService()->setEtatActif($inscription, InscriptionEtats::INSCRIPTION_DEMANDE); // $this->getNotificationService()->triggerInscriptionDemande($inscription); // $this->getEtatInstanceService()->setEtatActif($inscription, InscriptionEtats::INSCRIPTION_VALIDER); $this->getNotificationService()->triggerInscriptionDemande($inscription); $this->getEtatInstanceService()->setEtatActif($inscription, InscriptionEtats::INSCRIPTION_VALIDER); // $this->getNotificationService()->triggerListePrincipale($inscription); // $this->flashMessenger()->addSuccessMessage("Inscription faite."); Loading module/Evenementiel/src/Controller/InscriptionController.php +2 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,8 @@ class InscriptionController extends AbstractActionController public function autoInscriptionAction(): ViewModel { $participant = $this->getParticipantService()->getParticipantUsager(); $evenements = $this->getEvenementService()->getEvenementsByEtat(EvenementEtats::ETAT_INSCRIPTION_OUVERTE); // $evenements = $this->getEvenementService()->getEvenementsByEtat(EvenementEtats::ETAT_INSCRIPTION_OUVERTE); $evenements = $this->getEvenementService()->getEvenementsActives(); return new ViewModel([ 'participant' => $participant, Loading module/Evenementiel/src/Entity/Db/Categorie.php +7 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,13 @@ class Categorie implements HistoriqueAwareInterface [EvenementEtats::ETAT_INSCRIPTION_OUVERTE]) and $e->getDateTimeFin() > $date; }); usort($evenements, function (Evenement $a,Evenement $b) { $da = $a->getDateTimeDebut() ?? PHP_INT_MAX; $db = $b->getDateTimeDebut() ?? PHP_INT_MAX; return $da <=> $db; }); return $evenements ; } Loading module/Evenementiel/src/Entity/Db/Inscription.php +22 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,16 @@ class Inscription implements HistoriqueAwareInterface, HasEtatsInterface, Resour return $this->places; } public function setPlaces(?Collection $places): void { foreach ($places as $place) { /** @var InscriptionPlace $place */ $place->setInscription($this); } $this->places = $places; } public function addPlace(InscriptionPlace $place): self { if (!$this->places->contains($place)) { Loading Loading @@ -196,6 +206,18 @@ class Inscription implements HistoriqueAwareInterface, HasEtatsInterface, Resour return $this->getNombrePlacesDemandees() . ' place' . ($this->getNombrePlacesDemandees() > 1 ? 's' : ''); } public function getArrayDenominationPlaces(): array { $tab = []; foreach($this->getPlaces() as $place) { /** @var InscriptionPlace $place */ $tab[] = $place->getDenomination(); } sort($tab); return $tab; } public function getEtape(): ?string { return $this->etape; Loading Loading
module/Evenementiel/config/module.config.php +4 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Evenementiel\Service\Notification\NotificationServiceFactory; use Evenementiel\Service\Url\UrlService; use Evenementiel\Service\Url\UrlServiceFactory; use Evenementiel\View\Helper\InscriptionButtonHelper; use Evenementiel\View\Helper\InscriptionPlaces; use Evenementiel\View\Helper\PopulateCollection; use Evenementiel\View\Helper\RenderPlacesCollection; Loading Loading @@ -73,10 +74,12 @@ return array( 'factories' => [ PopulateCollection::class => Laminas\ServiceManager\Factory\InvokableFactory::class, RenderPlacesCollection::class => Laminas\ServiceManager\Factory\InvokableFactory::class, InscriptionPlaces::class => Laminas\ServiceManager\Factory\InvokableFactory::class, ], 'aliases' => [ 'populateCollection' => PopulateCollection::class, 'renderPlacesCollection' => RenderPlacesCollection::class 'renderPlacesCollection' => RenderPlacesCollection::class, 'inscriptionPlaces' => InscriptionPlaces::class, ], Loading
module/Evenementiel/src/Controller/EvenementController.php +3 −2 Original line number Diff line number Diff line Loading @@ -579,6 +579,7 @@ class EvenementController extends AbstractActionController if ($existingInscription !== null) { $existingInscription->dehistoriser(); $existingInscription->setNombrePlacesDemandees($inscription->getNombrePlacesDemandees()); $existingInscription->setPlaces($inscription->getPlaces()); $inscription = $existingInscription; } else { $inscription->setParticipant($participant); Loading @@ -586,8 +587,8 @@ class EvenementController extends AbstractActionController $this->getInscriptionService()->create($inscription); $this->getEtatInstanceService()->setEtatActif($inscription, InscriptionEtats::INSCRIPTION_DEMANDE); // $this->getNotificationService()->triggerInscriptionDemande($inscription); // $this->getEtatInstanceService()->setEtatActif($inscription, InscriptionEtats::INSCRIPTION_VALIDER); $this->getNotificationService()->triggerInscriptionDemande($inscription); $this->getEtatInstanceService()->setEtatActif($inscription, InscriptionEtats::INSCRIPTION_VALIDER); // $this->getNotificationService()->triggerListePrincipale($inscription); // $this->flashMessenger()->addSuccessMessage("Inscription faite."); Loading
module/Evenementiel/src/Controller/InscriptionController.php +2 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,8 @@ class InscriptionController extends AbstractActionController public function autoInscriptionAction(): ViewModel { $participant = $this->getParticipantService()->getParticipantUsager(); $evenements = $this->getEvenementService()->getEvenementsByEtat(EvenementEtats::ETAT_INSCRIPTION_OUVERTE); // $evenements = $this->getEvenementService()->getEvenementsByEtat(EvenementEtats::ETAT_INSCRIPTION_OUVERTE); $evenements = $this->getEvenementService()->getEvenementsActives(); return new ViewModel([ 'participant' => $participant, Loading
module/Evenementiel/src/Entity/Db/Categorie.php +7 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,13 @@ class Categorie implements HistoriqueAwareInterface [EvenementEtats::ETAT_INSCRIPTION_OUVERTE]) and $e->getDateTimeFin() > $date; }); usort($evenements, function (Evenement $a,Evenement $b) { $da = $a->getDateTimeDebut() ?? PHP_INT_MAX; $db = $b->getDateTimeDebut() ?? PHP_INT_MAX; return $da <=> $db; }); return $evenements ; } Loading
module/Evenementiel/src/Entity/Db/Inscription.php +22 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,16 @@ class Inscription implements HistoriqueAwareInterface, HasEtatsInterface, Resour return $this->places; } public function setPlaces(?Collection $places): void { foreach ($places as $place) { /** @var InscriptionPlace $place */ $place->setInscription($this); } $this->places = $places; } public function addPlace(InscriptionPlace $place): self { if (!$this->places->contains($place)) { Loading Loading @@ -196,6 +206,18 @@ class Inscription implements HistoriqueAwareInterface, HasEtatsInterface, Resour return $this->getNombrePlacesDemandees() . ' place' . ($this->getNombrePlacesDemandees() > 1 ? 's' : ''); } public function getArrayDenominationPlaces(): array { $tab = []; foreach($this->getPlaces() as $place) { /** @var InscriptionPlace $place */ $tab[] = $place->getDenomination(); } sort($tab); return $tab; } public function getEtape(): ?string { return $this->etape; Loading