Loading module/Application/src/Application/Controller/FichePosteController.php +0 −2 Original line number Diff line number Diff line Loading @@ -365,8 +365,6 @@ 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/FicheProfilController.php +5 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,11 @@ class FicheProfilController extends AbstractActionController { $structure = $this->getStructureService()->getRequestedStructure($this); $structures = $this->getStructureService()->getStructuresFilles($structure); $structures[] = $structure; $fichespostes = $this->getFichePosteService()->getFichesPostesByStructures($structures, true); $fichespostes = []; foreach ($structures as $structure) { foreach ($structure->getFichesPostesRecrutements() as $fichePoste) $fichespostes[$fichePoste->getId()] = $fichePoste; } $adresse = $this->getParametreService()->getParametreByCode('PROFIL_DE_RECRUTEMENT', 'ADRESSE_DEFAUT')->getValeur(); Loading module/Application/src/Application/Controller/StructureController.php +2 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ 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; Loading Loading @@ -109,6 +108,7 @@ class StructureController extends AbstractActionController { $fichesIncompletes[] = $fichePoste; } } $fichesRecrutements = $this->getStructureService()->getFichesPostesRecrutementsByStructures($structures); /** Récupération des agents et postes liés aux structures */ $agents = $this->getAgentService()->getAgentsByStructures($structures); $agentsForces = array_map(function (StructureAgentForce $a) { return $a->getAgent(); }, $structure->getAgentsForces()); Loading @@ -132,6 +132,7 @@ class StructureController extends AbstractActionController { 'missions' => $missionsSpecifiques, 'fichesCompletes' => $fichesCompletes, 'fichesIncompletes' => $fichesIncompletes, 'fichesRecrutements' => $fichesRecrutements, 'profils' => $profils, 'inscriptions' => $inscriptions, 'agents' => $agents, Loading module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class FicheProfilForm extends Form { 'class' => 'control-label', ], 'empty_option' => "Sélectionner une fiche de poste ... ", 'value_options' => ($this->structure AND $structures !== null)?$this->getFichePosteService()->getFichesPostesByStructuresAsOptions($structures, true):null, 'value_options' => ($this->structure AND $structures !== null)?$this->getFichePosteService()->getFichesPostesRecrutementByStructuresAsOptions($structures, true):null, ], 'attributes' => [ 'id' => 'competence', Loading module/Application/src/Application/Service/FichePoste/FichePosteService.php +18 −0 Original line number Diff line number Diff line Loading @@ -707,6 +707,24 @@ class FichePosteService { public function getFichesPostesByStructuresAsOptions(array $structures, bool $soustructure) { $fichespostes = $this->getFichesPostesByStructures($structures, $soustructure); $options = []; foreach ($fichespostes as $ficheposte) { $label = $ficheposte->getLibelleMetierPrincipal(); if ($ficheposte->getAgent() !== null) $label .= " (".$ficheposte->getAgent()->getDenomination().")"; $options[$ficheposte->getId()] = $label; } return $options; } /** * @param Structure[] $structures * @param bool $soustructure * @return array */ public function getFichesPostesRecrutementByStructuresAsOptions(array $structures, bool $soustructure) { $fichespostes = []; foreach ($structures as $structure) { $fichespostes_tmp = $structure->getFichesPostesRecrutements(); foreach ($fichespostes_tmp as $ficheposte) { Loading Loading
module/Application/src/Application/Controller/FichePosteController.php +0 −2 Original line number Diff line number Diff line Loading @@ -365,8 +365,6 @@ 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/FicheProfilController.php +5 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,11 @@ class FicheProfilController extends AbstractActionController { $structure = $this->getStructureService()->getRequestedStructure($this); $structures = $this->getStructureService()->getStructuresFilles($structure); $structures[] = $structure; $fichespostes = $this->getFichePosteService()->getFichesPostesByStructures($structures, true); $fichespostes = []; foreach ($structures as $structure) { foreach ($structure->getFichesPostesRecrutements() as $fichePoste) $fichespostes[$fichePoste->getId()] = $fichePoste; } $adresse = $this->getParametreService()->getParametreByCode('PROFIL_DE_RECRUTEMENT', 'ADRESSE_DEFAUT')->getValeur(); Loading
module/Application/src/Application/Controller/StructureController.php +2 −1 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ 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; Loading Loading @@ -109,6 +108,7 @@ class StructureController extends AbstractActionController { $fichesIncompletes[] = $fichePoste; } } $fichesRecrutements = $this->getStructureService()->getFichesPostesRecrutementsByStructures($structures); /** Récupération des agents et postes liés aux structures */ $agents = $this->getAgentService()->getAgentsByStructures($structures); $agentsForces = array_map(function (StructureAgentForce $a) { return $a->getAgent(); }, $structure->getAgentsForces()); Loading @@ -132,6 +132,7 @@ class StructureController extends AbstractActionController { 'missions' => $missionsSpecifiques, 'fichesCompletes' => $fichesCompletes, 'fichesIncompletes' => $fichesIncompletes, 'fichesRecrutements' => $fichesRecrutements, 'profils' => $profils, 'inscriptions' => $inscriptions, 'agents' => $agents, Loading
module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class FicheProfilForm extends Form { 'class' => 'control-label', ], 'empty_option' => "Sélectionner une fiche de poste ... ", 'value_options' => ($this->structure AND $structures !== null)?$this->getFichePosteService()->getFichesPostesByStructuresAsOptions($structures, true):null, 'value_options' => ($this->structure AND $structures !== null)?$this->getFichePosteService()->getFichesPostesRecrutementByStructuresAsOptions($structures, true):null, ], 'attributes' => [ 'id' => 'competence', Loading
module/Application/src/Application/Service/FichePoste/FichePosteService.php +18 −0 Original line number Diff line number Diff line Loading @@ -707,6 +707,24 @@ class FichePosteService { public function getFichesPostesByStructuresAsOptions(array $structures, bool $soustructure) { $fichespostes = $this->getFichesPostesByStructures($structures, $soustructure); $options = []; foreach ($fichespostes as $ficheposte) { $label = $ficheposte->getLibelleMetierPrincipal(); if ($ficheposte->getAgent() !== null) $label .= " (".$ficheposte->getAgent()->getDenomination().")"; $options[$ficheposte->getId()] = $label; } return $options; } /** * @param Structure[] $structures * @param bool $soustructure * @return array */ public function getFichesPostesRecrutementByStructuresAsOptions(array $structures, bool $soustructure) { $fichespostes = []; foreach ($structures as $structure) { $fichespostes_tmp = $structure->getFichesPostesRecrutements(); foreach ($fichespostes_tmp as $ficheposte) { Loading