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

Ajustement

parent b09aff0f
Loading
Loading
Loading
Loading
+3 −1
Changes for module/Application/src/Application/Controller/FichePosteController.php: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ class FichePosteController extends AbstractActionController {
        ]);
    }

    public function editerAction() : ViewModel
    public function editerAction()
    {
        $structureId = $this->params()->fromQuery('structure');
        $structure = $this->getStructureService()->getStructure($structureId);
@@ -210,6 +210,8 @@ class FichePosteController extends AbstractActionController {
        /** @var FichePoste $fiche */
        $fiche = $this->getFichePosteService()->getRequestedFichePoste($this, 'fiche-poste', false);
        if ($fiche === null) $fiche = $this->getFichePosteService()->getLastFichePoste();

        if ($fiche->getEtat()->getCode() === FichePoste::ETAT_CODE_SIGNEE) return $this->redirect()->toRoute('fiche-poste/afficher', ['structure' => $structure, 'fiche-poste' => $fiche->getId()], [] ,true);
        $agent = $fiche->getAgent();

        $applications = $this->getFichePosteService()->getApplicationsDictionnaires($fiche);
+5 −1
Changes for module/Application/src/Application/View/Helper/partial/fiches-postes-as-table.phtml: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ if ($retour) $query['retour'] = $retour;
            <th> Fiche principale </th>
        <?php endif; ?>
        <?php if ($displays['en-cours']) : ?>
            <th style="min-width: 6rem;width: 6rem;"> En&nbsp;cours </th>
            <th style="min-width: 8rem;width: 8rem;"> Validité </th>
        <?php endif; ?>
        <?php if ($displays['modification']) : ?>
            <th> Modification </th>
@@ -168,9 +168,13 @@ if ($retour) $query['retour'] = $retour;
                        <?php if ($etat === FichePoste::ETAT_CODE_SIGNEE) : ?>
                            <?php if ($isEnCours) : ?>
                                <span class="icon ok" style="color:darkgreen;" title="Fiche en cours de validité"></span>
                            <?php else : ?>
                                <?php if ($fiche instanceof FichePoste) : ?>
                                    <span style="color:darkred;"><?php echo $fiche->getFinValidite()->format('d/m/Y'); ?></span>
                                <?php else : ?>
                                    <span class="icon ko" style="color: darkred;" title="Fiche plus valide (remplacée)"></span>
                                <?php endif; ?>
                            <?php endif; ?>
                        <?php else : ?>
                            <span class="icon sursis" style="color:cadetblue;" title="Fiche non totalement validée"></span>
                        <?php endif; ?>
+3 −2
Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Assertion/EntretienProfessionnelAssertion.php: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ class EntretienProfessionnelAssertion extends AbstractAssertion {
        $agent = $this->getAgentService()->getAgentByUser($user);
        $role = $this->getUserService()->getConnectedRole();


        $predicats = [];
        if ($agent) {
            $entretienId = (($this->getMvcEvent()->getRouteMatch()->getParam('entretien')));
@@ -234,6 +233,7 @@ class EntretienProfessionnelAssertion extends AbstractAssertion {
                }
                return false;
            case 'acceder' :
            case 'renseigner' :
                switch ($role->getRoleId()) {
                    case RoleConstant::ADMIN_TECH :
                    case RoleConstant::ADMIN_FONC :
@@ -241,7 +241,8 @@ class EntretienProfessionnelAssertion extends AbstractAssertion {
                    case Agent::ROLE_AGENT : return $predicats['isAgentEntretien'];
                    case RoleProvider::RESPONSABLE : return ($predicats['isResponsableEntretien'] OR $predicats['isResponsableStructure'] OR $predicats['isAutoriteStructure']);
                    case Agent::ROLE_SUPERIEURE : return $predicats['isSuperieureHierarchique'];
                    case Agent::ROLE_AUTORITE : return $predicats['isAutoriteHierarchique'];
                    case Agent::ROLE_AUTORITE :
                        return $predicats['isAutoriteHierarchique'];
                }
                return false;
        }