Loading documentation/vue_SIRH/V_EMC2_AGENT.sql 0 → 100644 +0 −0 Empty file added. module/Application/src/Application/Controller/AgentController.php +0 −1 Changes for module/Application/src/Application/Controller/AgentController.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -132,7 +132,6 @@ class AgentController extends AbstractActionController //Récupération des status $agentStatuts = $this->getAgentStatutService()->getAgentStatutsByAgent($agent); $agentAffectations = $this->getAgentAffectationService()->getAgentsAffectationsByAgentAndDate($agent, new DateTime()); foreach ($agentAffectations as $af) var_dump($af->getDateFin()); $agentGrades = $this->getAgentGradeService()->getAgentGradesByAgent($agent); //Récupération des supérieures et autorités Loading module/Application/src/Application/Service/AgentAffectation/AgentAffectationService.php +0 −1 Changes for module/Application/src/Application/Service/AgentAffectation/AgentAffectationService.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ class AgentAffectationService { // ->setParameter('date', $date) // ; var_dump($date); $result = $qb->getQuery()->getResult(); $result = array_filter($result, function (AgentAffectation $a) use ($date) { // var_dump($a->getDateDebut()->format('H/m/Y')); Loading module/Structure/src/Structure/Controller/StructureController.php +9 −1 Changes for module/Structure/src/Structure/Controller/StructureController.php: 9 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -111,11 +111,18 @@ class StructureController extends AbstractActionController { $campagnes[] = $last; usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut();}); $allAgents = []; $entretiensArray = []; $agentsArray = []; foreach ($campagnes as $campagne) { $agentsArray[$campagne->getId()] = $this->getCampagneService()->computeAgentByStructures($structures, $campagne); $agentsCampagne = $this->getCampagneService()->computeAgentByStructures($structures, $campagne); $agentsArray[$campagne->getId()] = $agentsCampagne; foreach ($agentsCampagne as $agent) { $allAgents[$agent->getId()] = $agent;} $entretiensArray[$campagne->getId()] = $this->getEntretienProfessionnelService()->getEntretienProfessionnelByCampagneAndAgents($campagne, $agentsArray[$campagne->getId()]); } $allAgentsAffectations = []; foreach ($allAgents as $id => $agent) { $allAgentsAffectations[$id] = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, false, true); } return new ViewModel([ 'selecteur' => $selecteur, Loading @@ -133,6 +140,7 @@ class StructureController extends AbstractActionController { 'agents' => $agents, 'agentsForces' => $agentsForces, 'agentsAll' => $allAgents, 'allAgentsAffectations' => $allAgentsAffectations, 'superieurs' => $superieurs, 'autorites' => $autorites, Loading module/Structure/src/Structure/Service/Structure/StructureService.php +2 −2 Changes for module/Structure/src/Structure/Service/Structure/StructureService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Doctrine\DBAL\Exception as DBA_Exception; use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\ORMException; use Doctrine\ORM\QueryBuilder; use Laminas\Permissions\Acl\Role\RoleInterface; use Structure\Entity\Db\Structure; use Structure\Entity\Db\StructureAgentForce; use Structure\Entity\Db\StructureGestionnaire; Loading @@ -18,7 +19,6 @@ use Structure\Entity\Db\StructureResponsable; use Structure\Provider\Role\RoleProvider; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Service\EntityManagerAwareTrait; use UnicaenUtilisateur\Entity\Db\Role; use UnicaenUtilisateur\Entity\Db\User; use UnicaenUtilisateur\Service\User\UserServiceAwareTrait; use Laminas\Mvc\Controller\AbstractActionController; Loading Loading @@ -447,7 +447,7 @@ EOS; /** * @return Structure[] */ public function getStructuresByCurrentRole(User $user, Role $role) : array public function getStructuresByCurrentRole(User $user, RoleInterface $role) : array { $selecteur = []; if ($role->getRoleId() === RoleProvider::GESTIONNAIRE) { Loading Loading
module/Application/src/Application/Controller/AgentController.php +0 −1 Changes for module/Application/src/Application/Controller/AgentController.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -132,7 +132,6 @@ class AgentController extends AbstractActionController //Récupération des status $agentStatuts = $this->getAgentStatutService()->getAgentStatutsByAgent($agent); $agentAffectations = $this->getAgentAffectationService()->getAgentsAffectationsByAgentAndDate($agent, new DateTime()); foreach ($agentAffectations as $af) var_dump($af->getDateFin()); $agentGrades = $this->getAgentGradeService()->getAgentGradesByAgent($agent); //Récupération des supérieures et autorités Loading
module/Application/src/Application/Service/AgentAffectation/AgentAffectationService.php +0 −1 Changes for module/Application/src/Application/Service/AgentAffectation/AgentAffectationService.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ class AgentAffectationService { // ->setParameter('date', $date) // ; var_dump($date); $result = $qb->getQuery()->getResult(); $result = array_filter($result, function (AgentAffectation $a) use ($date) { // var_dump($a->getDateDebut()->format('H/m/Y')); Loading
module/Structure/src/Structure/Controller/StructureController.php +9 −1 Changes for module/Structure/src/Structure/Controller/StructureController.php: 9 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -111,11 +111,18 @@ class StructureController extends AbstractActionController { $campagnes[] = $last; usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut();}); $allAgents = []; $entretiensArray = []; $agentsArray = []; foreach ($campagnes as $campagne) { $agentsArray[$campagne->getId()] = $this->getCampagneService()->computeAgentByStructures($structures, $campagne); $agentsCampagne = $this->getCampagneService()->computeAgentByStructures($structures, $campagne); $agentsArray[$campagne->getId()] = $agentsCampagne; foreach ($agentsCampagne as $agent) { $allAgents[$agent->getId()] = $agent;} $entretiensArray[$campagne->getId()] = $this->getEntretienProfessionnelService()->getEntretienProfessionnelByCampagneAndAgents($campagne, $agentsArray[$campagne->getId()]); } $allAgentsAffectations = []; foreach ($allAgents as $id => $agent) { $allAgentsAffectations[$id] = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, false, true); } return new ViewModel([ 'selecteur' => $selecteur, Loading @@ -133,6 +140,7 @@ class StructureController extends AbstractActionController { 'agents' => $agents, 'agentsForces' => $agentsForces, 'agentsAll' => $allAgents, 'allAgentsAffectations' => $allAgentsAffectations, 'superieurs' => $superieurs, 'autorites' => $autorites, Loading
module/Structure/src/Structure/Service/Structure/StructureService.php +2 −2 Changes for module/Structure/src/Structure/Service/Structure/StructureService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Doctrine\DBAL\Exception as DBA_Exception; use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\ORMException; use Doctrine\ORM\QueryBuilder; use Laminas\Permissions\Acl\Role\RoleInterface; use Structure\Entity\Db\Structure; use Structure\Entity\Db\StructureAgentForce; use Structure\Entity\Db\StructureGestionnaire; Loading @@ -18,7 +19,6 @@ use Structure\Entity\Db\StructureResponsable; use Structure\Provider\Role\RoleProvider; use UnicaenApp\Exception\RuntimeException; use UnicaenApp\Service\EntityManagerAwareTrait; use UnicaenUtilisateur\Entity\Db\Role; use UnicaenUtilisateur\Entity\Db\User; use UnicaenUtilisateur\Service\User\UserServiceAwareTrait; use Laminas\Mvc\Controller\AbstractActionController; Loading Loading @@ -447,7 +447,7 @@ EOS; /** * @return Structure[] */ public function getStructuresByCurrentRole(User $user, Role $role) : array public function getStructuresByCurrentRole(User $user, RoleInterface $role) : array { $selecteur = []; if ($role->getRoleId() === RoleProvider::GESTIONNAIRE) { Loading