Loading module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormAwareTrait.php +2 −2 Changes for module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormAwareTrait.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ trait SelectionAgentFormAwareTrait { /** * @return SelectionAgentForm */ public function getSelectionAgentForm() public function getSelectionAgentForm() : SelectionAgentForm { return $this->selectionAgentForm; } Loading @@ -19,7 +19,7 @@ trait SelectionAgentFormAwareTrait { * @param SelectionAgentForm $selectionAgentForm * @return SelectionAgentForm */ public function setSelectionAgentForm($selectionAgentForm) public function setSelectionAgentForm(SelectionAgentForm $selectionAgentForm) : SelectionAgentForm { $this->selectionAgentForm = $selectionAgentForm; return $this->selectionAgentForm; Loading module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/EntretienProfessionnelController.php +9 −4 Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/EntretienProfessionnelController.php: 9 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -119,9 +119,9 @@ class EntretienProfessionnelController extends AbstractActionController $term = $this->params()->fromQuery('term'); if ($term !== null and trim($term) !== "") { $agentsResponsables = $this->getEntretienProfessionnelService()->findResponsablePourEntretien($structure, $term); $agentsDelegues = $this->getEntretienProfessionnelService()->findDeleguePourEntretien($structure, $campagne, $term); $agentsSuperieures = $this->getEntretienProfessionnelService()->findSuperieurPourEntretien($agent, $term); $agentsResponsables = ($structure)?$this->getEntretienProfessionnelService()->findResponsablePourEntretien($structure, $term):[]; $agentsDelegues = ($campagne AND $structure)?$this->getEntretienProfessionnelService()->findDeleguePourEntretien($structure, $campagne, $term):[]; $agentsSuperieures = ($agent)?$this->getEntretienProfessionnelService()->findSuperieurPourEntretien($agent, $term):[]; $result = $this->getAgentService()->formatAgentJSON(array_merge($agentsResponsables, $agentsDelegues, $agentsSuperieures)); return new JsonModel($result); } Loading Loading @@ -185,7 +185,12 @@ class EntretienProfessionnelController extends AbstractActionController /** @var SearchAndSelect $element */ $element = $form->get('responsable'); /** @see EntretienProfessionnelController::findResponsablePourEntretienAction() */ $element->setAutocompleteSource($this->url()->fromRoute('entretien-professionnel/find-responsable-pour-entretien', ['structure' => $structure->getId(), 'campagne' => $campagne->getId()], ['query' => ['agent' => $agentId]], true)); $element->setAutocompleteSource($this->url()->fromRoute('entretien-professionnel/find-responsable-pour-entretien', ['agent' => $agent->getId(), 'structure' => $structure->getId(), 'campagne' => $campagne->getId()], ['query' => ['agent' => $agentId]], true)); } else { /** @var SearchAndSelect $element */ $element = $form->get('responsable'); /** @see EntretienProfessionnelController::findResponsablePourEntretienAction() */ $element->setAutocompleteSource($this->url()->fromRoute('entretien-professionnel/find-responsable-pour-entretien', [], ['query' => ['agent' => $agentId]], true)); } /** @var Request $request */ Loading module/EntretienProfessionnel/src/EntretienProfessionnel/Form/EntretienProfessionnel/EntretienProfessionnelForm.php +1 −2 Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Form/EntretienProfessionnel/EntretienProfessionnelForm.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace EntretienProfessionnel\Form\EntretienProfessionnel; use DateInterval; use DateTime; use EntretienProfessionnel\Entity\Db\EntretienProfessionnel; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; Loading Loading @@ -145,7 +144,7 @@ class EntretienProfessionnelForm extends Form { 'name' => Callback::class, 'options' => [ 'messages' => [ Callback::INVALID_VALUE => "Veuillez sélectionnez un responsable dans la liste déroulante.", Callback::INVALID_VALUE => "Veuillez sélectionner un responsable dans la liste déroulante.", ], 'callback' => function ($value, $context = []) { $hasResponsable = (isset($context['responsable']) AND isset($context['responsable']['id']) AND trim($context['responsable']['id']) !== ''); Loading module/Structure/view/structure/structure/partial/agents.phtml +1 Changes for module/Structure/view/structure/structure/partial/agents.phtml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ $isForce = (isset($options['force']) AND $options['force'] === true); <br/> <?php endforeach; ?> <?php if ($canComplement) : ?> <?php /** @see \Application\Controller\ComplementController::ajouterAction() */ ?> <a href="<?php echo $this->url('complement/ajouter', ['type' => Complement::COMPLEMENT_TYPE_RESPONSABLE, 'attachmenttype' => Agent::class, 'attachmentid' => $agent->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon ajouter"></span> Ajouter un·e supérieur·e </a> Loading Loading
module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormAwareTrait.php +2 −2 Changes for module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormAwareTrait.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ trait SelectionAgentFormAwareTrait { /** * @return SelectionAgentForm */ public function getSelectionAgentForm() public function getSelectionAgentForm() : SelectionAgentForm { return $this->selectionAgentForm; } Loading @@ -19,7 +19,7 @@ trait SelectionAgentFormAwareTrait { * @param SelectionAgentForm $selectionAgentForm * @return SelectionAgentForm */ public function setSelectionAgentForm($selectionAgentForm) public function setSelectionAgentForm(SelectionAgentForm $selectionAgentForm) : SelectionAgentForm { $this->selectionAgentForm = $selectionAgentForm; return $this->selectionAgentForm; Loading
module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/EntretienProfessionnelController.php +9 −4 Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/EntretienProfessionnelController.php: 9 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -119,9 +119,9 @@ class EntretienProfessionnelController extends AbstractActionController $term = $this->params()->fromQuery('term'); if ($term !== null and trim($term) !== "") { $agentsResponsables = $this->getEntretienProfessionnelService()->findResponsablePourEntretien($structure, $term); $agentsDelegues = $this->getEntretienProfessionnelService()->findDeleguePourEntretien($structure, $campagne, $term); $agentsSuperieures = $this->getEntretienProfessionnelService()->findSuperieurPourEntretien($agent, $term); $agentsResponsables = ($structure)?$this->getEntretienProfessionnelService()->findResponsablePourEntretien($structure, $term):[]; $agentsDelegues = ($campagne AND $structure)?$this->getEntretienProfessionnelService()->findDeleguePourEntretien($structure, $campagne, $term):[]; $agentsSuperieures = ($agent)?$this->getEntretienProfessionnelService()->findSuperieurPourEntretien($agent, $term):[]; $result = $this->getAgentService()->formatAgentJSON(array_merge($agentsResponsables, $agentsDelegues, $agentsSuperieures)); return new JsonModel($result); } Loading Loading @@ -185,7 +185,12 @@ class EntretienProfessionnelController extends AbstractActionController /** @var SearchAndSelect $element */ $element = $form->get('responsable'); /** @see EntretienProfessionnelController::findResponsablePourEntretienAction() */ $element->setAutocompleteSource($this->url()->fromRoute('entretien-professionnel/find-responsable-pour-entretien', ['structure' => $structure->getId(), 'campagne' => $campagne->getId()], ['query' => ['agent' => $agentId]], true)); $element->setAutocompleteSource($this->url()->fromRoute('entretien-professionnel/find-responsable-pour-entretien', ['agent' => $agent->getId(), 'structure' => $structure->getId(), 'campagne' => $campagne->getId()], ['query' => ['agent' => $agentId]], true)); } else { /** @var SearchAndSelect $element */ $element = $form->get('responsable'); /** @see EntretienProfessionnelController::findResponsablePourEntretienAction() */ $element->setAutocompleteSource($this->url()->fromRoute('entretien-professionnel/find-responsable-pour-entretien', [], ['query' => ['agent' => $agentId]], true)); } /** @var Request $request */ Loading
module/EntretienProfessionnel/src/EntretienProfessionnel/Form/EntretienProfessionnel/EntretienProfessionnelForm.php +1 −2 Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Form/EntretienProfessionnel/EntretienProfessionnelForm.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace EntretienProfessionnel\Form\EntretienProfessionnel; use DateInterval; use DateTime; use EntretienProfessionnel\Entity\Db\EntretienProfessionnel; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; Loading Loading @@ -145,7 +144,7 @@ class EntretienProfessionnelForm extends Form { 'name' => Callback::class, 'options' => [ 'messages' => [ Callback::INVALID_VALUE => "Veuillez sélectionnez un responsable dans la liste déroulante.", Callback::INVALID_VALUE => "Veuillez sélectionner un responsable dans la liste déroulante.", ], 'callback' => function ($value, $context = []) { $hasResponsable = (isset($context['responsable']) AND isset($context['responsable']['id']) AND trim($context['responsable']['id']) !== ''); Loading
module/Structure/view/structure/structure/partial/agents.phtml +1 Changes for module/Structure/view/structure/structure/partial/agents.phtml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ $isForce = (isset($options['force']) AND $options['force'] === true); <br/> <?php endforeach; ?> <?php if ($canComplement) : ?> <?php /** @see \Application\Controller\ComplementController::ajouterAction() */ ?> <a href="<?php echo $this->url('complement/ajouter', ['type' => Complement::COMPLEMENT_TYPE_RESPONSABLE, 'attachmenttype' => Agent::class, 'attachmentid' => $agent->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon ajouter"></span> Ajouter un·e supérieur·e </a> Loading