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

Debut des changement sur les correspondances

parent 11779e71
Loading
Loading
Loading
Loading
+0 −29
Changes for config/autoload/unicaen-renderer.global.php: 0 added lines, 29 removed lines.
Original line number Diff line number Diff line
<?php

use UnicaenPrivilege\Guard\PrivilegeController;
use UnicaenRenderer\Controller\MacroController;
use UnicaenRenderer\Controller\RenduController;
use UnicaenRenderer\Controller\TemplateController;

return [
@@ -12,25 +10,6 @@ return [
                'pages' => [
                    'administration' => [
                        'pages' => [
                            'renderer-header' => [
                                'label' => 'Gestion des contenus',
                                'route' => 'contenu',
                                'resources' => [
                                    PrivilegeController::getResourceId(MacroController::class, 'index'),
                                    PrivilegeController::getResourceId(TemplateController::class, 'index'),
                                    PrivilegeController::getResourceId(RenduController::class, 'index'),
                                ],
                                'order'    => 10000,
                                'dropdown-header' => true,
                            ],
                            'pages' => [
                                'macro' => [
                                    'label' => 'Macros',
                                    'route' => 'contenu/macro',
                                    'resource' => PrivilegeController::getResourceId(MacroController::class, 'index'),
                                    'order'    => 10100,
                                    'icon' => 'fas fa-angle-right',
                                ],
                            'template' => [
                                'label' => 'Templates',
                                'route' => 'contenu/template',
@@ -38,14 +17,6 @@ return [
                                'order'    => 10200,
                                'icon' => 'fas fa-angle-right',
                            ],
                                'rendu' => [
                                    'label' => 'Contenus',
                                    'route' => 'contenu/rendu',
                                    'resource' => PrivilegeController::getResourceId(RenduController::class, 'index'),
                                    'order'    => 10300,
                                    'icon' => 'fas fa-angle-right',
                                ],
                            ],
                        ],
                    ],
                ],
+5 −0
Changes for documentation/release/3.1.4.md: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@
**Modifications de la base de donnée**

```sql
-- les templates sont équipés d'un namespace pour faciliter l'exploitation
alter table unicaen_renderer_template add namespace varchar(1024);

-- ajout des ''raison d être'' aux fiches metier 
alter table fichemetier add raison text;

@@ -32,4 +35,6 @@ create table formation_action_plan
**Évolution des bibliothèques**

```bash
composer require unicaen/utilisateur 5.0.5
composer require unicaen/renderer 5.0.5
```
 No newline at end of file
+1 −0
Changes for module/Application/src/Application/Service/AgentQuotite/AgentQuotiteService.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ class AgentQuotiteService {
    {
        $qb = $this->createQueryBuilder()
            ->andWhere('agentquotite.agent = :agent')
            ->andWhere('agentquotite.delete_on IS NULL')
            ->setParameter('agent', $agent)
        ;

+13 −0
Changes for module/Carriere/src/Carriere/Controller/CorrespondanceController.php: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@

namespace Carriere\Controller;

use Application\Entity\Db\AgentGrade;
use Application\Service\AgentGrade\AgentGradeServiceAwareTrait;
use Carriere\Provider\Parametre\CarriereParametres;
use Carriere\Service\Correspondance\CorrespondanceServiceAwareTrait;
use UnicaenParametre\Service\Parametre\ParametreServiceAwareTrait;
@@ -10,6 +12,7 @@ use Laminas\View\Model\ViewModel;

class CorrespondanceController extends AbstractActionController
{
    use AgentGradeServiceAwareTrait;
    use CorrespondanceServiceAwareTrait;
    use ParametreServiceAwareTrait;

@@ -26,11 +29,21 @@ class CorrespondanceController extends AbstractActionController

    public function afficherAgentsAction() : ViewModel
    {
        $actifOnly = true; //todo recup param

        $correspondance = $this->getCorrespondanceService()->getRequestedCorrespondance($this);
        /** @var AgentGrade[] $agentGrades */
        $agentGrades = $this->getAgentGradeService()->getAgentGradesByCorrespondance($correspondance, $actifOnly);
        $agents = [];
        foreach ($agentGrades as $agentGrade) {
            $agents[$agentGrade->getAgent()->getId()] = $agentGrade->getAgent();
        }

        return new ViewModel([
            'title' => 'Agents ayant la correspondance ['. $correspondance->getLibelleCourt().']',
            'correspondance' => $correspondance,
            'agents' => $agents,
            'agentGrades' => $agentGrades,
        ]);
    }
}
 No newline at end of file
+4 −0
Changes for module/Carriere/src/Carriere/Controller/CorrespondanceControllerFactory.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Carriere\Controller;

use Application\Service\AgentGrade\AgentGradeService;
use Carriere\Service\Correspondance\CorrespondanceService;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerExceptionInterface;
@@ -19,13 +20,16 @@ class CorrespondanceControllerFactory {
    public function __invoke(ContainerInterface $container) : CorrespondanceController
    {
        /**
         * @var AgentGradeService $agentGradeService
         * @var CorrespondanceService $correspondanceService
         * @var ParametreService $parametreService
         */
        $agentGradeService = $container->get(AgentGradeService::class);
        $correspondanceService = $container->get(CorrespondanceService::class);
        $parametreService = $container->get(ParametreService::class);

        $controller = new CorrespondanceController();
        $controller->setAgentGradeService($agentGradeService);
        $controller->setCorrespondanceService($correspondanceService);
        $controller->setParametreService($parametreService);
        return $controller;
Loading