Loading module/Application/src/Application/Controller/AgentController.php +13 −7 Original line number Diff line number Diff line Loading @@ -89,6 +89,9 @@ class AgentController extends AbstractActionController public function afficherAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, true); $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, true); $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, true); $connectedUser = $this->getUserService()->getConnectedUser(); $connectedAgent = $this->getAgentService()->getAgentByUser($connectedUser); $connectedRole = $this->getUserService()->getConnectedRole(); Loading @@ -105,6 +108,9 @@ class AgentController extends AbstractActionController return new ViewModel([ 'title' => 'Afficher l\'agent', 'agent' => $agent, 'affectations' => $agentAffectations, 'statuts' => $agentStatuts, 'grades' => $agentGrades, 'entretiens' => $entretiens, 'responsables' => $responsables, 'parcoursArray' => $parcoursArray, Loading @@ -118,16 +124,16 @@ class AgentController extends AbstractActionController { $agent = $this->getAgentService()->getRequestedAgent($this); $affectations = $agent->getAffectations(); $grades = $agent->getGrades(); $statuts = $agent->getStatuts(); $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, false); $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, false); $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, false); return new ViewModel([ 'title' => 'Listing de tous les statuts et grades de ' . $agent->getDenomination(), 'agent' => $agent, 'affectations' => $affectations, 'statuts' => $statuts, 'grades' => $grades, 'affectations' => $agentAffectations, 'statuts' => $agentStatuts, 'grades' => $agentGrades, ]); } Loading module/Application/src/Application/Entity/Db/FicheProfil.php +21 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ class FicheProfil implements HistoriqueAwareInterface { private $renumeration; /** @var DateTime */ private $date; /** @var string|null */ private $adresse; /** * @return int Loading Loading @@ -244,6 +246,25 @@ class FicheProfil implements HistoriqueAwareInterface { return $this; } /** * @return string|null */ public function getAdresse(): ?string { return $this->adresse; } /** * @param string|null $adresse * @return FicheProfil */ public function setAdresse(?string $adresse): FicheProfil { $this->adresse = $adresse; return $this; } /** Predicat ******************************************************************************************************/ /** Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheProfil.dcm.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ <field name="contrat" column="contrat" type="string" length="4096" nullable="true"/> <field name="renumeration" column="renumeration" type="string" length="4096" nullable="true"/> <field name="date" column="date" type="datetime" nullable="false"/> <field name="adresse" column="adresse" type="string" length="4096" nullable="true"/> <!-- DONNEE POUR L'HISTORISATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> Loading module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php +15 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Application\Form\FicheProfil; use Application\Entity\Db\Structure; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use DateTime; use UnicaenUtilisateur\Entity\DateTimeAwareTrait; use Zend\Form\Element\Button; use Zend\Form\Element\Checkbox; Loading Loading @@ -89,16 +90,28 @@ class FicheProfilForm extends Form { ]); //date $this->add([ 'type' => Date::class, 'type' => DateTime::class, 'name' => 'date', 'options' => [ 'label' => "Date de fin * :", 'format' => 'd/m/Y' ], 'attributes' => [ 'id' => 'date', // 'min' => $this->getDateTime(), ], ]); //structure (non editable) $this->add([ 'type' => Text::class, 'name' => 'adresse', 'options' => [ 'label' => "Adresse électronique de contact * :", ], 'attributes' => [ 'id' => 'adresse', ], ]); $this->add([ 'type' => Textarea::class, 'name' => 'lieu', Loading Loading @@ -198,6 +211,7 @@ class FicheProfilForm extends Form { 'structure' => [ 'required' => true, ], 'ficheposte' => [ 'required' => true, ], 'date' => [ 'required' => true, ], 'adresse' => [ 'required' => true, ], 'lieu' => [ 'required' => false, ], 'contexte' => [ 'required' => false, ], 'mission' => [ 'required' => false, ], Loading module/Application/src/Application/Form/FicheProfil/FicheProfilHydrator.php +3 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ class FicheProfilHydrator implements HydratorInterface { 'structure' => ($object->getStructure())?$object->getStructure()->getLibelleLong():null, 'structure_id' => ($object->getStructure())?$object->getStructure()->getId():null, 'ficheposte' => ($object->getFichePoste())?$object->getFichePoste()->getId():null, 'date' => ($object->getDate())?$object->getDate()->format('Y-m-d'):null, 'date' => ($object->getDate())?$object->getDate()->format('d/m/Y'):null, 'lieu' => $object->getLieu(), 'contexte' => $object->getContexte(), 'mission' => $object->getMission(), Loading @@ -45,7 +45,8 @@ class FicheProfilHydrator implements HydratorInterface { $vacanceEmploi = (isset($data['vacance_emploi']) AND $data['vacance_emploi'] === '1')?true:false; $structure = (isset($data['structure_id']))?$this->getStructureService()->getStructure($data['structure_id']):null; $ficheposte = (isset($data['ficheposte']))?$this->getFichePosteService()->getFichePoste($data['ficheposte']):null; $date = (isset($data['date']))?DateTime::createFromFormat('Y-m-d', $data['date']):null; $date = (isset($data['date']))?DateTime::createFromFormat('d/m/Y', $data['date']):null; $adresse = (isset($data['adresse']) AND trim($data['adresse']) !== '')?trim($data['adresse']):null; $lieu = (isset($data['lieu']) AND trim($data['lieu']) !== '')?trim($data['lieu']):null; $contexte = (isset($data['contexte']) AND trim($data['contexte']) !== '')?trim($data['contexte']):null; $mission = (isset($data['mission']) AND trim($data['mission']) !== '')?trim($data['mission']):null; Loading Loading
module/Application/src/Application/Controller/AgentController.php +13 −7 Original line number Diff line number Diff line Loading @@ -89,6 +89,9 @@ class AgentController extends AbstractActionController public function afficherAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, true); $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, true); $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, true); $connectedUser = $this->getUserService()->getConnectedUser(); $connectedAgent = $this->getAgentService()->getAgentByUser($connectedUser); $connectedRole = $this->getUserService()->getConnectedRole(); Loading @@ -105,6 +108,9 @@ class AgentController extends AbstractActionController return new ViewModel([ 'title' => 'Afficher l\'agent', 'agent' => $agent, 'affectations' => $agentAffectations, 'statuts' => $agentStatuts, 'grades' => $agentGrades, 'entretiens' => $entretiens, 'responsables' => $responsables, 'parcoursArray' => $parcoursArray, Loading @@ -118,16 +124,16 @@ class AgentController extends AbstractActionController { $agent = $this->getAgentService()->getRequestedAgent($this); $affectations = $agent->getAffectations(); $grades = $agent->getGrades(); $statuts = $agent->getStatuts(); $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, false); $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, false); $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, false); return new ViewModel([ 'title' => 'Listing de tous les statuts et grades de ' . $agent->getDenomination(), 'agent' => $agent, 'affectations' => $affectations, 'statuts' => $statuts, 'grades' => $grades, 'affectations' => $agentAffectations, 'statuts' => $agentStatuts, 'grades' => $agentGrades, ]); } Loading
module/Application/src/Application/Entity/Db/FicheProfil.php +21 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ class FicheProfil implements HistoriqueAwareInterface { private $renumeration; /** @var DateTime */ private $date; /** @var string|null */ private $adresse; /** * @return int Loading Loading @@ -244,6 +246,25 @@ class FicheProfil implements HistoriqueAwareInterface { return $this; } /** * @return string|null */ public function getAdresse(): ?string { return $this->adresse; } /** * @param string|null $adresse * @return FicheProfil */ public function setAdresse(?string $adresse): FicheProfil { $this->adresse = $adresse; return $this; } /** Predicat ******************************************************************************************************/ /** Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheProfil.dcm.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ <field name="contrat" column="contrat" type="string" length="4096" nullable="true"/> <field name="renumeration" column="renumeration" type="string" length="4096" nullable="true"/> <field name="date" column="date" type="datetime" nullable="false"/> <field name="adresse" column="adresse" type="string" length="4096" nullable="true"/> <!-- DONNEE POUR L'HISTORISATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> Loading
module/Application/src/Application/Form/FicheProfil/FicheProfilForm.php +15 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Application\Form\FicheProfil; use Application\Entity\Db\Structure; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use DateTime; use UnicaenUtilisateur\Entity\DateTimeAwareTrait; use Zend\Form\Element\Button; use Zend\Form\Element\Checkbox; Loading Loading @@ -89,16 +90,28 @@ class FicheProfilForm extends Form { ]); //date $this->add([ 'type' => Date::class, 'type' => DateTime::class, 'name' => 'date', 'options' => [ 'label' => "Date de fin * :", 'format' => 'd/m/Y' ], 'attributes' => [ 'id' => 'date', // 'min' => $this->getDateTime(), ], ]); //structure (non editable) $this->add([ 'type' => Text::class, 'name' => 'adresse', 'options' => [ 'label' => "Adresse électronique de contact * :", ], 'attributes' => [ 'id' => 'adresse', ], ]); $this->add([ 'type' => Textarea::class, 'name' => 'lieu', Loading Loading @@ -198,6 +211,7 @@ class FicheProfilForm extends Form { 'structure' => [ 'required' => true, ], 'ficheposte' => [ 'required' => true, ], 'date' => [ 'required' => true, ], 'adresse' => [ 'required' => true, ], 'lieu' => [ 'required' => false, ], 'contexte' => [ 'required' => false, ], 'mission' => [ 'required' => false, ], Loading
module/Application/src/Application/Form/FicheProfil/FicheProfilHydrator.php +3 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ class FicheProfilHydrator implements HydratorInterface { 'structure' => ($object->getStructure())?$object->getStructure()->getLibelleLong():null, 'structure_id' => ($object->getStructure())?$object->getStructure()->getId():null, 'ficheposte' => ($object->getFichePoste())?$object->getFichePoste()->getId():null, 'date' => ($object->getDate())?$object->getDate()->format('Y-m-d'):null, 'date' => ($object->getDate())?$object->getDate()->format('d/m/Y'):null, 'lieu' => $object->getLieu(), 'contexte' => $object->getContexte(), 'mission' => $object->getMission(), Loading @@ -45,7 +45,8 @@ class FicheProfilHydrator implements HydratorInterface { $vacanceEmploi = (isset($data['vacance_emploi']) AND $data['vacance_emploi'] === '1')?true:false; $structure = (isset($data['structure_id']))?$this->getStructureService()->getStructure($data['structure_id']):null; $ficheposte = (isset($data['ficheposte']))?$this->getFichePosteService()->getFichePoste($data['ficheposte']):null; $date = (isset($data['date']))?DateTime::createFromFormat('Y-m-d', $data['date']):null; $date = (isset($data['date']))?DateTime::createFromFormat('d/m/Y', $data['date']):null; $adresse = (isset($data['adresse']) AND trim($data['adresse']) !== '')?trim($data['adresse']):null; $lieu = (isset($data['lieu']) AND trim($data['lieu']) !== '')?trim($data['lieu']):null; $contexte = (isset($data['contexte']) AND trim($data['contexte']) !== '')?trim($data['contexte']):null; $mission = (isset($data['mission']) AND trim($data['mission']) !== '')?trim($data['mission']):null; Loading