diff --git a/CHANGELOG.md b/CHANGELOG.md index df0d431ccfb6f6c7b057d23ff8f95dd3de68aabd..da456cac15f90e9b3cf21f37c31fc32a7861c5eb 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,7 +37,6 @@ Objectif : Doubles statuts et refonte des données personnelles * La suppression d'intervenants est maintenant pleinement opérationnelle et les erreurs sont mieux affichées * Formule de Poitiers modifiée -* Le report des services de l'année précédentepar un gestionnaire est désormais limité à sa composante. ## Notes de mise à jour @@ -55,6 +54,15 @@ Une nouvelle documentation sur les connecteurs est disponible ici : [Import de d * Attention : un bug est connu et en cours de résolution : il se produit lorsqu'en tant qu'intervenant vous saisissez vos données personnelles. Une page d'erreur s'affiche au moment ou vous sélectionnez votre statut. Une mise à jour de la page suffit pour pouvoir continuer la saisie du formulaire. + +# OSE 14.17 (en cours de développement) + +## Corrections de bugs + +* Le report des services de l'année précédentepar un gestionnaire est désormais limité à sa composante. + + + # OSE 14.16 ## Nouveautés diff --git a/module/Application/src/Application/Controller/FonctionReferentielController.php b/module/Application/src/Application/Controller/FonctionReferentielController.php index fc254d0da430e0db2ef7772053d43d778caf5ac2..381a34b9446cf9d06529d9a6825e6bfaf4710fab 100755 --- a/module/Application/src/Application/Controller/FonctionReferentielController.php +++ b/module/Application/src/Application/Controller/FonctionReferentielController.php @@ -15,10 +15,6 @@ class FonctionReferentielController extends AbstractController public function indexAction() { - $this->em()->getFilters()->enable('historique')->init([ - FonctionReferentiel::class, - ]); - $fonctionsReferentiels = $this->getServiceFonctionReferentiel()->getList(); return compact('fonctionsReferentiels'); @@ -34,7 +30,7 @@ class FonctionReferentielController extends AbstractController $form = $this->getFormFonctionReferentielSaisie(); if (empty($fonctionReferentiel)) { - $title = 'Création d\'une nouvelle fonction référentielle'; + $title = 'Création d\'une nouvelle fonction référentielle'; $fonctionReferentiel = $this->getServiceFonctionReferentiel()->newEntity(); } else { $title = 'Édition d\'une fonction référentielle'; @@ -52,6 +48,8 @@ class FonctionReferentielController extends AbstractController return compact('form', 'title'); } + + public function deleteAction() { $fonctionReferentiel = $this->getEvent()->getParam('fonctionReferentiel'); @@ -62,6 +60,7 @@ class FonctionReferentielController extends AbstractController } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } + return new MessengerViewModel(compact('fonctionReferentiel')); } } \ No newline at end of file diff --git a/module/Application/src/Application/Controller/ServiceReferentielController.php b/module/Application/src/Application/Controller/ServiceReferentielController.php index 84a9217710ca523cdab91df57d775bee0abb8617..ce72e37ca65f3bc8b39302be0d18f596ca09328c 100755 --- a/module/Application/src/Application/Controller/ServiceReferentielController.php +++ b/module/Application/src/Application/Controller/ServiceReferentielController.php @@ -43,7 +43,6 @@ class ServiceReferentielController extends AbstractController use PlafondProcessusAwareTrait; - protected function initFilters() { $this->em()->getFilters()->enable('historique')->init([ @@ -104,7 +103,6 @@ class ServiceReferentielController extends AbstractController $this->initFilters(); $this->em()->getFilters()->enable('historique')->init([ \Application\Entity\Db\Structure::class, - \Application\Entity\Db\FonctionReferentiel::class, ]); $id = (int)$this->params()->fromRoute('id'); $typeVolumeHoraire = $this->params()->fromQuery('type-volume-horaire', $this->params()->fromPost('type-volume-horaire')); diff --git a/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php b/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php index f99f4fe87f901e16b4d4764137cb1e6a2302fd39..7fdc82467cfe9f55687979865a30086c073cbdd4 100755 --- a/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php +++ b/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php @@ -25,7 +25,6 @@ class FonctionReferentielSaisieForm extends AbstractForm use ContextServiceAwareTrait; - public function init() { $hydrator = new FonctionReferentielHydrator(); @@ -37,7 +36,7 @@ class FonctionReferentielSaisieForm extends AbstractForm $this->add([ 'name' => 'parent', 'options' => [ - 'label' => 'Type de fonction', + 'label' => 'Type de fonction', 'empty_option' => "Pas de type de fonction", 'value_options' => Util::collectionAsOptions($this->getFonctionsReferentiellesParentes()), ], @@ -145,8 +144,11 @@ class FonctionReferentielSaisieForm extends AbstractForm protected function getFonctionsReferentiellesParentes() { $qb = $this->getServiceFonctionReferentiel()->finderByProperty('parent', null); + $qb = $this->getServiceFonctionReferentiel()->finderByHistorique($qb); + + $frs = $this->getServiceFonctionReferentiel()->getList($qb); - return $this->getServiceFonctionReferentiel()->getList($qb); + return $frs; } @@ -176,7 +178,7 @@ class FonctionReferentielSaisieForm extends AbstractForm public function getInputFilterSpecification() { return [ - 'parent' => [ + 'parent' => [ 'required' => false, ], 'code' => [ @@ -213,12 +215,11 @@ class FonctionReferentielHydrator implements HydratorInterface use StructureServiceAwareTrait; - /** * Hydrate $object with the provided $data. * - * @param array $data - * @param \Application\Entity\Db\FonctionReferentiel $object + * @param array $data + * @param \Application\Entity\Db\FonctionReferentiel $object * * @return object */ @@ -247,7 +248,7 @@ class FonctionReferentielHydrator implements HydratorInterface /** * Extract values from an object * - * @param \Application\Entity\Db\FonctionReferentiel $object + * @param \Application\Entity\Db\FonctionReferentiel $object * * @return array */ diff --git a/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php b/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php index 43c6b5ff4fb35ca9b294e25f4bc4f6de0a1e359c..f75c59e0be7da8707c28301800f5967248e3e9a5 100755 --- a/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php +++ b/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php @@ -164,7 +164,7 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter public function getFonctions() { - $fncs = $this->getServiceFonctionReferentiel()->getList(); + $fncs = $this->getServiceFonctionReferentiel()->getList($this->getServiceFonctionReferentiel()->finderByHistorique()); $fonctions = []; foreach ($fncs as $id => $fonction) { if ($fonction->getFille()->count() > 0) { @@ -340,7 +340,6 @@ class SaisieFieldsetHydrator implements HydratorInterface use EntityManagerAwaretrait; - /** * Hydrate $object with the provided $data. * diff --git a/module/Application/view/application/fonction-referentiel/index.phtml b/module/Application/view/application/fonction-referentiel/index.phtml index e0fa6c9c35b486f9cbf563db6e98a35d0ebadcf0..ff3f823681e03973cce209d2ff445065057e8f95 100755 --- a/module/Application/view/application/fonction-referentiel/index.phtml +++ b/module/Application/view/application/fonction-referentiel/index.phtml @@ -1,6 +1,6 @@ <?php /** - * @var $this \Application\View\Renderer\PhpRenderer + * @var $this \Application\View\Renderer\PhpRenderer * @var $fonctionsReferentiels \Application\Entity\Db\FonctionReferentiel[] */ @@ -11,56 +11,61 @@ $this->headTitle()->append("Référentiel fonctions"); $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::REFERENTIEL_ADMIN_EDITION)); ?> - <h1 class="page-header">Référentiel fonctions</h1> +<h1 class="page-header">Référentiel fonctions</h1> - <table class="table table-bordered table-sort"> - <thead> - <th>Code</th> - <th>Libelle</th> - <th>Libelle court</th> - <th>Domaine Fonctionnel</th> - <th>Plafond</th> - <th>Structure</th> - <th>Formation à préciser</th> - <th><abbr title="Détermine si les heures de cette fonction référentielle peuvent être comptées dans le service statutaire des intervenants ou non">Peut dans serv.</abbr></th> - <?php if ($canEdit) echo '<th>Actions</th>' ?> - </thead> - <tbody> - <?php foreach ($fonctionsReferentiels as $fr): ?> - <tr> - <td data-order="<?= ($fr->getParent() ? $fr->getParent()->getCode().'.' : '').$fr->getCode() ?>" style="<?= $fr->getParent() ? 'padding-left: 5em' : '' ?>"><?= $fr->getCode() ?> +<table class="table table-bordered table-sort"> + <thead> + <th>Code</th> + <th>Libelle</th> + <th>Libelle court</th> + <th>Domaine Fonctionnel</th> + <th>Plafond</th> + <th>Structure</th> + <th>Formation à préciser</th> + <th> + <abbr title="Détermine si les heures de cette fonction référentielle peuvent être comptées dans le service statutaire des intervenants ou non">Peut + dans serv.</abbr></th> + <?php if ($canEdit) echo '<th>Actions</th>' ?> + </thead> + <tbody> + <?php foreach ($fonctionsReferentiels as $fr): if ($fr->estNonHistorise()): ?> + <tr> + <td data-order="<?= (($fr->getParent() && $fr->getParent()->estNonHistorise()) ? $fr->getParent()->getCode() . '.' : '') . $fr->getCode() ?>" + style="<?= ($fr->getParent() && $fr->getParent()->estNonHistorise()) ? 'padding-left: 5em' : '' ?>"><?= $fr->getCode() ?> + </td> + <td><?= $fr->getLibelleLong() ?></td> + <td><?= $fr->getLibelleCourt() ?></td> + <td><?= $fr->getDomaineFonctionnel() ?></td> + <td><?= $fr->getPlafond() ?></td> + <td><?= $this->structure($fr->getStructure())->renderLink() ?></td> + <td style="text-align:center"><?php if ($fr->isEtapeRequise()): ?><span + class="text-success glyphicon glyphicon-ok"></span><?php else: ?><span + class="text-danger glyphicon glyphicon-remove"></span><?php endif; ?></td> + <td style="text-align:center"><?= $fr->isServiceStatutaire() ? 'Oui' : 'Non' ?></td> + <?php if ($canEdit) { ?> + <td style="text-align:center;width:1px;white-space: nowrap"> + <a class="ajax-modal" data-event="fonction-referentiel-saisie" + href="<?= $this->url('fonction-referentiel/saisie', ['fonctionReferentiel' => $fr->getId()]) ?>" + title="Modifier la fonction référentielle"> + <span class="glyphicon glyphicon-edit"></span></a> + <a class="pop-ajax" + href="<?= $this->url('fonction-referentiel/delete', ['fonctionReferentiel' => $fr->getId()]) ?>" + title="Supprimer la fonction référentielle" + data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>" + data-confirm="true" + data-confirm-button="Oui" + data-cancel-button="Non" + data-submit-reload="true" + > + <span class="glyphicon glyphicon-remove"></span> + </a> </td> - <td><?= $fr->getLibelleLong() ?></td> - <td><?= $fr->getLibelleCourt() ?></td> - <td><?= $fr->getDomaineFonctionnel() ?></td> - <td><?= $fr->getPlafond() ?></td> - <td><?= $this->structure($fr->getStructure())->renderLink() ?></td> - <td style="text-align:center"><?php if ($fr->isEtapeRequise()): ?><span class="text-success glyphicon glyphicon-ok"></span><?php else: ?><span class="text-danger glyphicon glyphicon-remove"></span><?php endif; ?></td> - <td style="text-align:center"><?= $fr->isServiceStatutaire() ? 'Oui' : 'Non' ?></td> - <?php if ($canEdit) { ?> - <td style="text-align:center;width:1px;white-space: nowrap"> - <a class="ajax-modal" data-event="fonction-referentiel-saisie" - href="<?= $this->url('fonction-referentiel/saisie', ['fonctionReferentiel' => $fr->getId()]) ?>" - title="Modifier la fonction référentielle"> - <span class="glyphicon glyphicon-edit"></span></a> - <a class="pop-ajax" - href="<?= $this->url('fonction-referentiel/delete', ['fonctionReferentiel' => $fr->getId()]) ?>" - title="Supprimer la fonction référentielle" - data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>" - data-confirm="true" - data-confirm-button="Oui" - data-cancel-button="Non" - data-submit-reload="true" - > - <span class="glyphicon glyphicon-remove"></span> - </a> - </td> - <?php } ?> - </tr> - <?php endforeach; ?> - </tbody> - </table> - <?php if ($canEdit): ?> + <?php } ?> + </tr> + <?php endif; endforeach; ?> + </tbody> +</table> +<?php if ($canEdit): ?> <a class="btn btn-primary ajax-modal" data-event="fonction-referentiel-saisie" href="<?= $this->url('fonction-referentiel/saisie') ?>" title="Ajouter une fonction référentielle">