Loading module/Application/src/Application/Controller/IndexController.php +19 Changes for module/Application/src/Application/Controller/IndexController.php: 19 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -6,8 +6,12 @@ namespace Application\Controller; use Application\Provider\Role\RoleProvider as AppRoleProvider; use Application\Entity\Db\Agent; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use EntretienProfessionnel\Provider\Role\EntretienProfessionnelRoles; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelServiceAwareTrait; use Formation\Service\DemandeExterne\DemandeExterneServiceAwareTrait; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritServiceAwareTrait; use Structure\Provider\Role\RoleProvider; use Structure\Service\Structure\StructureServiceAwareTrait; use UnicaenAuthentification\Service\Traits\UserContextServiceAwareTrait; Loading @@ -27,6 +31,10 @@ class IndexController extends AbstractActionController use UserServiceAwareTrait; use UserContextServiceAwareTrait; use FichePosteServiceAwareTrait; use EntretienProfessionnelServiceAwareTrait; use FormationInstanceInscritServiceAwareTrait; use DemandeExterneServiceAwareTrait; public function indexAction() { Loading Loading @@ -103,12 +111,23 @@ class IndexController extends AbstractActionController if ($agent !== null) $agents[$agent->getId()] = $agent; } } $fiches = []; $fichesRAW = $this->getFichePosteService()->getFichesPostesbyAgents($agents); foreach ($fichesRAW as $fiche) { // $fiches[$fiche->getAgent()->getId()][] = $fiche; } return new ViewModel([ 'agents' => $agents, 'connectedAgent' => $this->getAgentService()->getAgentByUser($user), 'campagnePrevious' => $this->getCampagneService()->getLastCampagne(), 'campagnesCurrents' => $this->getCampagneService()->getCampagnesActives(), 'fiches' => $fiches, 'demandesInternes' => $this->getFormationInstanceInscritService()->getInscrpitionsByAgentsAndAnnee($agents), 'demandesExternes' => $this->getDemandeExterneService()->getDemandesExternesByAgentsAndAnnee($agents), ]); } Loading module/Application/src/Application/Controller/IndexControllerFactory.php +29 −1 Changes for module/Application/src/Application/Controller/IndexControllerFactory.php: 29 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,8 +3,14 @@ namespace Application\Controller; use Application\Service\Agent\AgentService; use Application\Service\FichePoste\FichePosteService; use EntretienProfessionnel\Service\Campagne\CampagneService; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelService; use Formation\Service\DemandeExterne\DemandeExterneService; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritService; use Interop\Container\ContainerInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Structure\Service\Structure\StructureService; use UnicaenAuthentification\Service\UserContext; use UnicaenUtilisateur\Service\Role\RoleService; Loading @@ -12,7 +18,13 @@ use UnicaenUtilisateur\Service\User\UserService; class IndexControllerFactory { public function __invoke(ContainerInterface $container) /** * @param ContainerInterface $container * @return IndexController * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function __invoke(ContainerInterface $container) : IndexController { /** * @var AgentService $agentService Loading @@ -21,6 +33,12 @@ class IndexControllerFactory { * @var StructureService $structureService * @var UserService $userService * @var UserContext $userContext * * @var FichePosteService $fichePosteService * @var EntretienProfessionnelService $entretienProfessionelService * @var FormationInstanceInscritService $formationInstanceinscritService * @var DemandeExterneService $demandeExterneService * */ $agentService = $container->get(AgentService::class); $campagneService = $container->get(CampagneService::class); Loading @@ -29,6 +47,11 @@ class IndexControllerFactory { $userContext = $container->get(UserContext::class); $structureService = $container->get(StructureService::class); $fichePosteService = $container->get(FichePosteService::class); $entretienProfessionelService = $container->get(EntretienProfessionnelService::class); $formationInstanceinscritService = $container->get(FormationInstanceInscritService::class); $demandeExterneService = $container->get(DemandeExterneService::class); /** @var IndexController $controller */ $controller = new IndexController(); $controller->setAgentService($agentService); Loading @@ -37,6 +60,11 @@ class IndexControllerFactory { $controller->setRoleService($roleService); $controller->setServiceUserContext($userContext); $controller->setStructureService($structureService); $controller->setFichePosteService($fichePosteService); $controller->setEntretienProfessionnelService($entretienProfessionelService); $controller->setFormationInstanceInscritService($formationInstanceinscritService); $controller->setDemandeExterneService($demandeExterneService); return $controller; } Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.AgentAffectation.dcm.xml +1 −1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.AgentAffectation.dcm.xml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> <entity name="Application\Entity\Db\AgentAffectation" table="agent_carriere_affectation"> <id name="id" type="integer" column="affectation_id"> <id name="id" type="integer" column="id"> <generator strategy="IDENTITY"/> </id> Loading module/Application/view/application/index/index-superieur.phtml +53 −118 Changes for module/Application/view/application/index/index-superieur.phtml: 53 added lines, 118 removed lines. Original line number Diff line number Diff line Loading @@ -4,13 +4,21 @@ * @see \Application\Controller\IndexController::indexSuperieurAction() * @var Agent $connectedAgent * @var Agent[] $agents * @var Campagne $campagnePrevious * @var Campagne $campagnesCurrents * * @var FichePoste[] $fiches * @var EntretienProfessionnel[] $entretiens * @var FormationInstanceInscrit[] $demandesInternes * @var DemandeExterne[] $demandesExternes */ use Application\Entity\Db\Agent; use Application\Entity\Db\FichePoste; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Privilege\FichePostePrivileges; use EntretienProfessionnel\Entity\Db\Campagne; use EntretienProfessionnel\Entity\Db\EntretienProfessionnel; use Formation\Entity\Db\DemandeExterne; use Formation\Entity\Db\FormationInstanceInscrit; $canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER)); ?> Loading @@ -27,125 +35,52 @@ $canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges: <?php echo $this->messenger()->addMessagesFromFlashMessenger(); ?> <table class="table table-condensed table-hover"> <thead> <tr> <th> Agent & Affectation </th> <th> Fiche de poste </th> <th> Entretien professionnel </th> </tr> </thead> <tbody> <?php foreach ($agents as $agent) : ?> <tr> <td> <?php echo $agent->getDenomination(); ?> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], [], true); ?>"> <span class="icon icon-voir" title="Afficher les informations de l'agent"></span> <ul class="nav"> <!-- <li class="nav-item">--> <!-- <a class="nav-link" href="#ficheposte" aria-controls="ficheposte" role="tab" data-toggle="tabz">--> <!-- Fiches de poste--> <!-- </a>--> <!-- </li>--> <li class="nav-item" > <a class="nav-link" href="#entretien" aria-controls="entretien" role="tab" data-toggle="tabz"> Entretiens professionnel </a> <?php endif; ?> <br/> <?php $affectation = $agent->getAffectationPrincipale(); ?> <?php if ($affectation) : ?> <?php $niveau2 = $affectation->getStructure()->getNiv2(); ?> <?php if ($niveau2 !== null) : ?> [<?php echo $niveau2->getLibelleCourt(); ?>] <?php endif; ?> <?php echo $affectation->getStructure()->getLibelleLong(); ?> <?php else : ?> Aucune affectation principale <?php endif; ?> </td> <td> <?php $fichePoste = $agent->getFichePosteBest(); ?> <?php $canVoirFichePoste = $this->isAllowed($fichePoste, FichePostePrivileges::FICHEPOSTE_AFFICHER); ?> <?php if ($fichePoste) : ?> <?php echo $this->etatbadge($fichePoste->getEtat()); ?> <?php echo $fichePoste->getLibelleMetierPrincipal(); ?> <?php if ($fichePoste->getLibelle()) : ?> <br/> <?php echo $fichePoste->getLibelle; ?> <?php endif; ?> <?php else : ?> Aucune fiche de poste <?php endif; ?> <br/> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], ['fragment' => 'fiches'], true); ?>"> <span class="icon gerer" title="Accéder à la gestion des fiches postes"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> <?php if ($fichePoste AND $canVoirFichePoste) : ?> <a href="<?php echo $this->url('fiche-poste/afficher', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-voir" title="Afficher la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <a href="<?php echo $this->url('fiche-poste/exporter', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-pdf" title="Exporter la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> </td> <td> <?php if ($campagnePrevious === null) : ?> Aucune campagne précédente <?php else : ?> Précédent (<?php echo $campagnePrevious->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagnePrevious); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-voir"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php endif; ?> <?php endif; ?> <br/> <?php if ($campagnesCurrents !== null or $campagnesCurrents !== []) : ?> <?php /** @var Campagne $campagneCurrent */ ?> <?php foreach ($campagnesCurrents as $campagneCurrent) : ?> Courant (<?php echo $campagneCurrent->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagneCurrent); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/modifier', ['entretien' => $entretien->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon gerer"></span></a> <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::accederAction() */ ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien-professionnel' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-editer"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::creerAction() */?> <a href="<?php echo $this->url('entretien-professionnel/creer', ["campagne" => $campagneCurrent->getId()], ["query" => ["agent" => $agent->getId(), 'structure' => ($affectation AND $affectation->getStructure())?$affectation->getStructure()->getId():null]], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon icon-ajouter"></span></a> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <br/> </td> </tr> <?php endforeach; ?> </tbody> </table> </li> <li class="nav-item" > <a class="nav-link" href="#formation" aria-controls="formation" role="tab" data-toggle="tabz"> Formations </a> </li> </ul> <div class="tab-content"> <div id="ficheposte" class="tab-pane " role="tabpanel"> <?php echo $this->partial('partial/ficheposte', ['agents' => $agents, 'fiches' => $fiches], [], true); ?> </div> <div id="entretien" class="tab-pane " role="tabpanel"> <?php echo $this->partial('partial/entretien', ['agents' => $agents, 'campagnePrevious' => $campagnePrevious, 'campagnesCurrents' => $campagnesCurrents], [], true); ?> </div> <div id="formation" class="tab-pane " role="tabpanel"> <?php echo $this->partial('partial/formation', ['agents' => $agents, 'demandesInternes' => $demandesInternes, 'demandesExternes' => $demandesExternes], [], true); ?> </div> </div> <script> $(function() { let hash = $(location).attr('hash'); let name = hash.substr(1); if (name === undefined || name === "") name = "entretien"; $('a[aria-controls=' + name + ']').tab('show'); $('.nav-item a').click(function (e) { // No e.preventDefault() here $(this).tab('show'); }); }); $(function() { $("body").on("modification", function (event) { event.div.modal('hide'); Loading module/Application/view/application/index/partial/entretien.phtml +133 Changes for module/Application/view/application/index/partial/entretien.phtml: 133 added lines, 0 removed lines. Original line number Diff line number Diff line <?php use Application\Entity\Db\Agent; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Privilege\FichePostePrivileges; use EntretienProfessionnel\Entity\Db\Campagne; /** * @var Agent[] $agents * @var Campagne $campagnePrevious * @var Campagne $campagnesCurrents */ $canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER)); ?> <table class="table table-condensed table-hover"> <thead> <tr> <th> Agent & Affectation </th> <th> Fiche de poste </th> <th> Entretien professionnel </th> </tr> </thead> <tbody> <?php foreach ($agents as $agent) : ?> <tr> <td> <?php echo $agent->getDenomination(); ?> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], [], true); ?>"> <span class="icon icon-voir" title="Afficher les informations de l'agent"></span> </a> <?php endif; ?> <br/> <?php $affectation = $agent->getAffectationPrincipale(); ?> <?php if ($affectation) : ?> <?php $niveau2 = $affectation->getStructure()->getNiv2(); ?> <?php if ($niveau2 !== null) : ?> [<?php echo $niveau2->getLibelleCourt(); ?>] <?php endif; ?> <?php echo $affectation->getStructure()->getLibelleLong(); ?> <?php else : ?> Aucune affectation principale <?php endif; ?> </td> <td> <?php $fichePoste = $agent->getFichePosteBest(); ?> <?php $canVoirFichePoste = $this->isAllowed($fichePoste, FichePostePrivileges::FICHEPOSTE_AFFICHER); ?> <?php if ($fichePoste) : ?> <?php echo $this->etatbadge($fichePoste->getEtat()); ?> <?php echo $fichePoste->getLibelleMetierPrincipal(); ?> <?php if ($fichePoste->getLibelle()) : ?> <br/> <?php echo $fichePoste->getLibelle; ?> <?php endif; ?> <?php else : ?> Aucune fiche de poste <?php endif; ?> <br/> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], ['fragment' => 'fiches'], true); ?>"> <span class="icon gerer" title="Accéder à la gestion des fiches postes"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> <?php if ($fichePoste AND $canVoirFichePoste) : ?> <a href="<?php echo $this->url('fiche-poste/afficher', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-voir" title="Afficher la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <a href="<?php echo $this->url('fiche-poste/exporter', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-pdf" title="Exporter la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> </td> <td> <?php if ($campagnePrevious === null) : ?> Aucune campagne précédente <?php else : ?> Précédent (<?php echo $campagnePrevious->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagnePrevious); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-voir"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php endif; ?> <?php endif; ?> <br/> <?php if ($campagnesCurrents !== null or $campagnesCurrents !== []) : ?> <?php /** @var Campagne $campagneCurrent */ ?> <?php foreach ($campagnesCurrents as $campagneCurrent) : ?> Courant (<?php echo $campagneCurrent->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagneCurrent); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/modifier', ['entretien' => $entretien->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon gerer"></span></a> <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::accederAction() */ ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien-professionnel' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-editer"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::creerAction() */?> <a href="<?php echo $this->url('entretien-professionnel/creer', ["campagne" => $campagneCurrent->getId()], ["query" => ["agent" => $agent->getId(), 'structure' => ($affectation AND $affectation->getStructure())?$affectation->getStructure()->getId():null]], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon icon-ajouter"></span></a> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <br/> </td> </tr> <?php endforeach; ?> </tbody> </table> No newline at end of file Loading
module/Application/src/Application/Controller/IndexController.php +19 Changes for module/Application/src/Application/Controller/IndexController.php: 19 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -6,8 +6,12 @@ namespace Application\Controller; use Application\Provider\Role\RoleProvider as AppRoleProvider; use Application\Entity\Db\Agent; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use EntretienProfessionnel\Provider\Role\EntretienProfessionnelRoles; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelServiceAwareTrait; use Formation\Service\DemandeExterne\DemandeExterneServiceAwareTrait; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritServiceAwareTrait; use Structure\Provider\Role\RoleProvider; use Structure\Service\Structure\StructureServiceAwareTrait; use UnicaenAuthentification\Service\Traits\UserContextServiceAwareTrait; Loading @@ -27,6 +31,10 @@ class IndexController extends AbstractActionController use UserServiceAwareTrait; use UserContextServiceAwareTrait; use FichePosteServiceAwareTrait; use EntretienProfessionnelServiceAwareTrait; use FormationInstanceInscritServiceAwareTrait; use DemandeExterneServiceAwareTrait; public function indexAction() { Loading Loading @@ -103,12 +111,23 @@ class IndexController extends AbstractActionController if ($agent !== null) $agents[$agent->getId()] = $agent; } } $fiches = []; $fichesRAW = $this->getFichePosteService()->getFichesPostesbyAgents($agents); foreach ($fichesRAW as $fiche) { // $fiches[$fiche->getAgent()->getId()][] = $fiche; } return new ViewModel([ 'agents' => $agents, 'connectedAgent' => $this->getAgentService()->getAgentByUser($user), 'campagnePrevious' => $this->getCampagneService()->getLastCampagne(), 'campagnesCurrents' => $this->getCampagneService()->getCampagnesActives(), 'fiches' => $fiches, 'demandesInternes' => $this->getFormationInstanceInscritService()->getInscrpitionsByAgentsAndAnnee($agents), 'demandesExternes' => $this->getDemandeExterneService()->getDemandesExternesByAgentsAndAnnee($agents), ]); } Loading
module/Application/src/Application/Controller/IndexControllerFactory.php +29 −1 Changes for module/Application/src/Application/Controller/IndexControllerFactory.php: 29 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -3,8 +3,14 @@ namespace Application\Controller; use Application\Service\Agent\AgentService; use Application\Service\FichePoste\FichePosteService; use EntretienProfessionnel\Service\Campagne\CampagneService; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelService; use Formation\Service\DemandeExterne\DemandeExterneService; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritService; use Interop\Container\ContainerInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Structure\Service\Structure\StructureService; use UnicaenAuthentification\Service\UserContext; use UnicaenUtilisateur\Service\Role\RoleService; Loading @@ -12,7 +18,13 @@ use UnicaenUtilisateur\Service\User\UserService; class IndexControllerFactory { public function __invoke(ContainerInterface $container) /** * @param ContainerInterface $container * @return IndexController * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function __invoke(ContainerInterface $container) : IndexController { /** * @var AgentService $agentService Loading @@ -21,6 +33,12 @@ class IndexControllerFactory { * @var StructureService $structureService * @var UserService $userService * @var UserContext $userContext * * @var FichePosteService $fichePosteService * @var EntretienProfessionnelService $entretienProfessionelService * @var FormationInstanceInscritService $formationInstanceinscritService * @var DemandeExterneService $demandeExterneService * */ $agentService = $container->get(AgentService::class); $campagneService = $container->get(CampagneService::class); Loading @@ -29,6 +47,11 @@ class IndexControllerFactory { $userContext = $container->get(UserContext::class); $structureService = $container->get(StructureService::class); $fichePosteService = $container->get(FichePosteService::class); $entretienProfessionelService = $container->get(EntretienProfessionnelService::class); $formationInstanceinscritService = $container->get(FormationInstanceInscritService::class); $demandeExterneService = $container->get(DemandeExterneService::class); /** @var IndexController $controller */ $controller = new IndexController(); $controller->setAgentService($agentService); Loading @@ -37,6 +60,11 @@ class IndexControllerFactory { $controller->setRoleService($roleService); $controller->setServiceUserContext($userContext); $controller->setStructureService($structureService); $controller->setFichePosteService($fichePosteService); $controller->setEntretienProfessionnelService($entretienProfessionelService); $controller->setFormationInstanceInscritService($formationInstanceinscritService); $controller->setDemandeExterneService($demandeExterneService); return $controller; } Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.AgentAffectation.dcm.xml +1 −1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.AgentAffectation.dcm.xml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> <entity name="Application\Entity\Db\AgentAffectation" table="agent_carriere_affectation"> <id name="id" type="integer" column="affectation_id"> <id name="id" type="integer" column="id"> <generator strategy="IDENTITY"/> </id> Loading
module/Application/view/application/index/index-superieur.phtml +53 −118 Changes for module/Application/view/application/index/index-superieur.phtml: 53 added lines, 118 removed lines. Original line number Diff line number Diff line Loading @@ -4,13 +4,21 @@ * @see \Application\Controller\IndexController::indexSuperieurAction() * @var Agent $connectedAgent * @var Agent[] $agents * @var Campagne $campagnePrevious * @var Campagne $campagnesCurrents * * @var FichePoste[] $fiches * @var EntretienProfessionnel[] $entretiens * @var FormationInstanceInscrit[] $demandesInternes * @var DemandeExterne[] $demandesExternes */ use Application\Entity\Db\Agent; use Application\Entity\Db\FichePoste; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Privilege\FichePostePrivileges; use EntretienProfessionnel\Entity\Db\Campagne; use EntretienProfessionnel\Entity\Db\EntretienProfessionnel; use Formation\Entity\Db\DemandeExterne; use Formation\Entity\Db\FormationInstanceInscrit; $canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER)); ?> Loading @@ -27,125 +35,52 @@ $canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges: <?php echo $this->messenger()->addMessagesFromFlashMessenger(); ?> <table class="table table-condensed table-hover"> <thead> <tr> <th> Agent & Affectation </th> <th> Fiche de poste </th> <th> Entretien professionnel </th> </tr> </thead> <tbody> <?php foreach ($agents as $agent) : ?> <tr> <td> <?php echo $agent->getDenomination(); ?> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], [], true); ?>"> <span class="icon icon-voir" title="Afficher les informations de l'agent"></span> <ul class="nav"> <!-- <li class="nav-item">--> <!-- <a class="nav-link" href="#ficheposte" aria-controls="ficheposte" role="tab" data-toggle="tabz">--> <!-- Fiches de poste--> <!-- </a>--> <!-- </li>--> <li class="nav-item" > <a class="nav-link" href="#entretien" aria-controls="entretien" role="tab" data-toggle="tabz"> Entretiens professionnel </a> <?php endif; ?> <br/> <?php $affectation = $agent->getAffectationPrincipale(); ?> <?php if ($affectation) : ?> <?php $niveau2 = $affectation->getStructure()->getNiv2(); ?> <?php if ($niveau2 !== null) : ?> [<?php echo $niveau2->getLibelleCourt(); ?>] <?php endif; ?> <?php echo $affectation->getStructure()->getLibelleLong(); ?> <?php else : ?> Aucune affectation principale <?php endif; ?> </td> <td> <?php $fichePoste = $agent->getFichePosteBest(); ?> <?php $canVoirFichePoste = $this->isAllowed($fichePoste, FichePostePrivileges::FICHEPOSTE_AFFICHER); ?> <?php if ($fichePoste) : ?> <?php echo $this->etatbadge($fichePoste->getEtat()); ?> <?php echo $fichePoste->getLibelleMetierPrincipal(); ?> <?php if ($fichePoste->getLibelle()) : ?> <br/> <?php echo $fichePoste->getLibelle; ?> <?php endif; ?> <?php else : ?> Aucune fiche de poste <?php endif; ?> <br/> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], ['fragment' => 'fiches'], true); ?>"> <span class="icon gerer" title="Accéder à la gestion des fiches postes"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> <?php if ($fichePoste AND $canVoirFichePoste) : ?> <a href="<?php echo $this->url('fiche-poste/afficher', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-voir" title="Afficher la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <a href="<?php echo $this->url('fiche-poste/exporter', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-pdf" title="Exporter la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> </td> <td> <?php if ($campagnePrevious === null) : ?> Aucune campagne précédente <?php else : ?> Précédent (<?php echo $campagnePrevious->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagnePrevious); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-voir"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php endif; ?> <?php endif; ?> <br/> <?php if ($campagnesCurrents !== null or $campagnesCurrents !== []) : ?> <?php /** @var Campagne $campagneCurrent */ ?> <?php foreach ($campagnesCurrents as $campagneCurrent) : ?> Courant (<?php echo $campagneCurrent->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagneCurrent); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/modifier', ['entretien' => $entretien->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon gerer"></span></a> <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::accederAction() */ ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien-professionnel' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-editer"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::creerAction() */?> <a href="<?php echo $this->url('entretien-professionnel/creer', ["campagne" => $campagneCurrent->getId()], ["query" => ["agent" => $agent->getId(), 'structure' => ($affectation AND $affectation->getStructure())?$affectation->getStructure()->getId():null]], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon icon-ajouter"></span></a> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <br/> </td> </tr> <?php endforeach; ?> </tbody> </table> </li> <li class="nav-item" > <a class="nav-link" href="#formation" aria-controls="formation" role="tab" data-toggle="tabz"> Formations </a> </li> </ul> <div class="tab-content"> <div id="ficheposte" class="tab-pane " role="tabpanel"> <?php echo $this->partial('partial/ficheposte', ['agents' => $agents, 'fiches' => $fiches], [], true); ?> </div> <div id="entretien" class="tab-pane " role="tabpanel"> <?php echo $this->partial('partial/entretien', ['agents' => $agents, 'campagnePrevious' => $campagnePrevious, 'campagnesCurrents' => $campagnesCurrents], [], true); ?> </div> <div id="formation" class="tab-pane " role="tabpanel"> <?php echo $this->partial('partial/formation', ['agents' => $agents, 'demandesInternes' => $demandesInternes, 'demandesExternes' => $demandesExternes], [], true); ?> </div> </div> <script> $(function() { let hash = $(location).attr('hash'); let name = hash.substr(1); if (name === undefined || name === "") name = "entretien"; $('a[aria-controls=' + name + ']').tab('show'); $('.nav-item a').click(function (e) { // No e.preventDefault() here $(this).tab('show'); }); }); $(function() { $("body").on("modification", function (event) { event.div.modal('hide'); Loading
module/Application/view/application/index/partial/entretien.phtml +133 Changes for module/Application/view/application/index/partial/entretien.phtml: 133 added lines, 0 removed lines. Original line number Diff line number Diff line <?php use Application\Entity\Db\Agent; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Privilege\FichePostePrivileges; use EntretienProfessionnel\Entity\Db\Campagne; /** * @var Agent[] $agents * @var Campagne $campagnePrevious * @var Campagne $campagnesCurrents */ $canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER)); ?> <table class="table table-condensed table-hover"> <thead> <tr> <th> Agent & Affectation </th> <th> Fiche de poste </th> <th> Entretien professionnel </th> </tr> </thead> <tbody> <?php foreach ($agents as $agent) : ?> <tr> <td> <?php echo $agent->getDenomination(); ?> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], [], true); ?>"> <span class="icon icon-voir" title="Afficher les informations de l'agent"></span> </a> <?php endif; ?> <br/> <?php $affectation = $agent->getAffectationPrincipale(); ?> <?php if ($affectation) : ?> <?php $niveau2 = $affectation->getStructure()->getNiv2(); ?> <?php if ($niveau2 !== null) : ?> [<?php echo $niveau2->getLibelleCourt(); ?>] <?php endif; ?> <?php echo $affectation->getStructure()->getLibelleLong(); ?> <?php else : ?> Aucune affectation principale <?php endif; ?> </td> <td> <?php $fichePoste = $agent->getFichePosteBest(); ?> <?php $canVoirFichePoste = $this->isAllowed($fichePoste, FichePostePrivileges::FICHEPOSTE_AFFICHER); ?> <?php if ($fichePoste) : ?> <?php echo $this->etatbadge($fichePoste->getEtat()); ?> <?php echo $fichePoste->getLibelleMetierPrincipal(); ?> <?php if ($fichePoste->getLibelle()) : ?> <br/> <?php echo $fichePoste->getLibelle; ?> <?php endif; ?> <?php else : ?> Aucune fiche de poste <?php endif; ?> <br/> <?php if ($canVoirAgent) : ?> <a href="<?php echo $this->url('agent/afficher', ['agent' => $agent->getId()], ['fragment' => 'fiches'], true); ?>"> <span class="icon gerer" title="Accéder à la gestion des fiches postes"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> <?php if ($fichePoste AND $canVoirFichePoste) : ?> <a href="<?php echo $this->url('fiche-poste/afficher', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-voir" title="Afficher la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <a href="<?php echo $this->url('fiche-poste/exporter', ['fiche-poste' => $fichePoste->getId()],[], true); ?>"> <span class="icon icon-pdf" title="Exporter la fiche de poste"></span> <span class="small-lettrine">FP</span></a> <?php endif; ?> </td> <td> <?php if ($campagnePrevious === null) : ?> Aucune campagne précédente <?php else : ?> Précédent (<?php echo $campagnePrevious->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagnePrevious); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-voir"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php endif; ?> <?php endif; ?> <br/> <?php if ($campagnesCurrents !== null or $campagnesCurrents !== []) : ?> <?php /** @var Campagne $campagneCurrent */ ?> <?php foreach ($campagnesCurrents as $campagneCurrent) : ?> Courant (<?php echo $campagneCurrent->getAnnee(); ?>): <?php $entretien = $agent->getEntretienProfessionnelByCampagne($campagneCurrent); ?> <?php if ($entretien !== null) : ?> Entretien du <?php echo $entretien->getDateEntretien()->format('d/m/Y'); ?> <a href="<?php echo $this->url('entretien-professionnel/modifier', ['entretien' => $entretien->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon gerer"></span></a> <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::accederAction() */ ?> <a href="<?php echo $this->url('entretien-professionnel/acceder', ['entretien-professionnel' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-editer"></span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-crep', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREP</span></a> <a href="<?php echo $this->url('entretien-professionnel/exporter-cref', ['entretien' => $entretien->getId()], [], true); ?>" target="_blank"> <span class="icon icon-pdf"></span><span class="small-lettrine">CREF</span></a> <?php else : ?> Aucun entretien <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::creerAction() */?> <a href="<?php echo $this->url('entretien-professionnel/creer', ["campagne" => $campagneCurrent->getId()], ["query" => ["agent" => $agent->getId(), 'structure' => ($affectation AND $affectation->getStructure())?$affectation->getStructure()->getId():null]], true); ?>" class="ajax-modal" data-event="modification"> <span class="icon icon-ajouter"></span></a> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <br/> </td> </tr> <?php endforeach; ?> </tbody> </table> No newline at end of file