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

Premier jet du circuit de validation de la fiche de poste

parent 7c8712ba
Loading
Loading
Loading
Loading
+7
Changes for documentation/002-BD_EMC2.sql: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1238,6 +1238,13 @@ create table ficheposte_formation_retiree
);
create unique index ficheposte_formation_conservee_id_uindex on ficheposte_formation_retiree (id);

create table ficheposte_validation
(
    ficheposte_id integer not null constraint ficheposte_validations_ficheposte_id_fk references ficheposte on delete cascade,
    validation_id integer not null constraint ficheposte_validations_unicaen_validation_instance_id_fk references unicaen_validation_instance on delete cascade,
    constraint ficheposte_validations_pk primary key (ficheposte_id, validation_id)
);

-- FICHE PROFIL ---------------

create table ficheprofil
+4 −1
Changes for documentation/101-INSERT-EMC2_PRIVILEGE.sql: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -361,7 +361,10 @@ WITH d(code, lib, ordre) AS (
    SELECT 'ficheposte_modifier', 'Modifier une fiche de poste', 30 UNION
    SELECT 'ficheposte_associeragent', 'Associer un agent à une fiche de poste', 31 UNION
    SELECT 'ficheposte_historiser', 'Historiser/Restaurer une fiche de poste', 40 UNION
    SELECT 'ficheposte_detruire', 'Détruire une fiche de poste ', 50
    SELECT 'ficheposte_detruire', 'Détruire une fiche de poste ', 50 UNION
    SELECT 'ficheposte_etat', 'Modifier l''état', 200 UNION
    SELECT 'ficheposte_valider_responsable', 'Valider en tant que responsable', 250 UNION
    SELECT 'ficheposte_valider_agent', 'Valider en tant qu''agent', 260
)
SELECT cp.id, d.code, d.lib, d.ordre
FROM d
+8 −1
Changes for documentation/202-INSERT-DATA_FICHES.sql: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@ INSERT INTO unicaen_etat_etat(type_id, code, libelle, ordre, icone, couleur, his
WITH d(code, libelle, ordre, icone, couleur, histo_creation, histo_createur_id) AS (
    SELECT 'FICHE_POSTE_REDACTION', 'Fiche de poste en cours de rédaction', 1, 'fas fa-pencil-ruler', '#ff9500', current_date, 0 UNION
    SELECT 'FICHE_POSTE_OK', 'Fiche de poste validée', 2, 'fas fa-check', '#00a004', current_date, 0 UNION
    SELECT 'FICHE_POSTE_MASQUEE', 'Fiche de poste masquée', 3, 'fas fa-mask', '#cb0000', current_date, 0
    SELECT 'FICHE_POSTE_MASQUEE', 'Fiche de poste masquée', 4, 'fas fa-mask', '#cb0000', current_date, 0 UNION
    SELECT 'FICHE_POSTE_SIGNEE', 'Fiche de poste signée', 3, 'fas fa-signature', '#000099', current_date, 0
)
SELECT cp.id, d.code, d.libelle, d.ordre, d.icone, d.couleur, d.histo_creation, d.histo_createur_id
FROM d
@@ -40,3 +41,9 @@ VALUES ('FICHE_METIER', '<p>Fiche métier</p>',
        'pdf',
        'fiche_metier.pdf',
        'Contenu de FICHE METIER');
INSERT INTO unicaen_renderer_template (id, code, description, document_type, document_sujet, document_corps, document_css) VALUES (60, 'MAIL_VALIDATION_RESPONSABLE', '<p>Mail envoyé à l''agent·e après la validation d''une fiche de poste par le·la responsable de l''agent·e</p>', 'mail', 'Votre fiche de poste de poste vient d''être validée par votre responsable', '<p>Université de Caen Normandie<br />Direction des Ressources Humaines<br /><br />Bonjour,<br /><br />Votre fiche de poste vient d''être validée par votre responsable.</p>
<p>Vous pouvez maintenant vous rendre dans EMC2 pour valider à votre tour celle-ci.<br />Vous retrouverez celle-ci à l''adresse suivante : VAR[URL#FichePosteAcceder]</p>
<p><br />Cordialement,<br />Le bureau de gestion des personnels BIATSS<br />Le bureau Conseil Carrière Compétences<br />VAR[EMC2#Nom]</p>', null);
INSERT INTO unicaen_renderer_template (id, code, description, document_type, document_sujet, document_corps, document_css) VALUES (61, 'MAIL_VALIDATION_AGENT', null, 'mail', 'Validation de VAR[AGENT#Denomination] de sa fiche de poste', '<p>Bonjour,</p>
<p>VAR[AGENT#Denomination] vient de valider sa fiche de poste.</p>
<p>Cordialement,<br />Le bureau de gestion des personnels BIATSS<br />Le bureau Conseil Carrière Compétences<br />VAR[EMC2#Nom]</p>', null);
+45 −3
Changes for module/Application/config/merged/fiche-poste.config.php: 45 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ use Application\Service\FichePoste\FichePosteServiceFactory;
use Application\Service\SpecificitePoste\SpecificitePosteService;
use Application\Service\SpecificitePoste\SpecificitePosteServiceFactory;
use Application\View\Helper\FichePosteGraphViewHelper;
use Application\View\Helper\FichesPostesAsArrayViewHelper;
use Application\View\Helper\FichesPostesAsArrayViewHelperFactory;
use UnicaenPrivilege\Guard\PrivilegeController;
use UnicaenPrivilege\Provider\Rule\PrivilegeRuleProvider;
@@ -68,6 +67,9 @@ return [
                            FichePostePrivileges::FICHEPOSTE_MODIFIER,
                            FichePostePrivileges::FICHEPOSTE_HISTORISER,
                            FichePostePrivileges::FICHEPOSTE_DETRUIRE,
                            FichePostePrivileges::FICHEPOSTE_ETAT,
                            FichePostePrivileges::FICHEPOSTE_VALIDER_RESPONSABLE,
                            FichePostePrivileges::FICHEPOSTE_VALIDER_AGENT,
                        ],
                        'resources' => ['FichePoste'],
                        'assertion' => FichePosteAssertion::class
@@ -136,12 +138,30 @@ return [
                        'historiser-expertise',
                        'restaurer-expertise',
                        'supprimer-expertise',

                        'changer-etat',
                    ],
                    'privileges' => FichePostePrivileges::FICHEPOSTE_MODIFIER,
                    'assertion'  => FichePosteAssertion::class,
                ],
                [
                    'controller' => FichePosteController::class,
                    'action' => [
                        'changer-etat',
                    ],
                    'privileges' => FichePostePrivileges::FICHEPOSTE_ETAT,
                    'assertion'  => FichePosteAssertion::class,
                ],
                [
                    'controller' => FichePosteController::class,
                    'action' => [
                        'valider',
                        'revoquer',
                    ],
                    'privileges' => [
                        FichePostePrivileges::FICHEPOSTE_VALIDER_AGENT,
                        FichePostePrivileges::FICHEPOSTE_VALIDER_RESPONSABLE,
                    ],
                    'assertion'  => FichePosteAssertion::class,
                ],
                [
                    'controller' => FichePosteController::class,
                    'action' => [
@@ -240,6 +260,28 @@ return [
                            ],
                        ],
                    ],
                    'valider' => [
                        'type'  => Segment::class,
                        'may_terminate' => true,
                        'options' => [
                            'route'    => '/valider/:fiche-poste/:type',
                            'defaults' => [
                                'controller' => FichePosteController::class,
                                'action'     => 'valider',
                            ],
                        ],
                    ],
                    'revoquer' => [
                        'type'  => Segment::class,
                        'may_terminate' => true,
                        'options' => [
                            'route'    => '/revoquer/:fiche-poste/:validation',
                            'defaults' => [
                                'controller' => FichePosteController::class,
                                'action'     => 'revoquer',
                            ],
                        ],
                    ],
                    'export' => [
                        'type'  => Segment::class,
                        'may_terminate' => true,
+3
Changes for module/Application/config/module.config.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ use Application\Provider\Privilege\SynchroPrivileges;
use Application\Provider\Privilege\ValidationPrivileges;
use Application\Service\Evenement\SynchroOctopusService;
use Application\Service\Evenement\SynchroOctopusServiceFactory;
use Application\Service\Notification\NotificationService;
use Application\Service\Notification\NotificationServiceFactory;
use Application\Service\Url\UrlService;
use Application\Service\Url\UrlServiceFactory;
use Application\View\Helper\ActionIconViewHelper;
@@ -253,6 +255,7 @@ return [
        ],
        'factories' => [
//            RoleService::class => RoleServiceFactory::class,
            NotificationService::class => NotificationServiceFactory::class,
            UrlService::class => UrlServiceFactory::class,

            SynchroOctopusService::class => SynchroOctopusServiceFactory::class,
Loading