Commit 25112c74 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Mise en place d'un affichage d'un résumé de la structure

parent d039109c
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ return [
                    'controller' => MissionSpecifiqueController::class,
                    'action' => [
                        'affectation',
                        'afficher',
                    ],
                    'privileges' => [
                        AgentPrivileges::AFFICHER,
@@ -69,6 +70,17 @@ return [
                        ],
                        'may_terminate' => true,
                    ],
                    'afficher' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/afficher/:affectation',
                            'defaults' => [
                                'controller' => MissionSpecifiqueController::class,
                                'action'     => 'afficher',
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                    'editer' => [
                        'type'  => Segment::class,
                        'options' => [
+13 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ return [
                    'controller' => StructureController::class,
                    'action' => [
                        'index',
                        'afficher',
                    ],
                    'privileges' => [
                        StructurePrivileges::AFFICHER,
@@ -81,6 +82,18 @@ return [
                ],
                'may_terminate' => true,
                'child_routes' => [
                    'afficher' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/afficher/:structure',
                            'defaults' => [
                                'controller' => StructureController::class,
                                'action'     => 'afficher',
                            ],
                        ],
                        'may_terminate' => true,
                        'child_routes' => [],
                    ],
                    'ajouter-gestionnaire' => [
                        'type'  => Segment::class,
                        'options' => [
+11 −0
Original line number Diff line number Diff line
@@ -74,6 +74,17 @@ class MissionSpecifiqueController extends AbstractActionController
        return $vm;
    }

    public function afficherAction() {
        $affectation = $this->getMissionSpecifiqueService()->getRequestedAffectation($this);

        $vm = new ViewModel();
        $vm->setVariables([
            'title' => 'Affichage de l\'affection',
            'affectation' => $affectation,
        ]);
        return $vm;
    }

    public function editerAction() {
        $affectation = $this->getMissionSpecifiqueService()->getRequestedAffectation($this);
        $form = $this->getAgentMissionSpecifiqueForm();
+8 −0
Original line number Diff line number Diff line
@@ -33,6 +33,14 @@ class StructureController extends AbstractActionController {
        ]);
    }

    public function afficherAction()
    {
        $structure = $this->getStructureService()->getRequestedStructure($this, 'structure');

        return new ViewModel([
            'structure' => $structure,
        ]);
    }

    public function ajouterGestionnaireAction()
    {
+2 −2
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@
            <join-column name="specificite" referenced-column-name="id" />
        </one-to-one>

        <many-to-one field="poste" target-entity="Application\Entity\Db\Poste">
        <one-to-one field="poste" target-entity="Application\Entity\Db\Poste" >
            <join-column name="poste" referenced-column-name="id" />
        </many-to-one>
        </one-to-one>

        <one-to-many target-entity="Application\Entity\Db\FicheTypeExterne" mapped-by="fichePoste" field="fichesMetiers"/>

Loading