Commit 5dc64297 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

[FIX] correction de la route de retour lors de l'abonnement/désabonnement à une formation

parent 43f86200
Loading
Loading
Loading
Loading
+53 −0
Changes for documentation/600_DB_EMC2_FORMATION.sql: 53 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -708,3 +708,56 @@ WITH d(code, lib, ordre) AS (
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
JOIN unicaen_privilege_categorie cp ON cp.CODE = 'formationinstancefrais';

INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('formationagent', 'Gestion des agents', 1000, 'Formation\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
    SELECT 'formationagent_mesagents', 'Affichage du menu - Mes agents -', 30 UNION
    SELECT 'formationagent_afficher', 'Afficher un agent', 20 UNION
    SELECT 'formationagent_index', 'Accéder à l''index des agents', 10
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
         JOIN unicaen_privilege_categorie cp ON cp.CODE = 'formationagent';

INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('formationstructure', 'Gestion des structures', 1100, 'Formation\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
    SELECT 'formationstructure_messtructures', 'Affichage du menu - Mes structures -', 30 UNION
    SELECT 'formationstructure_afficher', 'Afficher une structure', 20 UNION
    SELECT 'formationstructure_index', 'Accéder à l''index des structures', 10
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
         JOIN unicaen_privilege_categorie cp ON cp.CODE = 'formationstructure';


INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('formationstructure', 'Gestion des structures', 1100, 'Formation\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
    SELECT 'formationstructure_messtructures', 'Affichage du menu - Mes structures -', 30 UNION
    SELECT 'formationstructure_afficher', 'Afficher une structure', 20 UNION
    SELECT 'formationstructure_index', 'Accéder à l''index des structures', 10
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
         JOIN unicaen_privilege_categorie cp ON cp.CODE = 'formationstructure';

INSERT INTO unicaen_privilege_categorie (code, libelle, ordre, namespace)
VALUES ('planformation', 'Gestion du plan de formation', 1100, 'Formation\Provider\Privilege');
INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE)
WITH d(code, lib, ordre) AS (
    SELECT 'planformation_courant', 'Accéder au plan de formation courant', 10 UNION
    SELECT 'planformation_index', 'Accéder à l''index', 20 UNION
    SELECT 'planformation_afficher', 'Afficher un plan de formation', 30 UNION
    SELECT 'planformation_ajouter', 'Ajouter un plan de formation', 40 UNION
    SELECT 'planformation_modifier', 'Modifier un plan de formation', 50 UNION
    SELECT 'planformation_supprimer', 'Supprimer un plan de formation', 60

)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
         JOIN unicaen_privilege_categorie cp ON cp.CODE = 'planformation';
 No newline at end of file
+1 −0
Changes for documentation/release/3.1.5.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

* Ajout des temoins hiérarchique et fonctionnelle pour les affectations
* Ajout du pourcentage de l'affectation pour les affectations
* [FIX] correction de la route de retour lors de l'abonnement/désabonnement à une formation

**Modifications de la base de donnée**

+2 −2
Changes for module/Formation/src/Formation/Controller/AbonnementController.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ class AbonnementController extends AbstractActionController {

        $retour = $this->params()->fromQuery('retour');
        if ($retour !== null) return $this->redirect()->toUrl($retour);
        return $this->redirect()->toRoute('plan-formation');
        return $this->redirect()->toRoute('plan-de-formation/courant');
    }

    public function retirerAction() : Response
@@ -79,7 +79,7 @@ class AbonnementController extends AbstractActionController {

        $retour = $this->params()->fromQuery('retour');
        if ($retour !== null) return $this->redirect()->toUrl($retour);
        return $this->redirect()->toRoute('plan-formation');
        return $this->redirect()->toRoute('plan-de-formation/courant');
    }

    public function listerAbonnementsParAgentAction() : ViewModel