Loading module/Formation/config/merged/formation-instance-inscrit.config.php +11 Changes for module/Formation/config/merged/formation-instance-inscrit.config.php: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ return [ [ 'controller' => FormationInstanceInscritController::class, 'action' => [ 'afficher-agent', 'ajouter-agent', 'historiser-agent', 'restaurer-agent', Loading Loading @@ -214,6 +215,16 @@ return [ ], ], ], 'afficher-agent' => [ 'type' => Segment::class, 'options' => [ 'route' => '/afficher-agent/:inscrit', 'defaults' => [ 'controller' => FormationInstanceInscritController::class, 'action' => 'afficher-agent', ], ], ], 'historiser-agent' => [ 'type' => Segment::class, 'options' => [ Loading module/Formation/src/Formation/Controller/DemandeExterneController.php +12 −4 Changes for module/Formation/src/Formation/Controller/DemandeExterneController.php: 12 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Formation\Form\Demande2Formation\Demande2FormationFormAwareTrait; use Formation\Form\DemandeExterne\DemandeExterneFormAwareTrait; use Formation\Form\Inscription\InscriptionFormAwareTrait; use Formation\Provider\Etat\DemandeExterneEtats; use Formation\Provider\Etat\InscriptionEtats; use Formation\Provider\Validation\DemandeExterneValidations; use Formation\Service\DemandeExterne\DemandeExterneServiceAwareTrait; use Formation\Service\Notification\NotificationServiceAwareTrait; Loading Loading @@ -345,16 +346,23 @@ class DemandeExterneController extends AbstractActionController { /** GESTION DES DEMANDES *************************************************************************/ public function parapheurAction() : ViewModel { $params = [ 'etat' => $this->getEtatService()->getEtatByCode(DemandeExterneEtats::ETAT_VALIDATION_RESP), $paramsInternes = [ 'etat' => $this->getEtatService()->getEtatByCode(InscriptionEtats::ETAT_VALIDER_RESPONSABLE), 'historise' => '0', 'annee' => Formation::getAnnee(), ]; $demandesInternes = $this->getDemandeExterneService()->getFormationInstanceInscritService()->getInscriptionsWithFiltre($paramsInternes); $demandes = $this->getDemandeExterneService()->getDemandesExternesWithFiltre($params); $paramsExternes = [ 'etat' => $this->getEtatService()->getEtatByCode(DemandeExterneEtats::ETAT_VALIDATION_RESP), 'historise' => '0', 'annee' => Formation::getAnnee(), ]; $demandesExternes = $this->getDemandeExterneService()->getDemandesExternesWithFiltre($paramsExternes); return new ViewModel([ 'demandes' => $demandes, 'demandesInternes' => $demandesInternes, 'demandesExternes' => $demandesExternes, ]); } Loading module/Formation/src/Formation/Controller/FormationInstanceInscritController.php +10 Changes for module/Formation/src/Formation/Controller/FormationInstanceInscritController.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -44,6 +44,16 @@ class FormationInstanceInscritController extends AbstractActionController use InscriptionFormAwareTrait; use SelectionAgentFormAwareTrait; public function afficherAgentAction() : ViewModel { $inscrit = $this->getFormationInstanceInscritService()->getRequestedFormationInstanceInscrit($this); return new ViewModel([ 'agent' => $inscrit->getAgent(), 'demande' => $inscrit, ]); } public function ajouterAgentAction() : ViewModel { $instance = $this->getFormationInstanceService()->getRequestedFormationInstance($this); Loading module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php +23 Changes for module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php: 23 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -300,4 +300,27 @@ class FormationInstanceInscritService $result = $this->getInscriptionsValideesByAgentsAndEtats($agents, $etats, $annee); return $result; } public function getInscriptionsWithFiltre(array $params) { $qb = $this->createQueryBuilder()->orderBy('inscrit.histoCreation', 'asc'); if (isset($params['etat'])) $qb = $qb->andWhere('inscrit.etat = :etat')->setParameter('etat', $params['etat']); if (isset($params['historise'])) { if ($params['historise'] === '1') $qb = $qb->andWhere('inscrit.histoDestruction IS NOT NULL'); if ($params['historise'] === '0') $qb = $qb->andWhere('inscrit.histoDestruction IS NULL'); } if (isset($params['annee']) AND $params['annee'] !== '') { $annee = (int) $params['annee']; $debut = DateTime::createFromFormat('d/m/Y', '01/09/'.$annee); $fin = DateTime::createFromFormat('d/m/Y', '31/08/'.($annee+1)); $qb = $qb ->andWhere('journee.jour >= :debut')->setParameter('debut', $debut) ->andWhere('journee.jour <= :fin')->setParameter('fin', $fin) ; } $result = $qb->getQuery()->getResult(); return $result; } } No newline at end of file module/Formation/view/formation/demande-externe/afficher.phtml −2 Changes for module/Formation/view/formation/demande-externe/afficher.phtml: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ use Application\Entity\Db\Agent; use Fichier\Entity\Db\Fichier; use Formation\Entity\Db\DemandeExterne; //use Formation\Provider\Etat\DemandeExterneEtats; //use Formation\Provider\Privilege\DemandeexternePrivileges; use Formation\Provider\Validation\DemandeExterneValidations; /** Loading Loading
module/Formation/config/merged/formation-instance-inscrit.config.php +11 Changes for module/Formation/config/merged/formation-instance-inscrit.config.php: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ return [ [ 'controller' => FormationInstanceInscritController::class, 'action' => [ 'afficher-agent', 'ajouter-agent', 'historiser-agent', 'restaurer-agent', Loading Loading @@ -214,6 +215,16 @@ return [ ], ], ], 'afficher-agent' => [ 'type' => Segment::class, 'options' => [ 'route' => '/afficher-agent/:inscrit', 'defaults' => [ 'controller' => FormationInstanceInscritController::class, 'action' => 'afficher-agent', ], ], ], 'historiser-agent' => [ 'type' => Segment::class, 'options' => [ Loading
module/Formation/src/Formation/Controller/DemandeExterneController.php +12 −4 Changes for module/Formation/src/Formation/Controller/DemandeExterneController.php: 12 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ use Formation\Form\Demande2Formation\Demande2FormationFormAwareTrait; use Formation\Form\DemandeExterne\DemandeExterneFormAwareTrait; use Formation\Form\Inscription\InscriptionFormAwareTrait; use Formation\Provider\Etat\DemandeExterneEtats; use Formation\Provider\Etat\InscriptionEtats; use Formation\Provider\Validation\DemandeExterneValidations; use Formation\Service\DemandeExterne\DemandeExterneServiceAwareTrait; use Formation\Service\Notification\NotificationServiceAwareTrait; Loading Loading @@ -345,16 +346,23 @@ class DemandeExterneController extends AbstractActionController { /** GESTION DES DEMANDES *************************************************************************/ public function parapheurAction() : ViewModel { $params = [ 'etat' => $this->getEtatService()->getEtatByCode(DemandeExterneEtats::ETAT_VALIDATION_RESP), $paramsInternes = [ 'etat' => $this->getEtatService()->getEtatByCode(InscriptionEtats::ETAT_VALIDER_RESPONSABLE), 'historise' => '0', 'annee' => Formation::getAnnee(), ]; $demandesInternes = $this->getDemandeExterneService()->getFormationInstanceInscritService()->getInscriptionsWithFiltre($paramsInternes); $demandes = $this->getDemandeExterneService()->getDemandesExternesWithFiltre($params); $paramsExternes = [ 'etat' => $this->getEtatService()->getEtatByCode(DemandeExterneEtats::ETAT_VALIDATION_RESP), 'historise' => '0', 'annee' => Formation::getAnnee(), ]; $demandesExternes = $this->getDemandeExterneService()->getDemandesExternesWithFiltre($paramsExternes); return new ViewModel([ 'demandes' => $demandes, 'demandesInternes' => $demandesInternes, 'demandesExternes' => $demandesExternes, ]); } Loading
module/Formation/src/Formation/Controller/FormationInstanceInscritController.php +10 Changes for module/Formation/src/Formation/Controller/FormationInstanceInscritController.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -44,6 +44,16 @@ class FormationInstanceInscritController extends AbstractActionController use InscriptionFormAwareTrait; use SelectionAgentFormAwareTrait; public function afficherAgentAction() : ViewModel { $inscrit = $this->getFormationInstanceInscritService()->getRequestedFormationInstanceInscrit($this); return new ViewModel([ 'agent' => $inscrit->getAgent(), 'demande' => $inscrit, ]); } public function ajouterAgentAction() : ViewModel { $instance = $this->getFormationInstanceService()->getRequestedFormationInstance($this); Loading
module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php +23 Changes for module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php: 23 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -300,4 +300,27 @@ class FormationInstanceInscritService $result = $this->getInscriptionsValideesByAgentsAndEtats($agents, $etats, $annee); return $result; } public function getInscriptionsWithFiltre(array $params) { $qb = $this->createQueryBuilder()->orderBy('inscrit.histoCreation', 'asc'); if (isset($params['etat'])) $qb = $qb->andWhere('inscrit.etat = :etat')->setParameter('etat', $params['etat']); if (isset($params['historise'])) { if ($params['historise'] === '1') $qb = $qb->andWhere('inscrit.histoDestruction IS NOT NULL'); if ($params['historise'] === '0') $qb = $qb->andWhere('inscrit.histoDestruction IS NULL'); } if (isset($params['annee']) AND $params['annee'] !== '') { $annee = (int) $params['annee']; $debut = DateTime::createFromFormat('d/m/Y', '01/09/'.$annee); $fin = DateTime::createFromFormat('d/m/Y', '31/08/'.($annee+1)); $qb = $qb ->andWhere('journee.jour >= :debut')->setParameter('debut', $debut) ->andWhere('journee.jour <= :fin')->setParameter('fin', $fin) ; } $result = $qb->getQuery()->getResult(); return $result; } } No newline at end of file
module/Formation/view/formation/demande-externe/afficher.phtml −2 Changes for module/Formation/view/formation/demande-externe/afficher.phtml: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,8 +3,6 @@ use Application\Entity\Db\Agent; use Fichier\Entity\Db\Fichier; use Formation\Entity\Db\DemandeExterne; //use Formation\Provider\Etat\DemandeExterneEtats; //use Formation\Provider\Privilege\DemandeexternePrivileges; use Formation\Provider\Validation\DemandeExterneValidations; /** Loading