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

Refactoring agent

parent 3dcfec93
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
Version 1.1.3
-------------
+ [Planifier] Repenser les niveaux de maitrise (ajouter un type)

Version 1.1.2
-------------
+ Ajout de niveau de maîtrise pour les compétences + gestion de leur affection au niveau des CompetenceElement.
+ Ajout de niveau de maîtrise pour les compétences et de compétences clefs + gestion de leur affection au niveau des ``CompetenceElement``.
+ Premier rendu visuel des graphiques en radar des applications liées aux fiches métiers et des couples (fiche métier, agent).
+ Premier rendu visuel des graphiques en radar des compétences liées aux fiches métiers et des couples (fiche métier, agent).
+ [Interface] changement de l'intitulé 'applicatif' en 'logiciels métiers' 
+ Refonte des ElementBlocs : applicationBloc, CompetenceBloc, formationBloc remplacent les agentApplication, agentCompetence, agentFormation
+ Possibilité de liés des compétences et des applications dans une formation qui sont transmises sur la fiche de l'agent si la formation a été suivie.

Version 1.1.1
-------------
+9 −142
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ use Application\Provider\Privilege\AgentPrivileges;
use Application\Service\Agent\AgentService;
use Application\Service\Agent\AgentServiceFactory;
use Application\View\Helper\AgentAffectationViewHelper;
use Application\View\Helper\AgentApplicationViewHelper;
use Application\View\Helper\AgentFormationViewHelper;
use Application\View\Helper\AgentGradeViewHelper;
use Application\View\Helper\AgentStatutViewHelper;
use Application\View\Helper\AgentViewHelper;
@@ -42,6 +40,8 @@ return [
                            AgentPrivileges::AGENT_ELEMENT_HISTORISER,
                            AgentPrivileges::AGENT_ELEMENT_DETRUIRE,
                            AgentPrivileges::AGENT_ELEMENT_VALIDER,
                            AgentPrivileges::AGENT_ACQUIS_AFFICHER,
                            AgentPrivileges::AGENT_ACQUIS_MODIFIER,
                        ],
                        'resources' => ['Agent'],
                        'assertion' => AgentAssertion::class
@@ -78,8 +78,6 @@ return [
                    'controller' => AgentController::class,
                    'action' => [
                        'afficher-statuts-grades',
                        'afficher-application',
                        'afficher-formation',
                    ],
                    'privileges' => [
                        AgentPrivileges::AGENT_ELEMENT_VOIR,
@@ -90,56 +88,13 @@ return [
                    'controller' => AgentController::class,
                    'action' => [
                        'upload-fichier',
                    ],
                    'privileges' => [
                        AgentPrivileges::AGENT_EDITER,
                    ],
                ],
                [
                    'controller' => AgentController::class,
                    'action' => [
                        'ajouter-application',
                        'ajouter-formation',
                    ],
                    'privileges' => [
                        AgentPrivileges::AGENT_ELEMENT_AJOUTER,
                    ],
                    'assertion'  => AgentAssertion::class,
                ],
                [
                    'controller' => AgentController::class,
                    'action' => [
                        'modifier-application',
                        'ajouter-application',
                        'modifier-formation',
                    ],
                    'privileges' => [
                        AgentPrivileges::AGENT_ELEMENT_MODIFIER,
                    ],
                    'assertion'  => AgentAssertion::class,
                ],
                [
                    'controller' => AgentController::class,
                    'action' => [
                        'historiser-application',
                        'restaurer-application',
                        'historiser-formation',
                        'restaurer-formation',
                    ],
                    'privileges' => [
                        AgentPrivileges::AGENT_ELEMENT_MODIFIER,
                    ],
                    'assertion'  => AgentAssertion::class,
                ],
                [
                    'controller' => AgentController::class,
                    'action' => [
                        'detruire-formation',
                        'detruire-application',
                    ],
                    'privileges' => [
                        AgentPrivileges::AGENT_ELEMENT_DETRUIRE,
                        AgentPrivileges::AGENT_EDITER,
                    ],
                    'assertion'  => AgentAssertion::class,
                ],
                [
                    'controller' => AgentController::class,
@@ -213,6 +168,7 @@ return [

                    /** Routes de gestion des applications*************************************************************/

                    //TODO changer dans parcours-applicatifs
                    'ajouter-application' => [
                        'type'  => Segment::class,
                        'options' => [
@@ -223,58 +179,8 @@ return [
                            ],
                        ],
                    ],
                    'afficher-application' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/afficher-application/:agent/:application-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'afficher-application',
                            ],
                        ],
                    ],
                    'modifier-application' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/modifier-application/:agent/:application-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'modifier-application',
                            ],
                        ],
                    ],
                    'historiser-application' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/historiser-application/:agent/:application-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'historiser-application',
                            ],
                        ],
                    ],
                    'restaurer-application' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/restaurer-application/:agent/:application-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'restaurer-application',
                            ],
                        ],
                    ],
                    'detruire-application' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/detruire-application/:agent/:application-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'detruire-application',
                            ],
                        ],
                    ],

                    /** Route des AgentFormation **********************************************************************/
                    //TODO changer dans parcours-de-formation
                    //TODO changer dans formation-bloc

                    'ajouter-formation' => [
                        'type'  => Segment::class,
@@ -286,16 +192,7 @@ return [
                            ],
                        ],
                    ],
                    'afficher-formation' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/afficher-formation/:agent/:formation-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'afficher-formation',
                            ],
                        ],
                    ],
                    //TODO changer dans formation-bloc
                    'modifier-formation' => [
                        'type'  => Segment::class,
                        'options' => [
@@ -306,36 +203,6 @@ return [
                            ],
                        ],
                    ],
                    'historiser-formation' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/historiser-formation/:agent/:formation-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'historiser-formation',
                            ],
                        ],
                    ],
                    'restaurer-formation' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/restaurer-formation/:agent/:formation-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'restaurer-formation',
                            ],
                        ],
                    ],
                    'detruire-formation' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/detruire-formation/:agent/:formation-element',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'detruire-formation',
                            ],
                        ],
                    ],

                    /** VALIDATION D'ELEMENT **************************************************************************/

