Loading module/Application/src/Entity/Db/Intervenant.php +2 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ use Laminas\Hydrator\ClassMethodsHydrator; use Laminas\Permissions\Acl\Resource\ResourceInterface; use Mission\Entity\Db\Mission; use OffreFormation\Entity\Db\Traits\DisciplineAwareTrait; use Plafond\Interfaces\PlafondDataInterface; use Service\Entity\Db\EtatVolumeHoraire; use Service\Entity\Db\HistoIntervenantService; use Service\Entity\Db\ModificationServiceDu; Loading @@ -36,7 +37,7 @@ use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; * Intervenant * */ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, EntityManagerAwareInterface, AdresseInterface class Intervenant implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, EntityManagerAwareInterface, AdresseInterface, PlafondDataInterface { use AnneeAwareTrait; use StructureAwareTrait; Loading module/Application/src/Entity/Db/Structure.php +3 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ use Application\Entity\Traits\AdresseTrait; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Laminas\Permissions\Acl\Resource\ResourceInterface; use Plafond\Interfaces\PlafondDataInterface; use Plafond\Interfaces\PlafondPerimetreInterface; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\ImportAwareInterface; Loading @@ -14,7 +16,7 @@ use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; /** * Structure */ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, PlafondPerimetreInterface, PlafondDataInterface { use AdresseTrait; use ImportAwareTrait; Loading module/Enseignement/src/Controller/EnseignementController.php +2 −2 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ class EnseignementController extends AbstractController $form->get('service')->get('id')->setValue($service->getId()); // transmet le nouvel ID $hFin = $service->getVolumeHoraireListe()->getHeures(); $this->updateTableauxBord($service->getIntervenant()); if (!$this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $typeVolumeHoraire, $hFin < $hDeb)) { if (!$this->getProcessusPlafond()->endTransaction($service, $typeVolumeHoraire, $hFin < $hDeb)) { $this->updateTableauxBord($service->getIntervenant()); } } catch (\Exception $e) { Loading Loading @@ -302,7 +302,7 @@ class EnseignementController extends AbstractController } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } $this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $typeVolumeHoraire, true); $this->getProcessusPlafond()->endTransaction($service, $typeVolumeHoraire, true); } return new MessengerViewModel; Loading module/Enseignement/src/Controller/VolumeHoraireController.php +7 −2 Original line number Diff line number Diff line Loading @@ -65,18 +65,21 @@ class VolumeHoraireController extends AbstractController } public function saisieAction() { return $this->saisieMixte($this->getFormVolumeHoraireSaisie()); } public function saisieCalendaireAction() { return $this->saisieMixte($this->getFormVolumeHoraireSaisieCalendaire()); } private function saisieMixte(AbstractForm $form) { $this->em()->getFilters()->enable('historique')->init([ Loading Loading @@ -124,7 +127,7 @@ class VolumeHoraireController extends AbstractController $this->getServiceService()->save($service); $hFin = $volumeHoraireListe->getHeures(); $this->updateTableauxBord($service->getIntervenant()); if (!$this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $vhl->getTypeVolumeHoraire(), $hFin < $hDeb)) { if (!$this->getProcessusPlafond()->endTransaction($service, $vhl->getTypeVolumeHoraire(), $hFin < $hDeb)) { $this->updateTableauxBord($service->getIntervenant()); } else { $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); Loading @@ -138,6 +141,7 @@ class VolumeHoraireController extends AbstractController } public function suppressionCalendaireAction() { /** @var Service $service */ Loading @@ -159,7 +163,7 @@ class VolumeHoraireController extends AbstractController $this->getProcessusPlafond()->beginTransaction(); $this->getServiceService()->save($service); $this->updateTableauxBord($service->getIntervenant()); $this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $volumeHoraireListe->getTypeVolumeHoraire(), true); $this->getProcessusPlafond()->endTransaction($service, $volumeHoraireListe->getTypeVolumeHoraire(), true); $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); Loading @@ -169,6 +173,7 @@ class VolumeHoraireController extends AbstractController } private function updateTableauxBord(Intervenant $intervenant) { $this->getServiceWorkflow()->calculerTableauxBord([ Loading module/Enseignement/src/Entity/Db/Service.php +2 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Enseignement\Entity\VolumeHoraireListe; use Laminas\Permissions\Acl\Resource\ResourceInterface; use OffreFormation\Entity\Db\ElementPedagogique; use OffreFormation\Entity\Db\TypeIntervention; use Plafond\Interfaces\PlafondDataInterface; use Service\Entity\Db\EtatVolumeHoraire; use Service\Entity\Db\TypeVolumeHoraire; use UnicaenApp\Entity\HistoriqueAwareInterface; Loading @@ -21,7 +22,7 @@ use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\ImportAwareInterface; use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; class Service implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface class Service implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, PlafondDataInterface { use HistoriqueAwareTrait; use ImportAwareTrait; Loading Loading
module/Application/src/Entity/Db/Intervenant.php +2 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ use Laminas\Hydrator\ClassMethodsHydrator; use Laminas\Permissions\Acl\Resource\ResourceInterface; use Mission\Entity\Db\Mission; use OffreFormation\Entity\Db\Traits\DisciplineAwareTrait; use Plafond\Interfaces\PlafondDataInterface; use Service\Entity\Db\EtatVolumeHoraire; use Service\Entity\Db\HistoIntervenantService; use Service\Entity\Db\ModificationServiceDu; Loading @@ -36,7 +37,7 @@ use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; * Intervenant * */ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, EntityManagerAwareInterface, AdresseInterface class Intervenant implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, EntityManagerAwareInterface, AdresseInterface, PlafondDataInterface { use AnneeAwareTrait; use StructureAwareTrait; Loading
module/Application/src/Entity/Db/Structure.php +3 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ use Application\Entity\Traits\AdresseTrait; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Laminas\Permissions\Acl\Resource\ResourceInterface; use Plafond\Interfaces\PlafondDataInterface; use Plafond\Interfaces\PlafondPerimetreInterface; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\ImportAwareInterface; Loading @@ -14,7 +16,7 @@ use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; /** * Structure */ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, PlafondPerimetreInterface, PlafondDataInterface { use AdresseTrait; use ImportAwareTrait; Loading
module/Enseignement/src/Controller/EnseignementController.php +2 −2 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ class EnseignementController extends AbstractController $form->get('service')->get('id')->setValue($service->getId()); // transmet le nouvel ID $hFin = $service->getVolumeHoraireListe()->getHeures(); $this->updateTableauxBord($service->getIntervenant()); if (!$this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $typeVolumeHoraire, $hFin < $hDeb)) { if (!$this->getProcessusPlafond()->endTransaction($service, $typeVolumeHoraire, $hFin < $hDeb)) { $this->updateTableauxBord($service->getIntervenant()); } } catch (\Exception $e) { Loading Loading @@ -302,7 +302,7 @@ class EnseignementController extends AbstractController } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } $this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $typeVolumeHoraire, true); $this->getProcessusPlafond()->endTransaction($service, $typeVolumeHoraire, true); } return new MessengerViewModel; Loading
module/Enseignement/src/Controller/VolumeHoraireController.php +7 −2 Original line number Diff line number Diff line Loading @@ -65,18 +65,21 @@ class VolumeHoraireController extends AbstractController } public function saisieAction() { return $this->saisieMixte($this->getFormVolumeHoraireSaisie()); } public function saisieCalendaireAction() { return $this->saisieMixte($this->getFormVolumeHoraireSaisieCalendaire()); } private function saisieMixte(AbstractForm $form) { $this->em()->getFilters()->enable('historique')->init([ Loading Loading @@ -124,7 +127,7 @@ class VolumeHoraireController extends AbstractController $this->getServiceService()->save($service); $hFin = $volumeHoraireListe->getHeures(); $this->updateTableauxBord($service->getIntervenant()); if (!$this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $vhl->getTypeVolumeHoraire(), $hFin < $hDeb)) { if (!$this->getProcessusPlafond()->endTransaction($service, $vhl->getTypeVolumeHoraire(), $hFin < $hDeb)) { $this->updateTableauxBord($service->getIntervenant()); } else { $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); Loading @@ -138,6 +141,7 @@ class VolumeHoraireController extends AbstractController } public function suppressionCalendaireAction() { /** @var Service $service */ Loading @@ -159,7 +163,7 @@ class VolumeHoraireController extends AbstractController $this->getProcessusPlafond()->beginTransaction(); $this->getServiceService()->save($service); $this->updateTableauxBord($service->getIntervenant()); $this->getProcessusPlafond()->endTransaction($service->getIntervenant(), $volumeHoraireListe->getTypeVolumeHoraire(), true); $this->getProcessusPlafond()->endTransaction($service, $volumeHoraireListe->getTypeVolumeHoraire(), true); $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); Loading @@ -169,6 +173,7 @@ class VolumeHoraireController extends AbstractController } private function updateTableauxBord(Intervenant $intervenant) { $this->getServiceWorkflow()->calculerTableauxBord([ Loading
module/Enseignement/src/Entity/Db/Service.php +2 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ use Enseignement\Entity\VolumeHoraireListe; use Laminas\Permissions\Acl\Resource\ResourceInterface; use OffreFormation\Entity\Db\ElementPedagogique; use OffreFormation\Entity\Db\TypeIntervention; use Plafond\Interfaces\PlafondDataInterface; use Service\Entity\Db\EtatVolumeHoraire; use Service\Entity\Db\TypeVolumeHoraire; use UnicaenApp\Entity\HistoriqueAwareInterface; Loading @@ -21,7 +22,7 @@ use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\ImportAwareInterface; use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; class Service implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface class Service implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, PlafondDataInterface { use HistoriqueAwareTrait; use ImportAwareTrait; Loading