Loading module/Application/src/Application/Controller/ServiceController.php −2 Changes for module/Application/src/Application/Controller/ServiceController.php: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ use Application\Service\Traits\LocalContextServiceAwareTrait; use Application\Service\Traits\ParametresServiceAwareTrait; use Application\Service\Traits\RegleStructureValidationServiceAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use UnicaenApp\View\Model\CsvModel; use UnicaenApp\View\Model\MessengerViewModel; use Zend\Http\Request; use Application\Entity\Db\Intervenant; Loading Loading @@ -67,7 +66,6 @@ class ServiceController extends AbstractController use EtatSortieServiceAwareTrait; /** * Initialisation des filtres Doctrine pour les historique. * Objectif : laisser passer les enregistrements passés en historique pour mettre en évidence ensuite les erreurs Loading module/Application/src/Application/Controller/VolumeHoraireController.php +6 −5 Changes for module/Application/src/Application/Controller/VolumeHoraireController.php: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ class VolumeHoraireController extends AbstractController use SaisieCalendaireAwareTrait; public function listeAction() { $this->em()->getFilters()->enable('historique')->init([ Loading Loading @@ -86,7 +85,6 @@ class VolumeHoraireController extends AbstractController } $volumeHoraireListe = new VolumeHoraireListe($service); $hDeb = $volumeHoraireListe->getHeures(); $vhlph = new ListeFilterHydrator(); $vhlph->setEntityManager($this->em()); $vhlph->hydrate($this->params()->fromQuery() + $this->params()->fromPost(), $volumeHoraireListe); Loading @@ -95,20 +93,23 @@ class VolumeHoraireController extends AbstractController $canViewMNP = $this->isAllowed($service->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_VISUALISATION); $canEditMNP = $canViewMNP && $this->isAllowed($service->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_EDITION); $hDeb = $volumeHoraireListe->getHeures(); $form->setViewMNP($canViewMNP); $form->setEditMNP($canEditMNP); $form->build(); $form->bindRequestSave($volumeHoraireListe, $this->getRequest(), function (VolumeHoraireListe $vhl) use ($hDeb) { $form->bindRequestSave($volumeHoraireListe, $this->getRequest(), function (VolumeHoraireListe $vhl) use ($hDeb, $volumeHoraireListe) { try { $service = $vhl->getService(); $this->getProcessusPlafond()->beginTransaction(); $this->getServiceService()->save($service); $hFin = $vhl->getHeures(); $hFin = $volumeHoraireListe->getHeures(); $this->updateTableauxBord($service->getIntervenant()); if (!$this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $vhl->getTypeVolumeHoraire(), $hFin < $hDeb)) { $this->updateTableauxBord($service->getIntervenant()); } } else { $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); } } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } Loading Loading
module/Application/src/Application/Controller/ServiceController.php −2 Changes for module/Application/src/Application/Controller/ServiceController.php: 0 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ use Application\Service\Traits\LocalContextServiceAwareTrait; use Application\Service\Traits\ParametresServiceAwareTrait; use Application\Service\Traits\RegleStructureValidationServiceAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use UnicaenApp\View\Model\CsvModel; use UnicaenApp\View\Model\MessengerViewModel; use Zend\Http\Request; use Application\Entity\Db\Intervenant; Loading Loading @@ -67,7 +66,6 @@ class ServiceController extends AbstractController use EtatSortieServiceAwareTrait; /** * Initialisation des filtres Doctrine pour les historique. * Objectif : laisser passer les enregistrements passés en historique pour mettre en évidence ensuite les erreurs Loading
module/Application/src/Application/Controller/VolumeHoraireController.php +6 −5 Changes for module/Application/src/Application/Controller/VolumeHoraireController.php: 6 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ class VolumeHoraireController extends AbstractController use SaisieCalendaireAwareTrait; public function listeAction() { $this->em()->getFilters()->enable('historique')->init([ Loading Loading @@ -86,7 +85,6 @@ class VolumeHoraireController extends AbstractController } $volumeHoraireListe = new VolumeHoraireListe($service); $hDeb = $volumeHoraireListe->getHeures(); $vhlph = new ListeFilterHydrator(); $vhlph->setEntityManager($this->em()); $vhlph->hydrate($this->params()->fromQuery() + $this->params()->fromPost(), $volumeHoraireListe); Loading @@ -95,20 +93,23 @@ class VolumeHoraireController extends AbstractController $canViewMNP = $this->isAllowed($service->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_VISUALISATION); $canEditMNP = $canViewMNP && $this->isAllowed($service->getIntervenant(), Privileges::MOTIF_NON_PAIEMENT_EDITION); $hDeb = $volumeHoraireListe->getHeures(); $form->setViewMNP($canViewMNP); $form->setEditMNP($canEditMNP); $form->build(); $form->bindRequestSave($volumeHoraireListe, $this->getRequest(), function (VolumeHoraireListe $vhl) use ($hDeb) { $form->bindRequestSave($volumeHoraireListe, $this->getRequest(), function (VolumeHoraireListe $vhl) use ($hDeb, $volumeHoraireListe) { try { $service = $vhl->getService(); $this->getProcessusPlafond()->beginTransaction(); $this->getServiceService()->save($service); $hFin = $vhl->getHeures(); $hFin = $volumeHoraireListe->getHeures(); $this->updateTableauxBord($service->getIntervenant()); if (!$this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $vhl->getTypeVolumeHoraire(), $hFin < $hDeb)) { $this->updateTableauxBord($service->getIntervenant()); } } else { $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); } } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } Loading