Loading module/Application/config/merged/menu.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ return [ 'icon' => 'fas fa-angle-right' ], [ 'label' => 'Les fiches types', 'label' => 'Les fiches métiers', 'route' => 'fiche-metier-type', 'privileges' => FicheMetierPrivileges::AFFICHER, 'dropdown-header' => true, Loading module/Application/src/Application/Controller/Activite/ActiviteController.php +3 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ class ActiviteController extends AbstractActionController { if ($form->isValid()) { $this->getActiviteService()->create($activite); // $this->redirect()->toRoute('activite'); } } Loading Loading @@ -93,7 +92,7 @@ class ActiviteController extends AbstractActionController { $activite = $this->getActiviteService()->getRequestedActivite($this, 'activite'); $this->getActiviteService()->historise($activite); $this->redirect()->toRoute('activite'); return $this->redirect()->toRoute('activite'); } public function restaurerAction() Loading @@ -102,7 +101,7 @@ class ActiviteController extends AbstractActionController { $activite = $this->getActiviteService()->getRequestedActivite($this, 'activite'); $this->getActiviteService()->restore($activite); $this->redirect()->toRoute('activite'); return $this->redirect()->toRoute('activite'); } Loading @@ -112,7 +111,7 @@ class ActiviteController extends AbstractActionController { $activite = $this->getActiviteService()->getRequestedActivite($this, 'activite'); $this->getActiviteService()->delete($activite); $this->redirect()->toRoute('activite'); return $this->redirect()->toRoute('activite'); } public function afficherAction() Loading module/Application/src/Application/Controller/Agent/AgentController.php +5 −12 Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ class AgentController extends AbstractActionController use AgentFormAwareTrait; use AgentImportFormAwareTrait; public function indexAction() { public function indexAction() { $agents = $this->getAgentService()->getAgents(); return new ViewModel([ 'agents' => $agents, Loading @@ -33,8 +32,7 @@ class AgentController extends AbstractActionController public function afficherAction() { $agentId = $this->params()->fromRoute('id'); $agent = $this->getAgentService()->getAgent($agentId); $agent = $this->getAgentService()->getRequestedAgent($this, 'id'); return new ViewModel([ 'title' => 'Afficher l\'agent', Loading Loading @@ -73,9 +71,7 @@ class AgentController extends AbstractActionController public function modifierAction() { /** @var Agent $agent */ $agentId = $this->params()->fromRoute('id'); $agent = $this->getAgentService()->getAgent($agentId); $agent = $this->getAgentService()->getRequestedAgent($this, 'id'); /** @var AgentForm $form */ $form = $this->getAgentForm(); Loading Loading @@ -103,13 +99,11 @@ class AgentController extends AbstractActionController public function supprimerAction() { /** @var Agent $agent */ $agentId = $this->params()->fromRoute('id'); $agent = $this->getAgentService()->getAgent($agentId); $agent = $this->getAgentService()->getRequestedAgent($this, 'id'); $this->getAgentService()->delete($agent); $this->redirect()->toRoute('agent', [], [], true); return $this->redirect()->toRoute('agent', [], [], true); } public function importerAction() Loading @@ -133,7 +127,6 @@ class AgentController extends AbstractActionController if ($affectation->getDateFin()) var_dump($affectation->getDateFin()->format('d/m/Y')); } } //$this->redirect()->toRoute('agent/importer'); } return new ViewModel([ Loading module/Application/src/Application/Controller/AgentFichier/AgentFichierController.php +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class AgentFichierController extends AbstractActionController { $agent = $this->getAgentService()->getAgentByUser($user); if ($agent !== null) { $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); return $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); } else { throw new RuntimeException("L'utilisateur connecté n'est pas associté à un agent !"); } Loading Loading @@ -83,7 +83,7 @@ class AgentFichierController extends AbstractActionController { $agent->addFichier($fichier); $this->getAgentService()->update($agent); $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); return $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); } } Loading module/Application/src/Application/Controller/Application/ApplicationController.php +6 −14 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class ApplicationController extends AbstractActionController { public function indexAction() { /** @var Application[] $activites */ $applications = $this->getApplicationService()->getApplications('id'); $applications = $this->getApplicationService()->getApplications('libelle'); return new ViewModel([ 'applications' => $applications, Loading @@ -44,7 +44,6 @@ class ApplicationController extends AbstractActionController { if ($form->isValid()) { $this->getApplicationService()->create($application); //$this->redirect()->toRoute('application'); } } Loading Loading @@ -76,7 +75,6 @@ class ApplicationController extends AbstractActionController { if ($form->isValid()) { $this->getApplicationService()->update($application); //$this->redirect()->toRoute('application'); } } Loading @@ -91,31 +89,25 @@ class ApplicationController extends AbstractActionController { public function effacerAction() { /** @var Application $application */ $applicationId = $this->params()->fromRoute('id'); $application = $this->getApplicationService()->getApplication($applicationId); $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); $this->getApplicationService()->delete($application); $this->redirect()->toRoute('application'); return $this->redirect()->toRoute('application'); } public function changerStatusAction() { /** @var Application $application */ $applicationId = $this->params()->fromRoute('id'); $application = $this->getApplicationService()->getApplication($applicationId); $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); $application->setActif( !$application->isActif() ); $this->getApplicationService()->update($application); $this->redirect()->toRoute('application'); return $this->redirect()->toRoute('application'); } public function afficherAction() { /** @var Application $application */ $applicationId = $this->params()->fromRoute('id'); $application = $this->getApplicationService()->getApplication($applicationId); $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); return new ViewModel([ 'title' => "Description de l'application", Loading Loading
module/Application/config/merged/menu.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ return [ 'icon' => 'fas fa-angle-right' ], [ 'label' => 'Les fiches types', 'label' => 'Les fiches métiers', 'route' => 'fiche-metier-type', 'privileges' => FicheMetierPrivileges::AFFICHER, 'dropdown-header' => true, Loading
module/Application/src/Application/Controller/Activite/ActiviteController.php +3 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ class ActiviteController extends AbstractActionController { if ($form->isValid()) { $this->getActiviteService()->create($activite); // $this->redirect()->toRoute('activite'); } } Loading Loading @@ -93,7 +92,7 @@ class ActiviteController extends AbstractActionController { $activite = $this->getActiviteService()->getRequestedActivite($this, 'activite'); $this->getActiviteService()->historise($activite); $this->redirect()->toRoute('activite'); return $this->redirect()->toRoute('activite'); } public function restaurerAction() Loading @@ -102,7 +101,7 @@ class ActiviteController extends AbstractActionController { $activite = $this->getActiviteService()->getRequestedActivite($this, 'activite'); $this->getActiviteService()->restore($activite); $this->redirect()->toRoute('activite'); return $this->redirect()->toRoute('activite'); } Loading @@ -112,7 +111,7 @@ class ActiviteController extends AbstractActionController { $activite = $this->getActiviteService()->getRequestedActivite($this, 'activite'); $this->getActiviteService()->delete($activite); $this->redirect()->toRoute('activite'); return $this->redirect()->toRoute('activite'); } public function afficherAction() Loading
module/Application/src/Application/Controller/Agent/AgentController.php +5 −12 Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ class AgentController extends AbstractActionController use AgentFormAwareTrait; use AgentImportFormAwareTrait; public function indexAction() { public function indexAction() { $agents = $this->getAgentService()->getAgents(); return new ViewModel([ 'agents' => $agents, Loading @@ -33,8 +32,7 @@ class AgentController extends AbstractActionController public function afficherAction() { $agentId = $this->params()->fromRoute('id'); $agent = $this->getAgentService()->getAgent($agentId); $agent = $this->getAgentService()->getRequestedAgent($this, 'id'); return new ViewModel([ 'title' => 'Afficher l\'agent', Loading Loading @@ -73,9 +71,7 @@ class AgentController extends AbstractActionController public function modifierAction() { /** @var Agent $agent */ $agentId = $this->params()->fromRoute('id'); $agent = $this->getAgentService()->getAgent($agentId); $agent = $this->getAgentService()->getRequestedAgent($this, 'id'); /** @var AgentForm $form */ $form = $this->getAgentForm(); Loading Loading @@ -103,13 +99,11 @@ class AgentController extends AbstractActionController public function supprimerAction() { /** @var Agent $agent */ $agentId = $this->params()->fromRoute('id'); $agent = $this->getAgentService()->getAgent($agentId); $agent = $this->getAgentService()->getRequestedAgent($this, 'id'); $this->getAgentService()->delete($agent); $this->redirect()->toRoute('agent', [], [], true); return $this->redirect()->toRoute('agent', [], [], true); } public function importerAction() Loading @@ -133,7 +127,6 @@ class AgentController extends AbstractActionController if ($affectation->getDateFin()) var_dump($affectation->getDateFin()->format('d/m/Y')); } } //$this->redirect()->toRoute('agent/importer'); } return new ViewModel([ Loading
module/Application/src/Application/Controller/AgentFichier/AgentFichierController.php +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class AgentFichierController extends AbstractActionController { $agent = $this->getAgentService()->getAgentByUser($user); if ($agent !== null) { $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); return $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); } else { throw new RuntimeException("L'utilisateur connecté n'est pas associté à un agent !"); } Loading Loading @@ -83,7 +83,7 @@ class AgentFichierController extends AbstractActionController { $agent->addFichier($fichier); $this->getAgentService()->update($agent); $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); return $this->redirect()->toRoute('agent/fichiers', ['agent' => $agent->getId()], [], true); } } Loading
module/Application/src/Application/Controller/Application/ApplicationController.php +6 −14 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class ApplicationController extends AbstractActionController { public function indexAction() { /** @var Application[] $activites */ $applications = $this->getApplicationService()->getApplications('id'); $applications = $this->getApplicationService()->getApplications('libelle'); return new ViewModel([ 'applications' => $applications, Loading @@ -44,7 +44,6 @@ class ApplicationController extends AbstractActionController { if ($form->isValid()) { $this->getApplicationService()->create($application); //$this->redirect()->toRoute('application'); } } Loading Loading @@ -76,7 +75,6 @@ class ApplicationController extends AbstractActionController { if ($form->isValid()) { $this->getApplicationService()->update($application); //$this->redirect()->toRoute('application'); } } Loading @@ -91,31 +89,25 @@ class ApplicationController extends AbstractActionController { public function effacerAction() { /** @var Application $application */ $applicationId = $this->params()->fromRoute('id'); $application = $this->getApplicationService()->getApplication($applicationId); $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); $this->getApplicationService()->delete($application); $this->redirect()->toRoute('application'); return $this->redirect()->toRoute('application'); } public function changerStatusAction() { /** @var Application $application */ $applicationId = $this->params()->fromRoute('id'); $application = $this->getApplicationService()->getApplication($applicationId); $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); $application->setActif( !$application->isActif() ); $this->getApplicationService()->update($application); $this->redirect()->toRoute('application'); return $this->redirect()->toRoute('application'); } public function afficherAction() { /** @var Application $application */ $applicationId = $this->params()->fromRoute('id'); $application = $this->getApplicationService()->getApplication($applicationId); $application = $this->getApplicationService()->getRequestedApplication($this, 'id'); return new ViewModel([ 'title' => "Description de l'application", Loading