Loading module/Application/config/module.config.php +2 −1 Changes for module/Application/config/module.config.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -316,11 +316,12 @@ return [ 'view_manager' => [ 'template_map' => [ 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', 'error/403' => realpath('./module/Application/view/error/403.phtml'), 'error/404' => realpath('./module/Application/view/error/404.phtml'), ], 'template_path_stack' => [ __DIR__ . '/../view', ], ], 'translator' => [ Loading module/Application/src/Application/Service/Agent/AgentService.php +2 −2 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ class AgentService { if (!empty($liste)) return $liste; //checking structure $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true); $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false); if (count($affectationsPrincipales) !== 1) return []; //throw new LogicException("Plusieurs affectations principales pour l'agent ".$agent->getId() . ":".$agent->getDenomination()); $structure = $affectationsPrincipales[0]->getStructure(); Loading Loading @@ -394,7 +394,7 @@ class AgentService { if ($superieurs === null) $superieurs = $this->computeSuperieures($agent, $date); //checking structure $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true); $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false); $structure = null; if (count($affectationsPrincipales) === 1) { $structure = $affectationsPrincipales[0]->getStructure()->getNiv2(); Loading module/Formation/config/merged/administration.config.php +30 −3 Changes for module/Formation/config/merged/administration.config.php: 30 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -4,11 +4,11 @@ namespace Formation; use Formation\Controller\AdministrationController; use Formation\Controller\AdministrationControllerFactory; use UnicaenParametre\Controller\CategorieController; use UnicaenParametre\Provider\Privilege\ParametrecategoriePrivileges; use UnicaenPrivilege\Guard\PrivilegeController; use Laminas\Router\Http\Literal; use Laminas\Router\Http\Segment; use UnicaenIndicateur\Provider\Privilege\IndicateurPrivileges; use UnicaenParametre\Provider\Privilege\ParametrecategoriePrivileges; use UnicaenPrivilege\Guard\PrivilegeController; use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges; use UnicaenRenderer\Controller\IndexController; use UnicaenRenderer\Provider\Privilege\DocumenttemplatePrivileges; Loading @@ -17,6 +17,15 @@ return [ 'bjyauthorize' => [ 'guards' => [ PrivilegeController::class => [ [ 'controller' => AdministrationController::class, 'action' => [ 'indicateur', ], 'privileges' => [ IndicateurPrivileges::AFFICHER_INDICATEUR, ], ], [ 'controller' => AdministrationController::class, 'action' => [ Loading Loading @@ -62,6 +71,13 @@ return [ 'order' => 20000, 'dropdown-header' => true, 'pages' => [ 'indicateur' => [ 'order' => 1000, 'label' => 'Indicateurs et tableaux de bords', 'route' => 'formation/administration/indicateur', 'resource' => ParametrecategoriePrivileges::getResourceId(IndicateurPrivileges::AFFICHER_INDICATEUR), 'icon' => 'fas fa-angle-right', ], 'parametre' => [ 'order' => 1000, 'label' => 'Paramètres', Loading Loading @@ -104,6 +120,17 @@ return [ ], 'may_terminate' => false, 'child_routes' => [ 'indicateur' => [ 'type' => Segment::class, 'options' => [ /** @see AdministrationController::indicateurAction() */ 'route' => '/indicateur', 'defaults' => [ 'controller' => AdministrationController::class, 'action' => 'indicateur', ], ], ], 'parametre' => [ 'type' => Segment::class, 'options' => [ Loading module/Formation/config/module.config.php +2 −17 Changes for module/Formation/config/module.config.php: 2 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -208,23 +208,6 @@ return [ ], ], ], 'default' => [ 'home' => [ 'pages' => [ 'ressource' => [ 'pages' => [ 'formation' => [ 'label' => 'Gestion des formations', 'route' => 'formation', 'resource' => FormationPrivileges::getResourceId(FormationPrivileges::FORMATION_ACCES), 'order' => 300, 'dropdown-header' => true, ], ], ], ], ], ], ], 'service_manager' => [ Loading Loading @@ -264,6 +247,8 @@ return [ ], 'template_map' => [ 'mes-formations/layout' => realpath('./module/Formation/view/layout/layout.phtml'), 'error/403' => realpath('./module/Formation/view/error/403.phtml'), 'error/404' => realpath('./module/Formation/view/error/404.phtml'), ], ], Loading module/Formation/src/Formation/Controller/AdministrationController.php +18 −0 Changes for module/Formation/src/Formation/Controller/AdministrationController.php: 18 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ namespace Formation\Controller; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; use UnicaenIndicateur\Service\Indicateur\IndicateurServiceAwareTrait; use UnicaenIndicateur\Service\TableauDeBord\TableauDeBordServiceAwareTrait; use UnicaenParametre\Service\Categorie\CategorieServiceAwareTrait; use UnicaenParametre\Service\Parametre\ParametreServiceAwareTrait; use UnicaenPrivilege\Service\Privilege\PrivilegeServiceAwareTrait; Loading @@ -13,11 +15,27 @@ use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait; class AdministrationController extends AbstractActionController { use CategorieServiceAwareTrait; use IndicateurServiceAwareTrait; use ParametreServiceAwareTrait; use PrivilegeServiceAwareTrait; use RoleServiceAwareTrait; use TableauDeBordServiceAwareTrait; use TemplateServiceAwareTrait; public function indicateurAction() : ViewModel { $indicateurs = $this->getIndicateurService()->getIndicateursByNamespace('Formation\Provider\Indicateur'); $tableaux = $this->getTableauDeBordService()->getTableauxDeBordByNamespace('Formation\Provider\Indicateur'); $vm = new ViewModel([ 'indicateurs' => $indicateurs, 'tableaux' => $tableaux, 'retour' => $this->url()->fromRoute('formation/administration/indicateur', [], ['force_canonical' => true], true), ]); return $vm; } public function parametreAction() : ViewModel { $categorie = $this->getCategorieService()->getCategoriebyCode('FORMATION'); Loading Loading
module/Application/config/module.config.php +2 −1 Changes for module/Application/config/module.config.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -316,11 +316,12 @@ return [ 'view_manager' => [ 'template_map' => [ 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', 'error/403' => realpath('./module/Application/view/error/403.phtml'), 'error/404' => realpath('./module/Application/view/error/404.phtml'), ], 'template_path_stack' => [ __DIR__ . '/../view', ], ], 'translator' => [ Loading
module/Application/src/Application/Service/Agent/AgentService.php +2 −2 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ class AgentService { if (!empty($liste)) return $liste; //checking structure $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true); $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false); if (count($affectationsPrincipales) !== 1) return []; //throw new LogicException("Plusieurs affectations principales pour l'agent ".$agent->getId() . ":".$agent->getDenomination()); $structure = $affectationsPrincipales[0]->getStructure(); Loading Loading @@ -394,7 +394,7 @@ class AgentService { if ($superieurs === null) $superieurs = $this->computeSuperieures($agent, $date); //checking structure $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true); $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false); $structure = null; if (count($affectationsPrincipales) === 1) { $structure = $affectationsPrincipales[0]->getStructure()->getNiv2(); Loading
module/Formation/config/merged/administration.config.php +30 −3 Changes for module/Formation/config/merged/administration.config.php: 30 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -4,11 +4,11 @@ namespace Formation; use Formation\Controller\AdministrationController; use Formation\Controller\AdministrationControllerFactory; use UnicaenParametre\Controller\CategorieController; use UnicaenParametre\Provider\Privilege\ParametrecategoriePrivileges; use UnicaenPrivilege\Guard\PrivilegeController; use Laminas\Router\Http\Literal; use Laminas\Router\Http\Segment; use UnicaenIndicateur\Provider\Privilege\IndicateurPrivileges; use UnicaenParametre\Provider\Privilege\ParametrecategoriePrivileges; use UnicaenPrivilege\Guard\PrivilegeController; use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges; use UnicaenRenderer\Controller\IndexController; use UnicaenRenderer\Provider\Privilege\DocumenttemplatePrivileges; Loading @@ -17,6 +17,15 @@ return [ 'bjyauthorize' => [ 'guards' => [ PrivilegeController::class => [ [ 'controller' => AdministrationController::class, 'action' => [ 'indicateur', ], 'privileges' => [ IndicateurPrivileges::AFFICHER_INDICATEUR, ], ], [ 'controller' => AdministrationController::class, 'action' => [ Loading Loading @@ -62,6 +71,13 @@ return [ 'order' => 20000, 'dropdown-header' => true, 'pages' => [ 'indicateur' => [ 'order' => 1000, 'label' => 'Indicateurs et tableaux de bords', 'route' => 'formation/administration/indicateur', 'resource' => ParametrecategoriePrivileges::getResourceId(IndicateurPrivileges::AFFICHER_INDICATEUR), 'icon' => 'fas fa-angle-right', ], 'parametre' => [ 'order' => 1000, 'label' => 'Paramètres', Loading Loading @@ -104,6 +120,17 @@ return [ ], 'may_terminate' => false, 'child_routes' => [ 'indicateur' => [ 'type' => Segment::class, 'options' => [ /** @see AdministrationController::indicateurAction() */ 'route' => '/indicateur', 'defaults' => [ 'controller' => AdministrationController::class, 'action' => 'indicateur', ], ], ], 'parametre' => [ 'type' => Segment::class, 'options' => [ Loading
module/Formation/config/module.config.php +2 −17 Changes for module/Formation/config/module.config.php: 2 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -208,23 +208,6 @@ return [ ], ], ], 'default' => [ 'home' => [ 'pages' => [ 'ressource' => [ 'pages' => [ 'formation' => [ 'label' => 'Gestion des formations', 'route' => 'formation', 'resource' => FormationPrivileges::getResourceId(FormationPrivileges::FORMATION_ACCES), 'order' => 300, 'dropdown-header' => true, ], ], ], ], ], ], ], 'service_manager' => [ Loading Loading @@ -264,6 +247,8 @@ return [ ], 'template_map' => [ 'mes-formations/layout' => realpath('./module/Formation/view/layout/layout.phtml'), 'error/403' => realpath('./module/Formation/view/error/403.phtml'), 'error/404' => realpath('./module/Formation/view/error/404.phtml'), ], ], Loading
module/Formation/src/Formation/Controller/AdministrationController.php +18 −0 Changes for module/Formation/src/Formation/Controller/AdministrationController.php: 18 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ namespace Formation\Controller; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; use UnicaenIndicateur\Service\Indicateur\IndicateurServiceAwareTrait; use UnicaenIndicateur\Service\TableauDeBord\TableauDeBordServiceAwareTrait; use UnicaenParametre\Service\Categorie\CategorieServiceAwareTrait; use UnicaenParametre\Service\Parametre\ParametreServiceAwareTrait; use UnicaenPrivilege\Service\Privilege\PrivilegeServiceAwareTrait; Loading @@ -13,11 +15,27 @@ use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait; class AdministrationController extends AbstractActionController { use CategorieServiceAwareTrait; use IndicateurServiceAwareTrait; use ParametreServiceAwareTrait; use PrivilegeServiceAwareTrait; use RoleServiceAwareTrait; use TableauDeBordServiceAwareTrait; use TemplateServiceAwareTrait; public function indicateurAction() : ViewModel { $indicateurs = $this->getIndicateurService()->getIndicateursByNamespace('Formation\Provider\Indicateur'); $tableaux = $this->getTableauDeBordService()->getTableauxDeBordByNamespace('Formation\Provider\Indicateur'); $vm = new ViewModel([ 'indicateurs' => $indicateurs, 'tableaux' => $tableaux, 'retour' => $this->url()->fromRoute('formation/administration/indicateur', [], ['force_canonical' => true], true), ]); return $vm; } public function parametreAction() : ViewModel { $categorie = $this->getCategorieService()->getCategoriebyCode('FORMATION'); Loading