Loading CHANGELOG.md +6 −3 Original line number Diff line number Diff line Loading @@ -7,9 +7,12 @@ Version 1.2.0 *Module de formation* Version 1.1.5 ------------- - [Correction bug] l'encart Mes données ne marchait plus faute d'agent fourni - Parametrage et ajout d'une adresse par défaut pour les profils de recrutement - Refonte macro pour le profil + [Correction bug] l'encart Mes données ne marchait plus faute d'agent fourni + [Qualité de vie] Ajout d'un onglet agent sur les structures pour clarifier + Parametrage et ajout d'une adresse par défaut pour les profils de recrutement + Refonte macro pour le profil + Fiche de poste pour recrutement + modification de l'association d'agent Version 1.1.4 ------------- Loading module/Application/config/merged/structure.config.php +12 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ return [ 'controller' => StructureController::class, 'action' => [ 'ajouter-fiche-poste-recrutement', 'dupliquer-fiche-poste-recrutement', ], 'privileges' => StructurePrivileges::STRUCTURE_DESCRIPTION, ], Loading Loading @@ -170,6 +171,17 @@ return [ ], 'may_terminate' => true, ], 'dupliquer-fiche-poste-recrutement' => [ 'type' => Segment::class, 'options' => [ 'route' => '/dupliquer-fiche-poste-recrutement/:structure', 'defaults' => [ 'controller' => StructureController::class, 'action' => 'dupliquer-fiche-poste-recrutement', ], ], 'may_terminate' => true, ], 'graphe' => [ 'type' => Segment::class, 'options' => [ Loading module/Application/src/Application/Controller/FichePosteController.php +5 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ class FichePosteController extends AbstractActionController { /** @var AssocierAgentForm $form */ $form = $this->getAssocierAgentForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-poste/associer-agent', ['fiche-poste' => $fiche->getId()], [], true)); $form->setAttribute('action', $this->url()->fromRoute('fiche-poste/associer-agent', ['fiche-poste' => $fiche->getId()], ['query' => ["structure" => ($structure)?$structure->getId():null, "sous-structure" => $sousstructure]], true)); if ($structure !== null) { $form = $form->reinitWithStructure($structure, $sousstructure); Loading @@ -365,6 +365,10 @@ class FichePosteController extends AbstractActionController { } else { if ($form->isValid()) { $this->getFichePosteService()->update($fiche); //todo retirer des listes pour recrutement ... $structure->removeFichePosteRecrutement($fiche); $this->getStructureService()->update($structure); } } } Loading module/Application/src/Application/Controller/StructureController.php +54 −0 Original line number Diff line number Diff line Loading @@ -10,12 +10,14 @@ use Application\Form\AgentMissionSpecifique\AgentMissionSpecifiqueFormAwareTrait use Application\Form\AjouterGestionnaire\AjouterGestionnaireForm; use Application\Form\AjouterGestionnaire\AjouterGestionnaireFormAwareTrait; use Application\Form\SelectionAgent\SelectionAgentFormAwareTrait; use Application\Form\SpecificitePoste\SpecificitePosteFormAwareTrait; use Application\Form\Structure\StructureFormAwareTrait; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\FicheProfil\FicheProfilServiceAwareTrait; use Application\Service\MissionSpecifique\MissionSpecifiqueAffectationServiceAwareTrait; use Application\Service\Poste\PosteServiceAwareTrait; use Application\Service\SpecificitePoste\SpecificitePosteServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use Application\Service\StructureAgentForce\StructureAgentForceServiceAwareTrait; use DateTime; Loading @@ -42,6 +44,7 @@ class StructureController extends AbstractActionController { use StructureServiceAwareTrait; use StructureAgentForceServiceAwareTrait; use UserServiceAwareTrait; use SpecificitePosteServiceAwareTrait; use EntretienProfessionnelServiceAwareTrait; use CampagneServiceAwareTrait; Loading Loading @@ -416,6 +419,57 @@ class StructureController extends AbstractActionController { return $this->redirect()->toRoute('fiche-poste/editer', ['fiche-poste' => $fiche->getId()], ["query" => ["structure" => $structure->getId()]], true); } public function dupliquerFichePosteRecrutementAction() { $structure = $this->getStructureService()->getRequestedStructure($this); $request = $this->getRequest(); if ($request->isPost()) { $data = $request->getPost(); $fiche = $this->getFichePosteService()->getFichePoste($data['fiche']); if ($fiche != null) { $nouvelleFiche = new FichePoste(); $nouvelleFiche->setLibelle($fiche->getLibelle()); if ($fiche->getSpecificite()) { $specifite = $fiche->getSpecificite()->clone_it(); $this->getSpecificitePosteService()->create($specifite); $nouvelleFiche->setSpecificite($specifite); } $nouvelleFiche = $this->getFichePosteService()->create($nouvelleFiche); //dupliquer fiche metier externe foreach ($fiche->getFichesMetiers() as $ficheMetierExterne) { $nouvelleFicheMetier = $ficheMetierExterne->clone_it(); $nouvelleFicheMetier->setFichePoste($nouvelleFiche); $this->getFichePosteService()->createFicheTypeExterne($nouvelleFicheMetier); } $structure->addFichePosteRecrutement($nouvelleFiche); $this->getStructureService()->update($structure); } } $structures = $this->getStructureService()->getStructuresFilles($structure); $structures[] = $structure; $fichesPostesAgent = $this->getFichePosteService()->getFichesPostesByStructures($structures); $fichesPostesRecrutement = $structure->getFichesPostesRecrutements(); $fichespostes = []; foreach ($fichesPostesAgent as $fichePoste) $fichespostes[$fichePoste->getId()] = $fichePoste; foreach ($fichesPostesRecrutement as $fichePoste) $fichespostes[$fichePoste->getId()] = $fichePoste; $vm = new ViewModel([ 'title' => 'Sélectionner la fiche de poste à dupliquer', 'fichespostes' => $fichespostes, 'url' => $this->url()->fromRoute('structure/dupliquer-fiche-poste-recrutement', ['structure' => $structure->getId()], [], true), ]); $vm->setTemplate('application/structure/dupliquer-fiche-poste'); return $vm; } /** EXTRACTIONS ***************************************************************************************************/ /** Loading module/Application/src/Application/Controller/StructureControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Application\Service\FichePoste\FichePosteService; use Application\Service\FicheProfil\FicheProfilService; use Application\Service\MissionSpecifique\MissionSpecifiqueAffectationService; use Application\Service\Poste\PosteService; use Application\Service\SpecificitePoste\SpecificitePosteService; use Application\Service\Structure\StructureService; use Application\Service\StructureAgentForce\StructureAgentForceService; use EntretienProfessionnel\Service\Campagne\CampagneService; Loading @@ -34,6 +35,7 @@ class StructureControllerFactory { * @var MissionSpecifiqueAffectationService $missionSpecifiqueAffectationService * @var PosteService $posteService * @var RoleService $roleService * @var SpecificitePosteService $specificiteService * @var StructureService $structureService * @var StructureAgentForceService $structureAgentForceService * @var UserService $userService Loading @@ -47,6 +49,7 @@ class StructureControllerFactory { $missionSpecifiqueAffectationService = $container->get(MissionSpecifiqueAffectationService::class); $posteService = $container->get(PosteService::class); $roleService = $container->get(RoleService::class); $specificiteService = $container->get(SpecificitePosteService::class); $structureService = $container->get(StructureService::class); $structureAgentForceService = $container->get(StructureAgentForceService::class); $userService = $container->get(UserService::class); Loading Loading @@ -74,6 +77,7 @@ class StructureControllerFactory { $controller->setMissionSpecifiqueAffectationService($missionSpecifiqueAffectationService); $controller->setPosteService($posteService); $controller->setRoleService($roleService); $controller->setSpecificitePosteService($specificiteService); $controller->setStructureService($structureService); $controller->setStructureAgentForceService($structureAgentForceService); $controller->setUserService($userService); Loading Loading
CHANGELOG.md +6 −3 Original line number Diff line number Diff line Loading @@ -7,9 +7,12 @@ Version 1.2.0 *Module de formation* Version 1.1.5 ------------- - [Correction bug] l'encart Mes données ne marchait plus faute d'agent fourni - Parametrage et ajout d'une adresse par défaut pour les profils de recrutement - Refonte macro pour le profil + [Correction bug] l'encart Mes données ne marchait plus faute d'agent fourni + [Qualité de vie] Ajout d'un onglet agent sur les structures pour clarifier + Parametrage et ajout d'une adresse par défaut pour les profils de recrutement + Refonte macro pour le profil + Fiche de poste pour recrutement + modification de l'association d'agent Version 1.1.4 ------------- Loading
module/Application/config/merged/structure.config.php +12 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ return [ 'controller' => StructureController::class, 'action' => [ 'ajouter-fiche-poste-recrutement', 'dupliquer-fiche-poste-recrutement', ], 'privileges' => StructurePrivileges::STRUCTURE_DESCRIPTION, ], Loading Loading @@ -170,6 +171,17 @@ return [ ], 'may_terminate' => true, ], 'dupliquer-fiche-poste-recrutement' => [ 'type' => Segment::class, 'options' => [ 'route' => '/dupliquer-fiche-poste-recrutement/:structure', 'defaults' => [ 'controller' => StructureController::class, 'action' => 'dupliquer-fiche-poste-recrutement', ], ], 'may_terminate' => true, ], 'graphe' => [ 'type' => Segment::class, 'options' => [ Loading
module/Application/src/Application/Controller/FichePosteController.php +5 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ class FichePosteController extends AbstractActionController { /** @var AssocierAgentForm $form */ $form = $this->getAssocierAgentForm(); $form->setAttribute('action', $this->url()->fromRoute('fiche-poste/associer-agent', ['fiche-poste' => $fiche->getId()], [], true)); $form->setAttribute('action', $this->url()->fromRoute('fiche-poste/associer-agent', ['fiche-poste' => $fiche->getId()], ['query' => ["structure" => ($structure)?$structure->getId():null, "sous-structure" => $sousstructure]], true)); if ($structure !== null) { $form = $form->reinitWithStructure($structure, $sousstructure); Loading @@ -365,6 +365,10 @@ class FichePosteController extends AbstractActionController { } else { if ($form->isValid()) { $this->getFichePosteService()->update($fiche); //todo retirer des listes pour recrutement ... $structure->removeFichePosteRecrutement($fiche); $this->getStructureService()->update($structure); } } } Loading
module/Application/src/Application/Controller/StructureController.php +54 −0 Original line number Diff line number Diff line Loading @@ -10,12 +10,14 @@ use Application\Form\AgentMissionSpecifique\AgentMissionSpecifiqueFormAwareTrait use Application\Form\AjouterGestionnaire\AjouterGestionnaireForm; use Application\Form\AjouterGestionnaire\AjouterGestionnaireFormAwareTrait; use Application\Form\SelectionAgent\SelectionAgentFormAwareTrait; use Application\Form\SpecificitePoste\SpecificitePosteFormAwareTrait; use Application\Form\Structure\StructureFormAwareTrait; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\FicheProfil\FicheProfilServiceAwareTrait; use Application\Service\MissionSpecifique\MissionSpecifiqueAffectationServiceAwareTrait; use Application\Service\Poste\PosteServiceAwareTrait; use Application\Service\SpecificitePoste\SpecificitePosteServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use Application\Service\StructureAgentForce\StructureAgentForceServiceAwareTrait; use DateTime; Loading @@ -42,6 +44,7 @@ class StructureController extends AbstractActionController { use StructureServiceAwareTrait; use StructureAgentForceServiceAwareTrait; use UserServiceAwareTrait; use SpecificitePosteServiceAwareTrait; use EntretienProfessionnelServiceAwareTrait; use CampagneServiceAwareTrait; Loading Loading @@ -416,6 +419,57 @@ class StructureController extends AbstractActionController { return $this->redirect()->toRoute('fiche-poste/editer', ['fiche-poste' => $fiche->getId()], ["query" => ["structure" => $structure->getId()]], true); } public function dupliquerFichePosteRecrutementAction() { $structure = $this->getStructureService()->getRequestedStructure($this); $request = $this->getRequest(); if ($request->isPost()) { $data = $request->getPost(); $fiche = $this->getFichePosteService()->getFichePoste($data['fiche']); if ($fiche != null) { $nouvelleFiche = new FichePoste(); $nouvelleFiche->setLibelle($fiche->getLibelle()); if ($fiche->getSpecificite()) { $specifite = $fiche->getSpecificite()->clone_it(); $this->getSpecificitePosteService()->create($specifite); $nouvelleFiche->setSpecificite($specifite); } $nouvelleFiche = $this->getFichePosteService()->create($nouvelleFiche); //dupliquer fiche metier externe foreach ($fiche->getFichesMetiers() as $ficheMetierExterne) { $nouvelleFicheMetier = $ficheMetierExterne->clone_it(); $nouvelleFicheMetier->setFichePoste($nouvelleFiche); $this->getFichePosteService()->createFicheTypeExterne($nouvelleFicheMetier); } $structure->addFichePosteRecrutement($nouvelleFiche); $this->getStructureService()->update($structure); } } $structures = $this->getStructureService()->getStructuresFilles($structure); $structures[] = $structure; $fichesPostesAgent = $this->getFichePosteService()->getFichesPostesByStructures($structures); $fichesPostesRecrutement = $structure->getFichesPostesRecrutements(); $fichespostes = []; foreach ($fichesPostesAgent as $fichePoste) $fichespostes[$fichePoste->getId()] = $fichePoste; foreach ($fichesPostesRecrutement as $fichePoste) $fichespostes[$fichePoste->getId()] = $fichePoste; $vm = new ViewModel([ 'title' => 'Sélectionner la fiche de poste à dupliquer', 'fichespostes' => $fichespostes, 'url' => $this->url()->fromRoute('structure/dupliquer-fiche-poste-recrutement', ['structure' => $structure->getId()], [], true), ]); $vm->setTemplate('application/structure/dupliquer-fiche-poste'); return $vm; } /** EXTRACTIONS ***************************************************************************************************/ /** Loading
module/Application/src/Application/Controller/StructureControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Application\Service\FichePoste\FichePosteService; use Application\Service\FicheProfil\FicheProfilService; use Application\Service\MissionSpecifique\MissionSpecifiqueAffectationService; use Application\Service\Poste\PosteService; use Application\Service\SpecificitePoste\SpecificitePosteService; use Application\Service\Structure\StructureService; use Application\Service\StructureAgentForce\StructureAgentForceService; use EntretienProfessionnel\Service\Campagne\CampagneService; Loading @@ -34,6 +35,7 @@ class StructureControllerFactory { * @var MissionSpecifiqueAffectationService $missionSpecifiqueAffectationService * @var PosteService $posteService * @var RoleService $roleService * @var SpecificitePosteService $specificiteService * @var StructureService $structureService * @var StructureAgentForceService $structureAgentForceService * @var UserService $userService Loading @@ -47,6 +49,7 @@ class StructureControllerFactory { $missionSpecifiqueAffectationService = $container->get(MissionSpecifiqueAffectationService::class); $posteService = $container->get(PosteService::class); $roleService = $container->get(RoleService::class); $specificiteService = $container->get(SpecificitePosteService::class); $structureService = $container->get(StructureService::class); $structureAgentForceService = $container->get(StructureAgentForceService::class); $userService = $container->get(UserService::class); Loading Loading @@ -74,6 +77,7 @@ class StructureControllerFactory { $controller->setMissionSpecifiqueAffectationService($missionSpecifiqueAffectationService); $controller->setPosteService($posteService); $controller->setRoleService($roleService); $controller->setSpecificitePosteService($specificiteService); $controller->setStructureService($structureService); $controller->setStructureAgentForceService($structureAgentForceService); $controller->setUserService($userService); Loading