@@ -407,7 +274,7 @@ return [
                            'agent' => [
                                'label'    => 'Agents',
                                'route'    => 'agent',
                                'resource' => AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER),
                                'resource' => PrivilegeController::getResourceId(AgentController::class, 'index') ,
                                'order'    => 100,
                            ],
                        ],
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ return [
                        ApplicationPrivileges::APPLICATION_AFFICHER,
                        CompetencePrivileges::COMPETENCE_AFFICHER,
                        FormationPrivileges::FORMATION_AFFICHER,
                        AgentPrivileges::AGENT_ACQUIS_AFFICHER,
                    ],
                ],
                [
@@ -38,6 +39,7 @@ return [
                        ApplicationPrivileges::APPLICATION_EFFACER,
                        CompetencePrivileges::COMPETENCE_EFFACER,
                        FormationPrivileges::FORMATION_SUPPRIMER,
                        AgentPrivileges::AGENT_ACQUIS_MODIFIER,
                    ],
                ],
                [
@@ -48,6 +50,7 @@ return [
                    'privileges' => [
                        AgentPrivileges::AGENT_ELEMENT_MODIFIER,
                        FicheMetierPrivileges::FICHEMETIER_MODIFIER,
                        AgentPrivileges::AGENT_ACQUIS_MODIFIER,
                    ],
                ],
            ],
+3 −14
Original line number Diff line number Diff line
@@ -49,20 +49,9 @@ class AgentAssertion extends AbstractAssertion {
        }

        switch($privilege) {
            case AgentPrivileges::AGENT_ELEMENT_VOIR:
                switch ($role->getRoleId()) {
                    case RoleConstant::ADMIN_FONC:
                    case RoleConstant::ADMIN_TECH:
                    case RoleConstant::OBSERVATEUR:
                        return true;
                    case RoleConstant::PERSONNEL:
                        return ($entity->getUtilisateur() === $user);
                    case RoleConstant::GESTIONNAIRE:
                        return $isGestionnaire;
                    case RoleConstant::RESPONSABLE:
                        return $isResponsable;
                }
                return false;
            case AgentPrivileges::AGENT_ACQUIS_AFFICHER:
                case true;
            case AgentPrivileges::AGENT_ACQUIS_MODIFIER:
            case AgentPrivileges::AGENT_ELEMENT_AJOUTER:
            case AgentPrivileges::AGENT_ELEMENT_MODIFIER:
            case AgentPrivileges::AGENT_ELEMENT_HISTORISER:
+12 −222

File changed.

Preview size limit exceeded, changes collapsed.

Loading