Commit 614027a5 authored by lecluse's avatar lecluse
Browse files

Mégacommit 1 - refonte de l'ODF (en cours, ce n'est pas fini) + plein de petites choses et bugs

parent 938d1fd0
This diff is collapsed.
......@@ -7,6 +7,8 @@ SELECT
th.id th_id, th.libelle_court type_heures,
ep.source_code,
mep.heures,
to_char(mep.histo_creation, 'DD/MM/YYYY HH:MI:SS'),
mep.histo_createur_id,
mep.histo_modification,
mep.histo_destructeur_id
FROM
......@@ -24,7 +26,7 @@ WHERE
--1 = ose_divers.comprise_entre( mep.histo_creation, mep.histo_destruction )
--AND i.source_code = '21472'
--AND mep.histo_modificateur_id=2504
i.source_code = '99322'
i.source_code = '76643'
-- AND s.id = 372
-- AND to_char(mep.histo_modification,'YYYY-MM-DD') = to_char(SYSDATE,'YYYY-MM-DD')
;
......@@ -34,6 +36,7 @@ WHERE
--update mise_en_paiement set heures = 1.38 WHERE id = 446;
--update mise_en_paiement set histo_destruction = sysdate, histo_destructeur_id = 4 where id = 20499;
--update mise_en_paiement set periode_paiement_id = 8, date_mise_en_paiement = to_date( '31/05/2015', 'DD/MM/YYYY') WHERE
--id in (2397,2402,2409,2429,2430)
......
......@@ -9,32 +9,48 @@
*******************************************************************************************************/
select pj.id pj_id, d.id dossier_id, d.intervenant_id, d.nom_usuel,
tpj.id tpj_id, tpj.code, tpj.libelle, pj.obligatoire, pj.force, pj.histo_modification, pj.histo_destruction
from piece_jointe pj
join type_piece_jointe tpj on tpj.id = pj.type_piece_jointe_id
join dossier d on d.id = pj.dossier_id
join intervenant i on i.id = d.intervenant_id
where i.source_code = '38272'
--and pj.histo_destruction is null
order by pj.histo_modification, pj.histo_destruction;
/*******************************************************************************************************
Ajout d'une PJ à fournir par un intervenant.
NB: le fichier pourra ensuite être déposé via l'appli.
*******************************************************************************************************/
Insert into PIECE_JOINTE (ID,TYPE_PIECE_JOINTE_ID,DOSSIER_ID,HISTO_CREATEUR_ID,HISTO_MODIFICATEUR_ID,VALIDATION_ID,FORCE,OBLIGATOIRE)
values (
PIECE_JOINTE_id_seq.nextval,
(select id from type_piece_jointe where code = 'RIB'),
(select id from dossier where INTERVENANT_ID = (select id from intervenant where source_code = '96492' and annee_id = 2014)),
1,
1,
null,
0,
1
);
\ No newline at end of file
select
i.id i_id,
d.id d_id,
pj.id pj_id,
pj.histo_destruction pj_del,
i.prenom || ' ' || i.nom_usuel i_nom,
i.annee_id annee,
tpj.code, tpj.libelle, pj.obligatoire, pj.force
from
piece_jointe pj
JOIN dossier d ON d.id = pj.dossier_id AND 1 = ose_divers.comprise_entre( d.histo_creation, d.histo_destruction )
JOIN intervenant i ON i.id = d.intervenant_id AND 1 = ose_divers.comprise_entre( i.histo_creation, i.histo_destruction )
JOIN type_piece_jointe tpj ON tpj.id = pj.TYPE_PIECE_JOINTE_ID AND 1 = ose_divers.comprise_entre( tpj.histo_creation, tpj.histo_destruction )
where
AND i.source_code = 20259;
SELECT * FROM intervenant WHERE source_code = '20259';
/
BEGIN
OSE_PJ.UPDATE_INTERVENANT( 1481 ); -- nécessité de MAJ des PJ!!
END;
/
SELECT
tpjs.id tpjs_id,
tpj.code tpj_code,
tpj.libelle tpj_libelle,
si.source_code si_code,
si.libelle si_libelle,
tpjs.obligatoire,
tpjs.seuil_hetd,
tpjs.premier_recrutement
FROM
type_piece_jointe tpj
JOIN type_piece_jointe_statut tpjs ON tpjs.type_piece_jointe_id = tpj.id AND 1 = ose_divers.comprise_entre( tpjs.histo_creation, tpjs.histo_destruction )
JOIN statut_intervenant si ON si.id = tpjs.statut_intervenant_id AND 1 = ose_divers.comprise_entre( si.histo_creation, si.histo_destruction )
WHERE
1 = ose_divers.comprise_entre( tpj.histo_creation, tpj.histo_destruction )
ORDER BY
tpj_code, si_code
\ No newline at end of file
......@@ -5,6 +5,7 @@ namespace Application;
use Application\Acl\AdministrateurRole;
use Application\Acl\ComposanteRole;
use Application\Acl\DrhRole;
use UnicaenApp\Util;
return [
'router' => [
......@@ -14,8 +15,7 @@ return [
'options' => [
'route' => '/gestion/indicateur',
'defaults' => [
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Indicateur',
'controller' => 'Application\Controller\Indicateur',
'action' => 'index',
],
],
......@@ -94,7 +94,7 @@ return [
'label' => "Indicateurs",
'title' => "Indicateurs",
'route' => 'indicateur',
'resource' => 'controller/Application\Controller\Indicateur:index',
'resource' => Util::actionToResource('Application\Controller\Indicateur','index'),
],
],
],
......
......@@ -248,10 +248,10 @@ $main = [
'public_files' => [
'js' => [
'js/datepicker-fr.js',
'js/elementPedagogiqueRecherche.js',
'js/service.js',
'js/service-referentiel.js',
'js/paiement.js',
'js/offre-formation.js',
'bootstrap-select/js/bootstrap-select.min.js',
],
'css' => [
......
......@@ -5,6 +5,9 @@ namespace Application;
use Application\Acl\AdministrateurRole;
use Application\Acl\ComposanteRole;
use Application\Acl\IntervenantRole;
use Application\Entity\Db\ElementPedagogique;
use Application\Entity\Db\Privilege;
use UnicaenApp\Util;
return [
'router' => [
......@@ -45,16 +48,6 @@ return [
],
'may_terminate' => false,
'child_routes' => [
'default' => [
'type' => 'Segment',
'options' => [
'route' => '/:action[/:id]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]*',
],
],
],
'voir' => [
'type' => 'Segment',
'options' => [
......@@ -66,30 +59,33 @@ return [
'ajouter' => [
'type' => 'Segment',
'options' => [
'route' => '/ajouter/:etape',
'constraints' => ['etape' => '[0-9]*'],
'defaults' => ['action' => 'ajouter'],
'route' => '/ajouter',
'defaults' => ['action' => 'saisir'],
],
],
'modifier' => [
'type' => 'Segment',
'options' => [
'route' => '/modifier/:etape/:id',
'constraints' => [
'etape' => '[0-9]*',
'id' => '[0-9]*',
],
'defaults' => ['action' => 'modifier'],
'route' => '/modifier/:elementPedagogique',
'constraints' => ['elementPedagogique' => '[0-9]*'],
'defaults' => ['action' => 'saisir'],
],
],
'supprimer' => [
'type' => 'Segment',
'options' => [
'route' => '/supprimer/:id',
'constraints' => ['id' => '[0-9]*'],
'route' => '/supprimer/:elementPedagogique',
'constraints' => ['elementPedagogique' => '[0-9]*'],
'defaults' => ['action' => 'supprimer'],
],
],
'search' => [
'type' => 'Literal',
'options' => [
'route' => '/search',
'defaults' => ['action' => 'search'],
],
],
'get-periode' => [
'type' => 'Segment',
'options' => [
......@@ -111,16 +107,6 @@ return [
],
'may_terminate' => false,
'child_routes' => [
'default' => [
'type' => 'Segment',
'options' => [
'route' => '/:action[/:id]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]*',
],
],
],
'voir' => [
'type' => 'Segment',
'options' => [
......@@ -132,34 +118,31 @@ return [
'ajouter' => [
'type' => 'Segment',
'options' => [
'route' => '/ajouter/:structure[/niveau/:niveau]',
'constraints' => ['structure' => '[0-9]*'],
'defaults' => ['action' => 'ajouter'],
'route' => '/ajouter',
'defaults' => ['action' => 'saisir'],
],
],
'modifier' => [
'type' => 'Segment',
'options' => [
'route' => '/modifier/:structure/:id',
'constraints' => ['id' => '[0-9]*'],
'defaults' => ['action' => 'modifier'],
'route' => '/modifier/:etape',
'constraints' => ['etape' => '[0-9]*'],
'defaults' => ['action' => 'saisir'],
],
],
'supprimer' => [
'type' => 'Segment',
'options' => [
'route' => '/supprimer/:id',
'constraints' => ['id' => '[0-9]*'],
'route' => '/supprimer/:etape',
'constraints' => ['etape' => '[0-9]*'],
'defaults' => ['action' => 'supprimer'],
],
],
'modulateurs' => [
'type' => 'Segment',
'options' => [
'route' => '/modulateurs/:id',
'constraints' => [
'etape' => '[0-9]*',
],
'route' => '/modulateurs/:etape',
'constraints' => ['etape' => '[0-9]*'],
'defaults' => [
'__NAMESPACE__' => 'Application\Controller\OffreFormation',
'controller' => 'Modulateur',
......@@ -170,7 +153,7 @@ return [
'centres-couts' => [
'type' => 'Segment',
'options' => [
'route' => '/centres-couts/:id',
'route' => '/centres-couts/:etape',
'constraints' => [
'etape' => '[0-9]*',
],
......@@ -194,94 +177,26 @@ return [
'label' => 'Offre de formation',
'title' => "Gestion de l'offre de formation",
'route' => 'of',
'resource' => 'controller/Application\Controller\OffreFormation:index',
'pages' => [
'element-ajouter' => [
'label' => "Créer un nouvel enseignement",
'title' => "Créer un nouvel enseignement pour la formation sélectionnée",
'route' => 'of/element/ajouter',
'resource' => 'controller/Application\Controller\OffreFormation\ElementPedagogique:ajouter',
'visible' => false,
'icon' => 'glyphicon glyphicon-plus',
'category' => 'element',
],
'element-modifier' => [
'label' => "Modifier cet enseignement",
'title' => "Modifier cet enseignement",
'route' => 'of/element/modifier',
'resource' => 'controller/Application\Controller\OffreFormation\ElementPedagogique:modifier',
'visible' => false,
'icon' => 'glyphicon glyphicon-edit',
'withtarget' => true,
'category' => 'element',
],
'element-supprimer' => [
'label' => "Supprimer cette formation",
'title' => "Supprimer cette formation",
'route' => 'of/element/supprimer',
'resource' => 'controller/Application\Controller\OffreFormation\ElementPedagogique:supprimer',
'visible' => false,
'icon' => 'glyphicon glyphicon-remove',
'withtarget' => true,
'category' => 'element',
],
'etape-ajouter' => [
'label' => "Créer une nouvelle formation",
'title' => "Créer une nouvelle formation",
'route' => 'of/etape/ajouter',
'resource' => 'controller/Application\Controller\OffreFormation\Etape:ajouter',
'visible' => false,
'icon' => 'glyphicon glyphicon-plus',
'category' => 'etape',
],
'etape-modifier' => [
'label' => "Modifier cette formation",
'title' => "Modifier cette formation",
'route' => 'of/etape/modifier',
'resource' => 'controller/Application\Controller\OffreFormation\Etape:modifier',
'visible' => false,
'icon' => 'glyphicon glyphicon-edit',
'withtarget' => true,
'category' => 'etape',
],
'etape-supprimer' => [
'label' => "Supprimer cette formation",
'title' => "Supprimer cette formation",
'route' => 'of/etape/supprimer',
'resource' => 'controller/Application\Controller\OffreFormation\Etape:supprimer',
'visible' => false,
'icon' => 'glyphicon glyphicon-remove',
'withtarget' => true,
'category' => 'etape',
],
'etape-modulateurs' => [
'label' => "Editer les modulateurs liés à cette formation",
'title' => "Editer les modulateurs liés à cette formation",
'route' => 'of/etape/modulateurs',
'resource' => 'controller/Application\Controller\OffreFormation\Modulateur:saisir',
'visible' => false,
'icon' => 'glyphicon glyphicon-list-alt',
'withtarget' => true,
'category' => 'modulateur',
],
'etape-centres-couts' => [
'label' => "Paramétrer les centres de coûts",
'title' => "Paramétrer les centres de coûts liés à cette formation",
'route' => 'of/etape/centres-couts',
'resource' => 'controller/Application\Controller\OffreFormation\EtapeCentreCout:saisir',
'visible' => false,
'icon' => 'glyphicon glyphicon-euro',
'withtarget' => true,
'category' => 'centres-couts',
],
],
'resource' => Util::actionToResource('Application\Controller\OffreFormation', 'index'),
],
],
],
],
],
'bjyauthorize' => [
'guards' => [
'guards' => [
'Application\Guard\PrivilegeController' => [
[
'controller' => 'Application\Controller\OffreFormation',
'action' => ['index'],
'privileges' => Privilege::ODF_VISUALISATION,
],
[
'controller' => 'Application\Controller\OffreFormation',
'action' => ['export'],
'privileges' => Privilege::ODF_EXPORT_CSV,
],
],
'BjyAuthorize\Guard\Controller' => [
/**
* OffreFormation
......@@ -291,22 +206,17 @@ return [
'action' => ['search-structures', 'search-niveaux'],
'roles' => [IntervenantRole::ROLE_ID, ComposanteRole::ROLE_ID, AdministrateurRole::ROLE_ID],
],
[
'controller' => 'Application\Controller\OffreFormation',
'action' => ['index', 'export'],
'roles' => [ComposanteRole::ROLE_ID, AdministrateurRole::ROLE_ID],
],
/**
* Etape
*/
[
'controller' => 'Application\Controller\OffreFormation\Etape',
'action' => ['voir', 'apercevoir', 'search'],
'roles' => ['user'],
'action' => ['voir', 'search'],
'roles' => [R_ROLE],
],
[
'controller' => 'Application\Controller\OffreFormation\Etape',
'action' => ['ajouter', 'modifier', 'supprimer'],
'action' => ['saisir', 'supprimer'],
'roles' => [ComposanteRole::ROLE_ID, AdministrateurRole::ROLE_ID],
],
/**
......@@ -314,12 +224,12 @@ return [
*/
[
'controller' => 'Application\Controller\OffreFormation\ElementPedagogique',
'action' => ['voir', 'apercevoir', 'search', 'getPeriode'],
'action' => ['voir', 'search', 'getPeriode'],
'roles' => [R_ROLE],
],
[
'controller' => 'Application\Controller\OffreFormation\ElementPedagogique',
'action' => ['ajouter', 'modifier', 'supprimer'],
'action' => ['saisir', 'supprimer'],
'roles' => [ComposanteRole::ROLE_ID, AdministrateurRole::ROLE_ID],
],
/**
......@@ -340,6 +250,36 @@ return [
],
],
],
'resource_providers' => [
'BjyAuthorize\Provider\Resource\Config' => [
'ElementPedagogique' => [],
'Etape' => [],
],
],
'rule_providers' => [
'Application\Provider\Rule\PrivilegeRuleProvider' => [
'allow' => [
[
'privileges' => Privilege::ODF_ELEMENT_VISUALISATION,
'resources' => ['ElementPedagogique', 'Structure'],
],
[
'privileges' => Privilege::ODF_ELEMENT_EDITION,
'resources' => ['ElementPedagogique', 'Structure'],
'assertion' => 'AssertionOffreDeFormation',
],
[
'privileges' => Privilege::ODF_ETAPE_VISUALISATION,
'resources' => ['Etape', 'Structure'],
],
[
'privileges' => Privilege::ODF_ETAPE_EDITION,
'resources' => ['Etape', 'Structure'],
'assertion' => 'AssertionOffreDeFormation',
],
],
],
],
],
'controllers' => [
'invokables' => [
......@@ -366,6 +306,7 @@ return [
'FormElementPedagogiqueRechercheHydrator' => 'Application\\Form\\OffreFormation\\ElementPedagogiqueRechercheHydrator',
'ElementModulateursFormHydrator' => 'Application\\Form\\OffreFormation\\ElementModulateursHydrator',
'EtapeModulateursFormHydrator' => 'Application\\Form\\OffreFormation\\EtapeModulateursHydrator',
'AssertionOffreDeFormation' => 'Application\Assertion\OffreDeFormationAssertion',
],
],
'form_elements' => [
......
......@@ -5,24 +5,24 @@ namespace Application;
use Application\Entity\Db\Privilege;
return [
'router' => [
'router' => [
'routes' => [
'paiement' => [
'type' => 'Literal',
'type' => 'Literal',
'may_terminate' => true,
'options' => [
'route' => '/paiement',
'options' => [
'route' => '/paiement',
'defaults' => [
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Paiement',
'action' => 'index',
'controller' => 'Paiement',
'action' => 'index',
],
],
'child_routes' => [
'child_routes' => [
'etat-demande-paiement' => [
'type' => 'Literal',
'type' => 'Literal',
'may_terminate' => true,
'options' => [
'options' => [
'route' => '/etat-demande-paiement',
'defaults' => [
'action' => 'etatPaiement',
......@@ -30,23 +30,23 @@ return [
],
],
],
'mise-en-paiement' => [
'type' => 'Segment',
'mise-en-paiement' => [
'type' => 'Segment',
'may_terminate' => true,
'options' => [
'route' => '/mise-en-paiement/:structure/:intervenants',
'options' => [
'route' => '/mise-en-paiement/:structure/:intervenants',
'constraints' => [
'structure' => '[0-9]*'
'structure' => '[0-9]*',
],
'defaults' => [
'defaults' => [
'action' => 'MiseEnPaiement',
],
],
],
'etat-paiement' => [
'type' => 'Literal',
'etat-paiement' => [
'type' => 'Literal',
'may_terminate' => true,
'options' => [
'options' => [
'route' => '/etat-paiement',
'defaults' => [
'action' => 'etatPaiement',
......@@ -55,22 +55,22 @@ return [
],
],
'mises-en-paiement-csv' => [
'type' => 'Literal',
'type' => 'Literal',
'may_terminate' => true,
'options' => [
'options' => [
'route' => '/mises-en-paiement-csv',
'defaults' => [
'action' => 'misesEnPaiementCsv'
'action' => 'misesEnPaiementCsv',
],
],
],
'extraction-winpaie' => [
'type' => 'Segment',
'extraction-winpaie' => [
'type' => 'Segment',
'may_terminate' => true,
'options' => [
'options' => [
'route' => '/extraction-winpaie[/:type][/:periode]',
'defaults' => [
'action' => 'extractionWinpaie'
'action' => 'extractionWinpaie',
],
],
],
......@@ -78,7 +78,7 @@ return [
],
],
],
'navigation' => [
'navigation' => [
'default' => [
'home' => [
'pages' => [
......@@ -88,25 +88,25 @@ return [
'label' => "Mises en paiement",
'title' => "Mises en paiement",
'route' => 'paiement/etat-demande-paiement',
'resource' => 'privilege/'.Privilege::MISE_EN_PAIEMENT_VISUALISATION,
'resource' => 'privilege/' . Privilege::MISE_EN_PAIEMENT_VISUALISATION,
],
'etat-paiement' => [
'etat-paiement' => [
'label' => "État de paiement",
'title' => "État de paiement",
'route' => 'paiement/etat-paiement',
'resource' => 'privilege/'.Privilege::MISE_EN_PAIEMENT_VISUALISATION,