Loading module/Application/src/Application/Controller/FicheProfilController.php +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ class FicheProfilController extends AbstractActionController { $fichespostes = $this->getFichePosteService()->getFichesPostesByStructures([$structure], true); $ficheprofil = new FicheProfil(); $ficheprofil->setVancanceEmploi(false); $ficheprofil->setStructure($structure); $form = $this->getFicheProfilForm(); Loading module/Application/src/Application/Entity/Db/FicheProfil.php +31 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ class FicheProfil implements HistoriqueAwareInterface { /** @var int */ private $id; /** @var boolean */ private $vancanceEmploi; /** @var FichePoste */ private $ficheposte; /** @var Structure */ Loading Loading @@ -42,6 +44,26 @@ class FicheProfil implements HistoriqueAwareInterface { return $this->id; } /** * @return bool */ public function isVacanceEmploi(): bool { return $this->vancanceEmploi; } /** * @param bool $vancanceEmploi * @return FicheProfil */ public function setVancanceEmploi(bool $vancanceEmploi): FicheProfil { $this->vancanceEmploi = $vancanceEmploi; return $this; } /** * @return FichePoste|null */ Loading Loading @@ -276,9 +298,16 @@ class FicheProfil implements HistoriqueAwareInterface { return $texte; } public function getVacanceEmploiAffichage() { if (!$this->isVacanceEmploi()) return null; $texte = "<h2> Vacance d'emploi </h2>"; return $texte; } public function getContratAffichage() { if ($this->contrat === null) return null; if ($this->isVacanceEmploi() OR $this->contrat === null) return null; $texte = '<h2> Contrat </h2>'; $texte .= $this->contrat; return $texte; Loading @@ -286,7 +315,7 @@ class FicheProfil implements HistoriqueAwareInterface { public function getRenumerationAffichage() { if ($this->renumeration === null) return null; if ($this->isVacanceEmploi() OR $this->renumeration === null) return null; $texte = '<h2> Rénumération </h2>'; $texte .= $this->renumeration; return $texte; Loading module/Application/src/Application/Entity/Db/MacroContent/FichePosteMacroTrait.php +1 −6 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ namespace Application\Entity\Db\MacroContent; use Application\Entity\Db\Competence; use Application\Entity\Db\CompetenceElement; use Application\Entity\Db\CompetenceType; use Application\Entity\Db\FichePoste; use Application\Entity\Db\ParcoursDeFormation; Loading @@ -25,7 +23,6 @@ trait FichePosteMacroTrait { return $texte; } /** * @return string */ Loading Loading @@ -257,7 +254,7 @@ trait FichePosteMacroTrait { /** @var FichePoste $ficheposte */ $ficheposte = $this; $parcours = $ficheposte->getDictionnaire('parcours'); ksort($parcours); $texte = ""; foreach ($parcours as $clef => $parcoursArray) { Loading Loading @@ -298,7 +295,6 @@ trait FichePosteMacroTrait { } } } return $texte; } Loading Loading @@ -347,7 +343,6 @@ trait FichePosteMacroTrait { } } } return $texte; } } No newline at end of file module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheProfil.dcm.xml +2 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ <generator strategy="IDENTITY"/> </id> <field name="vancanceEmploi" column="vacance_emploi" type="boolean" nullable="false"/> <many-to-one field="ficheposte" target-entity="Application\Entity\Db\FichePoste"> <join-column name="ficheposte_id" referenced-column-name="id" /> </many-to-one> Loading module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php +13 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use UnicaenUtilisateur\Entity\DateTimeAwareTrait; use Zend\Form\Element\Button; use Zend\Form\Element\Checkbox; use Zend\Form\Element\Date; use Zend\Form\Element\Hidden; use Zend\Form\Element\Select; Loading @@ -30,6 +31,16 @@ class FicheProfilForm extends Form { public function init() { $this->add([ 'type' => Checkbox::class, 'name' => 'vacance_emploi', 'options' => [ 'label' => "Il s'agit d'une vacance d'emploi", ], 'attributes' => [ 'id' => 'vacance_emploi', ], ]); //structure (non editable) $this->add([ 'type' => Text::class, Loading Loading @@ -171,12 +182,13 @@ class FicheProfilForm extends Form { ], 'attributes' => [ 'type' => 'submit', 'class' => 'btn btn-primary', 'class' => 'btn btn-primary action', ], ]); //inputfilter $this->setInputFilter((new Factory())->createInputFilter([ 'vacance_emploi' => [ 'required' => true, ], 'structure' => [ 'required' => true, ], 'ficheposte' => [ 'required' => true, ], 'date' => [ 'required' => true, ], Loading Loading
module/Application/src/Application/Controller/FicheProfilController.php +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ class FicheProfilController extends AbstractActionController { $fichespostes = $this->getFichePosteService()->getFichesPostesByStructures([$structure], true); $ficheprofil = new FicheProfil(); $ficheprofil->setVancanceEmploi(false); $ficheprofil->setStructure($structure); $form = $this->getFicheProfilForm(); Loading
module/Application/src/Application/Entity/Db/FicheProfil.php +31 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ class FicheProfil implements HistoriqueAwareInterface { /** @var int */ private $id; /** @var boolean */ private $vancanceEmploi; /** @var FichePoste */ private $ficheposte; /** @var Structure */ Loading Loading @@ -42,6 +44,26 @@ class FicheProfil implements HistoriqueAwareInterface { return $this->id; } /** * @return bool */ public function isVacanceEmploi(): bool { return $this->vancanceEmploi; } /** * @param bool $vancanceEmploi * @return FicheProfil */ public function setVancanceEmploi(bool $vancanceEmploi): FicheProfil { $this->vancanceEmploi = $vancanceEmploi; return $this; } /** * @return FichePoste|null */ Loading Loading @@ -276,9 +298,16 @@ class FicheProfil implements HistoriqueAwareInterface { return $texte; } public function getVacanceEmploiAffichage() { if (!$this->isVacanceEmploi()) return null; $texte = "<h2> Vacance d'emploi </h2>"; return $texte; } public function getContratAffichage() { if ($this->contrat === null) return null; if ($this->isVacanceEmploi() OR $this->contrat === null) return null; $texte = '<h2> Contrat </h2>'; $texte .= $this->contrat; return $texte; Loading @@ -286,7 +315,7 @@ class FicheProfil implements HistoriqueAwareInterface { public function getRenumerationAffichage() { if ($this->renumeration === null) return null; if ($this->isVacanceEmploi() OR $this->renumeration === null) return null; $texte = '<h2> Rénumération </h2>'; $texte .= $this->renumeration; return $texte; Loading
module/Application/src/Application/Entity/Db/MacroContent/FichePosteMacroTrait.php +1 −6 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ namespace Application\Entity\Db\MacroContent; use Application\Entity\Db\Competence; use Application\Entity\Db\CompetenceElement; use Application\Entity\Db\CompetenceType; use Application\Entity\Db\FichePoste; use Application\Entity\Db\ParcoursDeFormation; Loading @@ -25,7 +23,6 @@ trait FichePosteMacroTrait { return $texte; } /** * @return string */ Loading Loading @@ -257,7 +254,7 @@ trait FichePosteMacroTrait { /** @var FichePoste $ficheposte */ $ficheposte = $this; $parcours = $ficheposte->getDictionnaire('parcours'); ksort($parcours); $texte = ""; foreach ($parcours as $clef => $parcoursArray) { Loading Loading @@ -298,7 +295,6 @@ trait FichePosteMacroTrait { } } } return $texte; } Loading Loading @@ -347,7 +343,6 @@ trait FichePosteMacroTrait { } } } return $texte; } } No newline at end of file
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheProfil.dcm.xml +2 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ <generator strategy="IDENTITY"/> </id> <field name="vancanceEmploi" column="vacance_emploi" type="boolean" nullable="false"/> <many-to-one field="ficheposte" target-entity="Application\Entity\Db\FichePoste"> <join-column name="ficheposte_id" referenced-column-name="id" /> </many-to-one> Loading
module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php +13 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use UnicaenUtilisateur\Entity\DateTimeAwareTrait; use Zend\Form\Element\Button; use Zend\Form\Element\Checkbox; use Zend\Form\Element\Date; use Zend\Form\Element\Hidden; use Zend\Form\Element\Select; Loading @@ -30,6 +31,16 @@ class FicheProfilForm extends Form { public function init() { $this->add([ 'type' => Checkbox::class, 'name' => 'vacance_emploi', 'options' => [ 'label' => "Il s'agit d'une vacance d'emploi", ], 'attributes' => [ 'id' => 'vacance_emploi', ], ]); //structure (non editable) $this->add([ 'type' => Text::class, Loading Loading @@ -171,12 +182,13 @@ class FicheProfilForm extends Form { ], 'attributes' => [ 'type' => 'submit', 'class' => 'btn btn-primary', 'class' => 'btn btn-primary action', ], ]); //inputfilter $this->setInputFilter((new Factory())->createInputFilter([ 'vacance_emploi' => [ 'required' => true, ], 'structure' => [ 'required' => true, ], 'ficheposte' => [ 'required' => true, ], 'date' => [ 'required' => true, ], Loading