Commit fecef179 authored by joriot221's avatar joriot221
Browse files

Merge remote-tracking branch 'origin/master'

parents 76baf665 dbca165a
Loading
Loading
Loading
Loading
+2 −4
Changes for module/Application/src/Form/TypeIntervention/Traits/TypeInterventionStructureSaisieFormAwareTrait.php: 2 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -14,13 +14,12 @@ trait TypeInterventionStructureSaisieFormAwareTrait
    protected ?TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie = null;



    /**
     * @param TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie
     *
     * @return self
     */
    public function setFormTypeInterventionTypeInterventionStructureSaisie(?TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie)
    public function setFormTypeInterventionnStructureSaisie(?TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie)
    {
        $this->formTypeInterventionTypeInterventionStructureSaisie = $formTypeInterventionTypeInterventionStructureSaisie;

@@ -28,8 +27,7 @@ trait TypeInterventionStructureSaisieFormAwareTrait
    }



    public function getFormTypeInterventionTypeInterventionStructureSaisie(): ?TypeInterventionStructureSaisieForm
    public function getFormTypeInterventionStructureSaisie(): ?TypeInterventionStructureSaisieForm
    {
        if (!empty($this->formTypeInterventionTypeInterventionStructureSaisie)) {
            return $this->formTypeInterventionTypeInterventionStructureSaisie;
+2 −1
Changes for module/Plafond/src/Controller/DerogationController.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace Plafond\Controller;

use Application\Controller\AbstractController;
use Application\Entity\Db\Intervenant;
use Application\Provider\Privilege\Privileges;
use Application\Service\Traits\TypeVolumeHoraireServiceAwareTrait;
use Plafond\Entity\Db\PlafondDerogation;
use Plafond\Entity\Db\PlafondEtat;
@@ -26,7 +27,7 @@ class DerogationController extends AbstractController
        $typesVolumesHoraires = $this->getServiceTypeVolumeHoraire()->getList();


        if ($this->params()->fromPost('action') == 'save') {
        if ($this->isAllowed(Privileges::getResourceId(Privileges::PLAFONDS_DEROGATIONS_EDITION)) && $this->params()->fromPost('action') == 'save') {
            $this->saveDerogations($intervenant);
        }

+7 −3
Changes for module/Plafond/view/plafond/derogation/index.phtml: 7 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -7,11 +7,11 @@
 *
 */

echo '<h1>Dérogations accordées</h1>';
use Application\Provider\Privilege\Privileges;

//var_dump($data);
echo '<h1>Dérogations accordées</h1>';

$canDerog = true;
$canDerog = $this->isAllowed(Privileges::getResourceId(Privileges::PLAFONDS_DEROGATIONS_EDITION));

echo $this->messenger()->addCurrentMessagesFromFlashMessenger();

@@ -49,7 +49,11 @@ echo $this->messenger()->addCurrentMessagesFromFlashMessenger();
                <?php endforeach; ?>

                <td>
                    <?php if ($canDerog): ?>
                        <input class="form-control" type="text" name="plafond-<?= $id ?>" value="<?= $plafond['derogation'] ?>"/>
                    <?php else: ?>
                        <?= floatToString($plafond['derogation']) ?>
                    <?php endif; ?>
                </td>
            </tr>
        <?php endforeach; ?>