Commit 03ddcdfb authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Bug corrigé sur la modif de types de modifs de serice dûs

parent 53f5b01a
...@@ -3,6 +3,13 @@ title: "Changements intervenus sur OSE" ...@@ -3,6 +3,13 @@ title: "Changements intervenus sur OSE"
author: Laurent Lécluse - DSI - Unicaen author: Laurent Lécluse - DSI - Unicaen
--- ---
# OSE 11
## Correction de bugs
* L'interface d'administration des motifs de modification de service est de nouveau pleinement fonctionelle.
# OSE 10-zf2 et 10-zf3 # OSE 10-zf2 et 10-zf3
## Nouveautés ## Nouveautés
......
...@@ -13,16 +13,16 @@ return [ ...@@ -13,16 +13,16 @@ return [
'options' => [ 'options' => [
'route' => '/motif-modification-service', 'route' => '/motif-modification-service',
'defaults' => [ 'defaults' => [
'controller' => 'Application\Controller\MotifModificationService', 'controller' => 'Application\Controller\MotifModificationService',
'action' => 'index', 'action' => 'index',
], ],
], ],
'may_terminate' => true, 'may_terminate' => true,
'child_routes' => [ 'child_routes' => [
'delete' => [ 'delete' => [
'type' => 'Segment', 'type' => 'Segment',
'options' => [ 'options' => [
'route' => '/delete/:motif-modification-service', 'route' => '/delete/:motifModificationServiceDu',
'constraints' => [ 'constraints' => [
'motif-modification-service' => '[0-9]*', 'motif-modification-service' => '[0-9]*',
], ],
...@@ -34,7 +34,7 @@ return [ ...@@ -34,7 +34,7 @@ return [
'saisie' => [ 'saisie' => [
'type' => 'Segment', 'type' => 'Segment',
'options' => [ 'options' => [
'route' => '/saisie/[:motif-modification-service]', 'route' => '/saisie/[:motifModificationServiceDu]',
'constraints' => [ 'constraints' => [
'motif-modification-service' => '[0-9]*', 'motif-modification-service' => '[0-9]*',
], ],
...@@ -47,7 +47,7 @@ return [ ...@@ -47,7 +47,7 @@ return [
], ],
], ],
], ],
'navigation' => [ 'navigation' => [
'default' => [ 'default' => [
'home' => [ 'home' => [
'pages' => [ 'pages' => [
...@@ -66,7 +66,7 @@ return [ ...@@ -66,7 +66,7 @@ return [
], ],
], ],
], ],
], ],
'bjyauthorize' => [ 'bjyauthorize' => [
'guards' => [ 'guards' => [
PrivilegeController::class => [ PrivilegeController::class => [
...@@ -77,7 +77,7 @@ return [ ...@@ -77,7 +77,7 @@ return [
], ],
[ [
'controller' => 'Application\Controller\MotifModificationService', 'controller' => 'Application\Controller\MotifModificationService',
'action' => ['saisie','delete'], 'action' => ['saisie', 'delete'],
'privileges' => Privileges::MOTIFS_MODIFICATION_SERVICE_DU_EDITION, 'privileges' => Privileges::MOTIFS_MODIFICATION_SERVICE_DU_EDITION,
], ],
], ],
...@@ -90,14 +90,14 @@ return [ ...@@ -90,14 +90,14 @@ return [
], ],
'service_manager' => [ 'service_manager' => [
'invokables' => [ 'invokables' => [
Service\MotifModificationServiceService::class => Service\MotifModificationServiceService::class, Service\MotifModificationServiceService::class => Service\MotifModificationServiceService::class,
], ],
], ],
'view_helpers' => [ 'view_helpers' => [
], ],
'form_elements' => [ 'form_elements' => [
'invokables' => [ 'invokables' => [
Form\MotifModificationService\MotifModificationServiceSaisieForm::class => Form\MotifModificationService\MotifModificationServiceSaisieForm::class, Form\MotifModificationService\MotifModificationServiceSaisieForm::class => Form\MotifModificationService\MotifModificationServiceSaisieForm::class,
], ],
], ],
]; ];
...@@ -31,11 +31,11 @@ class MotifModificationServiceController extends AbstractController ...@@ -31,11 +31,11 @@ class MotifModificationServiceController extends AbstractController
{ {
/* @var $motifModificationService MotifModificationServiceDu */ /* @var $motifModificationService MotifModificationServiceDu */
$motifModificationServiceDu = $this->getEvent()->getParam('motif-modification-service'); $motifModificationServiceDu = $this->getEvent()->getParam('motifModificationServiceDu');
$form = $this->getFormMotifModificationServiceSaisie(); $form = $this->getFormMotifModificationServiceSaisie();
if (empty($motifModificationServiceDu)) { if (empty($motifModificationServiceDu)) {
$title = 'Création d\'un nouveau motif de modification de service dû'; $title = 'Création d\'un nouveau motif de modification de service dû';
$motifModificationServiceDu = $this->getServiceMotifModificationService()->newEntity(); $motifModificationServiceDu = $this->getServiceMotifModificationService()->newEntity();
} else { } else {
$title = 'Édition d\'un motif de modification de service dû'; $title = 'Édition d\'un motif de modification de service dû';
...@@ -57,7 +57,7 @@ class MotifModificationServiceController extends AbstractController ...@@ -57,7 +57,7 @@ class MotifModificationServiceController extends AbstractController
public function deleteAction() public function deleteAction()
{ {
$motifModificationServiceDu = $this->getEvent()->getParam('motif-modification-service'); $motifModificationServiceDu = $this->getEvent()->getParam('motifModificationServiceDu');
try { try {
$this->getServiceMotifModificationService()->delete($motifModificationServiceDu); $this->getServiceMotifModificationService()->delete($motifModificationServiceDu);
...@@ -66,6 +66,6 @@ class MotifModificationServiceController extends AbstractController ...@@ -66,6 +66,6 @@ class MotifModificationServiceController extends AbstractController
$this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage()); $this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage());
} }
return new MessengerViewModel(compact('motifModificationService')); return new MessengerViewModel();
} }
} }
<?php <?php
/** /**
* @var $this \Application\View\Renderer\PhpRenderer * @var $this \Application\View\Renderer\PhpRenderer
* @var $motifModificationServices \Application\Entity\Db\MotifModificationService[] * @var $motifModificationServices \Application\Entity\Db\MotifModificationService[]
*/ */
...@@ -17,47 +17,50 @@ $this->headTitle()->append("Motifs de modification de service dû"); ...@@ -17,47 +17,50 @@ $this->headTitle()->append("Motifs de modification de service dû");
$canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::MOTIFS_MODIFICATION_SERVICE_DU_EDITION)); $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::MOTIFS_MODIFICATION_SERVICE_DU_EDITION));
?> ?>
<h1 class="page-header">Motifs de modification de service dû</h1> <h1 class="page-header">Motifs de modification de service dû</h1>
<table class="table table-bordered table-sort"> <table class="table table-bordered table-sort">
<thead> <thead>
<th style="word-wrap: break-word ; ">Code</th> <th style="word-wrap: break-word ; ">Code</th>
<th style="word-wrap: break-word ; ">Libelle</th> <th style="word-wrap: break-word ; ">Libelle</th>
<th style="word-wrap: break-word ; ">Multiplicateur</th> <th style="word-wrap: break-word ; ">Multiplicateur</th>
<th style="word-wrap: break-word ; " title="Le dépassement du service dû ne donnera pas lieu à des heures complémentaires (comme par exemple pour une décharge)">Pas d'heures complémentaires</th> <th style="word-wrap: break-word ; "
<?php if ($canEdit) echo '<th>Actions</th>' ?> title="Le dépassement du service dû ne donnera pas lieu à des heures complémentaires (comme par exemple pour une décharge)">
</thead> Pas d'heures complémentaires
<tbody> </th>
<?php foreach ($motifModificationServices as $fr): ?> <?php if ($canEdit) echo '<th>Actions</th>' ?>
<tr> </thead>
<td style="word-wrap: break-word ; "><?= $fr->getCode() ?></td> <tbody>
<td style="word-wrap: break-word ; "><?= $fr->getLibelle() ?></td> <?php foreach ($motifModificationServices as $fr): ?>
<td style="word-wrap: break-word ; "><?= $fr->getMultiplicateur() ?></td> <tr>
<td style="word-wrap: break-word ; "><?= affBooleen($fr->getDecharge()) ?></td> <td style="word-wrap: break-word ; "><?= $fr->getCode() ?></td>
<?php if ($canEdit) { ?> <td style="word-wrap: break-word ; "><?= $fr->getLibelle() ?></td>
<td style="text-align:center;width:1px;white-space: nowrap"> <td style="word-wrap: break-word ; "><?= $fr->getMultiplicateur() ?></td>
<a class="ajax-modal" data-event="motif-modification-service-saisie" <td style="word-wrap: break-word ; "><?= affBooleen($fr->getDecharge()) ?></td>
href="<?= $this->url('motif-modification-service/saisie', ['motif-modification-service' => $fr->getId()]) ?>" <?php if ($canEdit) { ?>
title="Modifier le Motif de Modificationde Service dû"> <td style="text-align:center;width:1px;white-space: nowrap">
<span class="glyphicon glyphicon-edit"></span></a> <a class="ajax-modal" data-event="motif-modification-service-saisie"
<a class="pop-ajax" href="<?= $this->url('motif-modification-service/saisie', ['motifModificationServiceDu' => $fr->getId()]) ?>"
href="<?= $this->url('motif-modification-service/delete', ['motif-modification-service' => $fr->getId()]) ?>" title="Modifier le Motif de Modificationde Service dû">
title="Supprimer le Motif de Modificationde Service dû" <span class="glyphicon glyphicon-edit"></span></a>
data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>" <a class="pop-ajax"
data-confirm="true" href="<?= $this->url('motif-modification-service/delete', ['motifModificationServiceDu' => $fr->getId()]) ?>"
data-confirm-button="Oui" title="Supprimer le Motif de Modificationde Service dû"
data-cancel-button="Non" data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>"
data-submit-reload="true" data-confirm="true"
> data-confirm-button="Oui"
<span class="glyphicon glyphicon-remove"></span> data-cancel-button="Non"
</a> data-submit-reload="true"
</td> >
<?php } ?> <span class="glyphicon glyphicon-remove"></span>
</tr> </a>
<?php endforeach; ?> </td>
</tbody> <?php } ?>
</table> </tr>
<?php if ($canEdit): ?> <?php endforeach; ?>
</tbody>
</table>
<?php if ($canEdit): ?>
<a class="btn btn-primary ajax-modal" data-event="motif-modification-service-saisie" <a class="btn btn-primary ajax-modal" data-event="motif-modification-service-saisie"
href="<?= $this->url('motif-modification-service/saisie') ?>" href="<?= $this->url('motif-modification-service/saisie') ?>"
title="Ajouter un motif de modification du service dû"> title="Ajouter un motif de modification du service dû">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment