Commit 14d26d68 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

WIP aff plafonds

parent 34f0d2e3
Loading
Loading
Loading
Loading
+0 −2
Changes for module/Application/src/Controller/IntervenantController.php: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -205,8 +205,6 @@ class IntervenantController extends AbstractController
            return $vh;
        }

        $this->getProcessusPlafond()->controle($intervenant, $typeVolumeHoraire);

        $campagneSaisie = $this->getServiceCampagneSaisie()->getBy($intervenant->getStatut()->getTypeIntervenant(), $typeVolumeHoraire);

        if (!$campagneSaisie->estOuverte()) {
+6 −5
Changes for module/Application/src/View/Renderer/PhpRenderer.php: 6 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -103,8 +103,8 @@ namespace Application\View\Renderer;
 * @method \Laminas\Mvc\Plugin\FlashMessenger\View\Helper\FlashMessenger flashMessenger($namespace = null)
 * @method \Laminas\Mvc\Plugin\FlashMessenger\View\Helper\FlashMessenger zendviewhelperflashmessenger($namespace = null)
 * @method \Laminas\Mvc\Plugin\FlashMessenger\View\Helper\FlashMessenger laminasviewhelperflashmessenger($namespace = null)
 * @method string asset($asset)
 * @method string zendviewhelperasset($asset)
 * @method \Laminas\View\Helper\Asset asset($asset)
 * @method \Laminas\View\Helper\Asset zendviewhelperasset($asset)
 * @method string basePath($file = null)
 * @method string zendviewhelperbasepath($file = null)
 * @method \Laminas\View\Helper\Cycle cycle(array $data = [], $name = 'default')
@@ -125,9 +125,11 @@ namespace Application\View\Renderer;
 * @method \Laminas\View\Helper\EscapeUrl zendviewhelperescapeurl($value, $recurse = 0)
 * @method \Laminas\View\Helper\Gravatar gravatar($email = '', $options = [], $attributes = [])
 * @method \Laminas\View\Helper\Gravatar zendviewhelpergravatar($email = '', $options = [], $attributes = [])
 * @method \Laminas\View\Helper\HeadLink headLink(?array $attributes = null, $placement = 'APPEND')
 * @method \Laminas\View\Helper\HeadLink zendviewhelperheadlink(?array $attributes = null, $placement = 'APPEND')
 * @method \Laminas\View\Helper\HeadMeta headMeta($content = null, $keyValue = null, $keyType = 'name', $modifiers = [], $placement = 'APPEND')
 * @method \Laminas\View\Helper\HeadMeta zendviewhelperheadmeta($content = null, $keyValue = null, $keyType = 'name', $modifiers = [], $placement = 'APPEND')
 * @method \Laminas\View\Helper\HeadScript headScript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \Laminas\View\Helper\HeadScript zendviewhelperheadscript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \Laminas\View\Helper\HeadStyle headStyle($content = null, $placement = 'APPEND', $attributes = [])
 * @method \Laminas\View\Helper\HeadStyle zendviewhelperheadstyle($content = null, $placement = 'APPEND', $attributes = [])
@@ -148,6 +150,7 @@ namespace Application\View\Renderer;
 * @method \Laminas\View\Helper\HtmlTag zendviewhelperhtmltag(array $attribs = [])
 * @method \Laminas\View\Helper\Identity identity()
 * @method \Laminas\View\Helper\Identity zendviewhelperidentity()
 * @method \Laminas\View\Helper\InlineScript inlineScript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \Laminas\View\Helper\InlineScript zendviewhelperinlinescript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \Laminas\View\Helper\Json json($data, array $jsonOptions = [])
 * @method \Laminas\View\Helper\Json zendviewhelperjson($data, array $jsonOptions = [])
@@ -172,6 +175,7 @@ namespace Application\View\Renderer;
 * @method \Laminas\View\Helper\ViewModel viewModel()
 * @method \Laminas\View\Helper\ViewModel zendviewhelperviewmodel()
 * @method \Plafond\View\Helper\PlafondConfigElementViewHelper plafondConfig(?Plafond\Interfaces\PlafondConfigInterface $plafondConfig = null)
 * @method \Plafond\View\Helper\PlafondsViewHelper plafonds()
 * @method \UnicaenApp\Form\View\Helper\FormAdvancedMultiCheckbox formAdvancedMultiCheckbox(?Laminas\Form\ElementInterface $element = null, ?string $labelPosition = null)
 * @method \UnicaenApp\Form\View\Helper\FormControlGroup formControlGroup(?Laminas\Form\ElementInterface $element = null, $pluginClass = 'formElement')
 * @method \UnicaenApp\Form\View\Helper\FormDate formDate(?\UnicaenApp\Form\Element\Date $element = null, $dateReadonly = false)
@@ -187,10 +191,7 @@ namespace Application\View\Renderer;
 * @method \UnicaenApp\Message\View\Helper\MessageHelper message()
 * @method \UnicaenApp\View\Helper\AppInfos appInfos()
 * @method \UnicaenApp\View\Helper\ConfirmHelper confirm($message = null)
 * @method \UnicaenApp\View\Helper\HeadLink headLink(?array $attributes = null, $placement = 'APPEND')
 * @method \UnicaenApp\View\Helper\HeadScript headScript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \UnicaenApp\View\Helper\HistoriqueViewHelper historique(?UnicaenApp\Entity\HistoriqueAwareInterface $entity = null)
 * @method \UnicaenApp\View\Helper\InlineScript inlineScript($mode = 'FILE', $spec = null, $placement = 'APPEND', array $attrs = [], $type = 'text/javascript')
 * @method \UnicaenApp\View\Helper\InstadiaViewHelper instadia()
 * @method \UnicaenApp\View\Helper\MessageCollectorHelper messageCollector($severity = null)
 * @method \UnicaenApp\View\Helper\Messenger messenger()
+1 −0
Changes for module/Application/view/application/intervenant/services.phtml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ $btnNextUrl = $this->url('workflow/feuille-de-route-btn-next', ['intervenant' =>
$this->intervenant($intervenant)->renderTitle($title);

echo $this->messenger()->addCurrentMessagesFromFlashMessenger();
echo $this->plafonds($intervenant, $typeVolumeHoraire);

$bottom = false;
if ($cloture) echo $this->partial('application/intervenant/partial/cloture', compact('cloture', 'role', 'bottom'));
+21 −0
Changes for module/Plafond/config/module.config.php: 21 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -34,6 +34,15 @@ return [
                        'plafond' => '[0-9]*',
                    ],
                ],
                'plafonds'  => [
                    'route'       => '/plafonds/:perimetre/:id/:typeVolumeHoraire',
                    'action'      => 'plafonds',
                    'constraints' => [
                        'perimetre'         => '[a-z_]*',
                        'id'                => '[0-9]*',
                        'typeVolumeHoraire' => '[0-9]*',
                    ],
                ],

                'config-application' => [
                    'route'  => '/config/application',
@@ -132,6 +141,17 @@ return [
            'action'     => ['editer', 'supprimer', 'construire', 'calculer', 'construire-calculer'],
            'privileges' => Privileges::PLAFONDS_EDITION,
        ],
        [
            'controller' => 'Plafond\Controller\Plafond',
            'action'     => ['plafonds'],
            'privileges' => [
                Privileges::PLAFONDS_VISUALISATION,
                Privileges::ENSEIGNEMENT_PREVU_VISUALISATION,
                Privileges::ENSEIGNEMENT_REALISE_VISUALISATION,
                Privileges::REFERENTIEL_PREVU_VISUALISATION,
                Privileges::REFERENTIEL_REALISE_VISUALISATION,
            ],
        ],
        [
            'controller' => 'Plafond\Controller\Plafond',
            'action'     => ['config-application'],
@@ -202,5 +222,6 @@ return [

    'view_helpers' => [
        'plafondConfig' => PlafondConfigElementViewHelperFactory::class,
        'plafonds'      => View\Helper\PlafondsViewHelperFactory::class,
    ],
];
 No newline at end of file
+17 −0
Changes for module/Plafond/src/Controller/PlafondController.php: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace Plafond\Controller;

use Application\Controller\AbstractController;
use Application\Entity\Db\FonctionReferentiel;
use Application\Entity\Db\TypeVolumeHoraire;
use Intervenant\Entity\Db\Statut;
use Application\Entity\Db\Structure;
use Application\Provider\Privilege\Privileges;
@@ -72,6 +73,22 @@ class PlafondController extends AbstractController



    public function plafondsAction()
    {
        $perimetre           = $this->params()->fromRoute('perimetre');
        $id                  = (int)$this->params()->fromRoute('id');
        $typeVolumeHoraireId = (int)$this->params()->fromRoute('typeVolumeHoraire');

        $class = $this->getServicePlafond()->perimetreCodeToEntityClass($perimetre);

        $entity            = $this->em()->find($class, $id);
        $typeVolumeHoraire = $this->em()->find(TypeVolumeHoraire::class, $typeVolumeHoraireId);

        return compact('entity', 'typeVolumeHoraire');
    }



    public function supprimerAction()
    {
        $plafond = $this->getEvent()->getParam('plafond');
Loading