Commit 27e8fb98 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'master' of https://git.unicaen.fr/open-source/OSE into ll-v18

parents d31aac02 fed538a6
Loading
Loading
Loading
Loading
+2 −0
Changes for CHANGELOG.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ Objectif : Plafonds personnalisables & refonte gestion des statuts
* Un nouveau modèle de contrat sera possible avec la ventilation des heures de services par types d'intervention (CM/TD/TP)
* Des périodes pourront être ajoutés, supprimés ou modifiés depuis l'administration des périodes.
* Les types de formations et les groupes les contenant pourront être ajoutés, supprimés ou modifiés depuis l'administration des types de formations.
* Nouvel état de sortie sur l'export des agréments, rendant celui-ci maintenant paramétrable par les établissements (#42944)
* Module Export Siham : possiblité de récupérer plusieurs typeUO pour alimenter la liste des structures pour la PEC et la REN (#41454)
* Ajout d'un module de gestion des Notes sur l'intervenant : 
  * Possibilité de rajouter une note écrite (informations, message important etc...) sur une fiche intervenant (Tâche #25565)
  * Possibilité d'envoyer un email à intervenant avec historisation de l'email directement depuis la fiche intervenant (Tâche #26546)
+6 −8
Changes for data/ddl/view/V_AGREMENT_EXPORT_CSV.sql: 6 added lines, 8 removed lines.
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_AGREMENT_EXPORT_CSV AS
CREATE
OR REPLACE FORCE VIEW V_AGREMENT_EXPORT_CSV AS
  WITH heures_s AS (
  SELECT
    i.id                                      intervenant_id,
@@ -26,14 +27,13 @@ WITH heures_s AS (
    ep.structure_id,
    i.structure_id
)
SELECT
SELECT a.libelle                                                 annee,
       a.id                                                      annee_id,
       i.id                                                      intervenant_id,
       s2.id                                                     intervenant_structure_id,
       s2.libelle_court                                          intervenant_structure_libelle,
       s.id                                                      structure_id,

  a.libelle                                                                   annee,
       s.libelle_court                                           structure_libelle,
       i.code                                                    intervenant_code,
       i.nom_usuel                                               intervenant_nom_usuel,
@@ -56,15 +56,13 @@ SELECT
       COALESCE(heures_s.total, fr.total)                        hetd_total,




       tagr.libelle                                              type_agrement,
       CASE WHEN agr.id IS NULL THEN 0 ELSE 1 END                agree,
       CASE WHEN agr.id IS NULL THEN 'En attente' ELSE 'Oui' END agree_txt,
       agr.date_decision                                         date_decision,
       u.display_name                                            modificateur,
       agr.histo_modification                                    date_modification
FROM
            tbl_agrement             ta
FROM tbl_agrement ta
         JOIN intervenant i ON i.id = ta.intervenant_id
         JOIN statut si ON si.id = i.statut_id
         JOIN annee a ON a.id = ta.annee_id
@@ -84,4 +82,4 @@ FROM
    AND fr.etat_volume_horaire_id = evh.id

         LEFT JOIN heures_s ON heures_s.intervenant_id = i.id
                                       AND heures_s.structure_id = s.id
 No newline at end of file
    AND heures_s.structure_id = s.id;
 No newline at end of file
+32 −0
Changes for data/etats_sortie.php: 32 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -55,6 +55,38 @@ return [
    "LIBELLE": {
        "libelle": "Libellé"
    }
}',
    ],
    [
        'CODE'           => 'export-agrement',
        'LIBELLE'        => 'Export Agrément',
        'PDF_TRAITEMENT' => null,
        'AUTO_BREAK'     => false,
        'REQUETE'        => 'SELECT * FROM v_agrement_export_csv',
        'CSV_PARAMS'     => '{
    "ANNEE_ID"            : { "visible": false },
    "INTERVENANT_ID"            : { "visible": false },
    "INTERVENANT_STRUCTURE_ID"            : { "visible": false },
    "STRUCTURE_ID"            : { "visible": false },
    "AGREE"            : { "visible": false },
    "ANNEE": { "libelle": "Année"},
    "INTERVENANT_CODE": { "libelle": "Code intervenant"},
    "STRUCTURE_LIBELLE": {"libelle": "Structure hiérarchique"},
    "INTERVENANT_STRUCTURE_LIBELLE": {"libelle": "Structure d\'affectation"},
    "INTERVENANT_NOM_USUEL": {"libelle": "Nom usuel"},
    "INTERVENANT_NOM_PATRONYMIQUE": {"libelle": "Nom patronymique"},
    "INTERVENANT_PRENOM": {"libelle": "Prénom"},
    "INTERVENANT_STATUT_LIBELLE": {"libelle": "Statut"},
    "DISCIPLINE": {"libelle": "Discipline"},
    "HETD_FI": {"libelle": "HETD (FI)", "type": "float"},
    "HETD_FA": {"libelle": "HETD (FA)","type": "float"},
    "HETD_FC": {"libelle": "HETD (FC)","type": "float"},
    "HETD_TOTAL": {"libelle": "HETD (Total)","type": "float"},
    "TYPE_AGREMENT": {"libelle": "Type d\'agrément"},
    "AGREE_TXT": {"libelle": "Agréé"},
    "DATE_DECISION": {"libelle": "Date de décision"},
    "MODIFICATEUR": {"libelle": "Modificateur"},
    "DATE_MODIFICATION": {"libelle": "Date de modification"}
}',
    ],
    [
+12 −14
Changes for module/Application/src/Controller/AgrementController.php: 12 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ use Application\Form\Agrement\Traits\SaisieAwareTrait;
use Application\Provider\Privilege\Privileges;
use Application\Service\AgrementService;
use Application\Service\Traits\AgrementServiceAwareTrait;
use Application\Service\Traits\EtatSortieServiceAwareTrait;
use Application\Service\Traits\IntervenantServiceAwareTrait;
use Application\Service\Traits\ServiceServiceAwareTrait;
use Application\Service\Traits\StructureServiceAwareTrait;
@@ -36,6 +37,7 @@ class AgrementController extends AbstractController
    use SaisieAwareTrait;
    use StructureServiceAwareTrait;
    use WorkflowServiceAwareTrait;
    use EtatSortieServiceAwareTrait;


    /**
@@ -53,7 +55,6 @@ class AgrementController extends AbstractController
    }



    /**
     * Page de menu des agréments
     */
@@ -63,7 +64,6 @@ class AgrementController extends AbstractController
    }



    /**
     * Détails d'un agrément.
     *
@@ -77,7 +77,6 @@ class AgrementController extends AbstractController
    }



    /**
     * Liste des agréments d'un type donné, concernant un intervenant.
     */
@@ -139,7 +138,6 @@ class AgrementController extends AbstractController
    }



    public function saisirAction()
    {
        $this->initFilters();
@@ -163,7 +161,6 @@ class AgrementController extends AbstractController
    }



    public function saisirLotAction()
    {
        $typeAgrement = $this->getEvent()->getParam('typeAgrement');
@@ -264,7 +261,6 @@ class AgrementController extends AbstractController
    }



    public function supprimerAction()
    {
        /** @var Agrement $agrement */
@@ -281,24 +277,26 @@ class AgrementController extends AbstractController
    }



    public function exportCsvAction()
    {
        //Contexte année et structure
        $annee = $this->getServiceContext()->getAnnee();
        $role  = $this->getServiceContext()->getSelectedIdentityRole();
        $structure = $this->getServiceContext()->getStructure();

        $data = $this->getServiceAgrement()->getExportCsvData($annee, $role->getStructure());
        $filters['ANNEE_ID'] = $annee->getId();
        if ($structure) {
            $filters['STRUCTURE_ID'] = $structure->getId();
        }
        //On récupére l'état de sortie pour l'export des agréments
        $etatSortie = $this->getServiceEtatSortie()->getRepo()->findOneBy(['code' => 'export-agrement']);
        $csvModel = $this->getServiceEtatSortie()->genererCsv($etatSortie, $filters);
        $csvModel->setFilename('export-agrement.csv');

        $csvModel = new CsvModel();
        $csvModel->setHeader($data['head']);
        $csvModel->addLines($data['data']);
        $csvModel->setFilename('agrements-' . $annee . '.csv');

        return $csvModel;
    }



    private function updateTableauxBord(Intervenant $intervenant)
    {
        //@alecourtes : Récupérer les intervenants avec le même code car l'agrement peut être valide
+10 −22
Changes for module/ExportRh/src/Connecteur/Siham/SihamConnecteur.php: 10 added lines, 22 removed lines.
Original line number Diff line number Diff line
@@ -27,14 +27,12 @@ class SihamConnecteur implements ConnecteurRhInterface
    public Siham $siham;



    public function __construct(Siham $siham)
    {
        $this->siham = $siham;
    }



    public function rechercherIntervenantRh($nomUsuel = '', $prenom = '', $insee = ''): array
    {
        $params = [
@@ -65,7 +63,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?IntervenantRh
    {
        $agent = null;
@@ -125,7 +122,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererDonneesAdministrativesIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?array
    {
        try {
@@ -160,7 +156,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererAffectationEnCoursIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?array
    {
        $affectations = [];
@@ -187,7 +182,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererContratEnCoursIntervenantRh(Intervenant $intervenant): ?array
    {
        $contrats = [];
@@ -213,7 +207,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function synchroniserDonneesPersonnellesIntervenantRh(\Application\Entity\Db\Intervenant $intervenant, $datas): bool
    {
        try {
@@ -330,7 +323,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function trouverCodeRhByInsee(\Application\Entity\Db\Intervenant $intervenant): ?string
    {
        $intervenantDossier = $this->getServiceDossier()->getByIntervenant($intervenant);
@@ -353,7 +345,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function prendreEnChargeIntervenantRh(\Application\Entity\Db\Intervenant $intervenant, $datas): ?string
    {
        try {
@@ -528,7 +519,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function renouvellerIntervenantRH(\Application\Entity\Db\Intervenant $intervenant, $datas): ?string
    {
        try {
@@ -628,7 +618,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function cloreDossier(Intervenant $intervenant): ?bool
    {

@@ -658,67 +647,66 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererListeUO(): ?array
    {
        /*On récupére les UO de type composante*/
        /*On récupére les UO avec le type paramétré*/
        $uo = [];
        $typeUO = $this->siham->getConfig()['code-type-structure-affectation'];
        $types = explode(',', $typeUO);
        //On boucle sur les différents types UO nécessaire au module export siham
        foreach ($types as $code) {
            $params = [
                'codeAdministration' => '',
                'listeUO'            => [[
                                         'typeUO' => $this->siham->getConfig()['code-type-structure-affectation'],
                    'typeUO' => $code,
                ]],
            ];

        $uo = $this->siham->recupererListeUO($params);
            $uo = array_merge($uo, $this->siham->recupererListeUO($params));
        }

        ksort($uo);
        
        return $uo;
    }



    public function recupererListePositions(): ?array
    {
        return $this->siham->recupererListePositions();
    }



    public function recupererListeEmplois(): ?array
    {
        return $this->siham->recupererListeEmplois();
    }



    public function recupererListeStatuts(): ?array
    {
        return $this->siham->recupererListeStatuts();
    }



    public function recupererListeModalites(): ?array
    {
        return $this->siham->recupererListeModalites();
    }



    public function recupererListeContrats(): ?array
    {
        return $this->siham->recupererListeContrats();
    }



    public function getConnecteurName(): string
    {
        return 'siham';
    }



    public function recupererFieldsetConnecteur(): Fieldset
    {
        $fieldset = new SihamFieldset('connecteurForm', []);