Commit ed1765ba authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Modification du ciruit de validation

parent 4d0f1264
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -614,6 +614,11 @@ class AgentService {
            ->join('agent.statuts', 'statut')->addSelect('statut')
            ->andWhere('agent.id in (:ids)')->setParameter('ids',$ids)
            ->orderBy('agent.nomUsuel, agent.prenom', 'ASC')

//            ->join('agent.autorites', 'autorite')->addSelect('autorite')
//            ->join('autorite.autorite', 'aautorite')->addSelect('aautorite')
//            ->join('agent.superieurs', 'superieur')->addSelect('superieur')
//            ->join('autorite.autorite', 'aautorite')->addSelect('aautorite')
        ;
        $agents = $qb->getQuery()->getResult();

+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ class EntretienProfessionnelAssertion extends AbstractAssertion {
                        return true;
                    case RoleProvider::RESPONSABLE:
                    case Agent::ROLE_AUTORITE:
                        return $predicats['isAutoriteStructure'];
                        return ($predicats['isAutoriteHierarchique'] && !$predicats['isResponsableEntretien']);
                    default:
                        return false;
                }
+2 −2
Original line number Diff line number Diff line
@@ -80,14 +80,14 @@ class ObservationController extends AbstractActionController {
    {
        $observation = $this->getObservationService()->getRequestedObservation($this);
        $this->getObservationService()->historise($observation);
        return $this->redirect()->toRoute('entretien-professionnel/acceder', ['entretien' => $observation->getEntretien()->getId()], ['fragment' => 'avis'], true);
        return $this->redirect()->toRoute('entretien-professionnel/acceder', ['entretien-professionnel' => $observation->getEntretien()->getId()], ['fragment' => 'avis'], true);
    }

    public function restaurerAction() : Response
    {
        $observation = $this->getObservationService()->getRequestedObservation($this);
        $this->getObservationService()->restore($observation);
        return $this->redirect()->toRoute('entretien-professionnel/acceder', ['entretien' => $observation->getEntretien()->getId()], ['fragment' => 'avis'], true);
        return $this->redirect()->toRoute('entretien-professionnel/acceder', ['entretien-professionnel' => $observation->getEntretien()->getId()], ['fragment' => 'avis'], true);
    }

    public function supprimerAction() : ViewModel
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ class NotificationService {
        return $mail;
    }

    /** Notification liées aux validations de l'entretien professionnel d'un agent ************************************/
    /** Notifications liées aux validations de l'entretien professionnel d'un agent ************************************/

    public function triggerValidationResponsableEntretien(EntretienProfessionnel $entretien) : Mail
    {
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ class UrlService extends \Application\Service\Url\UrlService
        /** @var EntretienProfessionnel $entretien */
        $entretien = $this->getVariable('entretien');
        if ($entretien === null) return "<span style='color:darkred'>Variable [entretien] non founie à UrlService</span>";
        $url = $this->renderer->url('entretien-professionnel/acceder', ['entretien' => $entretien->getId()], ['force_canonical' => true], true);
        $url = $this->renderer->url('entretien-professionnel/acceder', ['entretien-professionnel' => $entretien->getId()], ['force_canonical' => true], true);
        return $url;
    }
}
 No newline at end of file
Loading