Loading module/Application/config/administration.config.php +2 −2 Changes for module/Application/config/administration.config.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ return [ 'border - color' => '#111', 'pages' => [ 'statut-intervenant' => [ 'label' => 'Edition des status des intervenants', 'label' => 'Edition des statuts des intervenants', 'icon' => 'fa fa-graduation-cap', 'route' => 'statut-intervenant', 'resource' => PrivilegeController::getResourceId('Application\Controller\StatutIntervenant', 'index'), Loading @@ -89,7 +89,7 @@ return [ 'resource' => PrivilegeController::getResourceId('Application\Controller\PieceJointe', 'type-piece-jointe-statut'), ], 'validation-volume-horaire-type-intervenant' => [ 'label' => "Validation des volumes horaires par type d'intervenant", 'label' => "Règles de validation par type d'intervenant", 'title' => "Permet de définir les priorités de validation de volumes horaires par type d'intervenant", 'route' => 'validation-volume-horaire-type-intervenant', 'withtarget' => true, Loading module/Application/config/intervenant.config.php +5 −2 Changes for module/Application/config/intervenant.config.php: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ return [ 'regleStructureValidation' => '[0-9]*', ], 'defaults' => [ 'action' => 'delete', 'action' => 'validation-volume-horaire-type-intervenant-delete', ], ], ], Loading Loading @@ -473,7 +473,10 @@ return [ ], [ 'controller' => 'Application\Controller\Intervenant', 'action' => ['validation-volume-horaire-type-intervenant', 'validation-volume-horaire-type-intervenant-saisie'], 'action' => ['validation-volume-horaire-type-intervenant', 'validation-volume-horaire-type-intervenant-saisie', 'validation-volume-horaire-type-intervenant-delete', ], 'privileges' => [ Privileges::MODIF_SERVICE_DU_EDITION, ], Loading module/Application/src/Application/Controller/IntervenantController.php +20 Changes for module/Application/src/Application/Controller/IntervenantController.php: 20 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -401,13 +401,33 @@ class IntervenantController extends AbstractController $this->getServiceRegleStructureValidation()->save($rsv); $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); } catch (\Exception $e) { $message = $this->translate($e); if (false !== strpos($message, 'ORA-00001')) { $this->flashMessenger()->addErrorMessage("Règle non enregistrée car elle existe déjà dans OSE"); } else{ $this->flashMessenger()->addErrorMessage($this->translate($e)); } } }); return compact('form', 'title'); } public function validationVolumeHoraireTypeIntervenantDeleteAction() { $regleStructureValidation = $this->getEvent()->getParam('regleStructureValidation'); try { $this->getServiceRegleStructureValidation()->delete($regleStructureValidation); $this->flashMessenger()->addSuccessMessage("Règle supprimée avec succès."); } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } return new MessengerViewModel(compact('regleStructureValidation')); } /** Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.RegleStructureValidation.dcm.xml +1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.RegleStructureValidation.dcm.xml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ <entity name="Application\Entity\Db\RegleStructureValidation" table="REGLE_STRUCTURE_VALIDATION"> <id name="id" type="integer" column="ID"> <generator strategy="SEQUENCE"/> <sequence-generator sequence-name="REGLE_STRUCTURE_VALIDAT_ID_SEQ" allocation-size="1"/> </id> <field name="priorite" type="string" column="PRIORITE" length="20" nullable="false"/> <field name="message" type="string" column="MESSAGE" length="500" nullable="true"/> Loading module/Application/src/Application/Hydrator/RegleStructureValidationHydrator.php +11 −2 Changes for module/Application/src/Application/Hydrator/RegleStructureValidationHydrator.php: 11 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,10 +2,15 @@ namespace Application\Hydrator; use Application\Service\Traits\TypeIntervenantServiceAwareTrait; use Application\Service\Traits\TypeVolumeHoraireServiceAwareTrait; use Zend\Hydrator\HydratorInterface; class RegleStructureValidationHydrator implements HydratorInterface { use TypeVolumeHoraireServiceAwareTrait; use TypeIntervenantServiceAwareTrait; /** * Hydrate $object with the provided $data. * Loading @@ -18,8 +23,12 @@ class RegleStructureValidationHydrator implements HydratorInterface { $object->setMessage($data['message']); $object->setPriorite($data['priorite']); $object->setTypeVolumeHoraire($data['type-volume-horaire']); $object->setTypeIntervenant($data['type-intervenant']); if (array_key_exists('type-volume-horaire', $data)) { $object->setTypeVolumeHoraire($this->getServiceTypeVolumeHoraire()->get($data['type-volume-horaire'])); } if (array_key_exists('type-intervenant', $data)) { $object->setTypeIntervenant($this->getServiceTypeIntervenant()->get($data['type-intervenant'])); } return $object; } Loading Loading
module/Application/config/administration.config.php +2 −2 Changes for module/Application/config/administration.config.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ return [ 'border - color' => '#111', 'pages' => [ 'statut-intervenant' => [ 'label' => 'Edition des status des intervenants', 'label' => 'Edition des statuts des intervenants', 'icon' => 'fa fa-graduation-cap', 'route' => 'statut-intervenant', 'resource' => PrivilegeController::getResourceId('Application\Controller\StatutIntervenant', 'index'), Loading @@ -89,7 +89,7 @@ return [ 'resource' => PrivilegeController::getResourceId('Application\Controller\PieceJointe', 'type-piece-jointe-statut'), ], 'validation-volume-horaire-type-intervenant' => [ 'label' => "Validation des volumes horaires par type d'intervenant", 'label' => "Règles de validation par type d'intervenant", 'title' => "Permet de définir les priorités de validation de volumes horaires par type d'intervenant", 'route' => 'validation-volume-horaire-type-intervenant', 'withtarget' => true, Loading
module/Application/config/intervenant.config.php +5 −2 Changes for module/Application/config/intervenant.config.php: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ return [ 'regleStructureValidation' => '[0-9]*', ], 'defaults' => [ 'action' => 'delete', 'action' => 'validation-volume-horaire-type-intervenant-delete', ], ], ], Loading Loading @@ -473,7 +473,10 @@ return [ ], [ 'controller' => 'Application\Controller\Intervenant', 'action' => ['validation-volume-horaire-type-intervenant', 'validation-volume-horaire-type-intervenant-saisie'], 'action' => ['validation-volume-horaire-type-intervenant', 'validation-volume-horaire-type-intervenant-saisie', 'validation-volume-horaire-type-intervenant-delete', ], 'privileges' => [ Privileges::MODIF_SERVICE_DU_EDITION, ], Loading
module/Application/src/Application/Controller/IntervenantController.php +20 Changes for module/Application/src/Application/Controller/IntervenantController.php: 20 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -401,13 +401,33 @@ class IntervenantController extends AbstractController $this->getServiceRegleStructureValidation()->save($rsv); $this->flashMessenger()->addSuccessMessage('Enregistrement effectué'); } catch (\Exception $e) { $message = $this->translate($e); if (false !== strpos($message, 'ORA-00001')) { $this->flashMessenger()->addErrorMessage("Règle non enregistrée car elle existe déjà dans OSE"); } else{ $this->flashMessenger()->addErrorMessage($this->translate($e)); } } }); return compact('form', 'title'); } public function validationVolumeHoraireTypeIntervenantDeleteAction() { $regleStructureValidation = $this->getEvent()->getParam('regleStructureValidation'); try { $this->getServiceRegleStructureValidation()->delete($regleStructureValidation); $this->flashMessenger()->addSuccessMessage("Règle supprimée avec succès."); } catch (\Exception $e) { $this->flashMessenger()->addErrorMessage($this->translate($e)); } return new MessengerViewModel(compact('regleStructureValidation')); } /** Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.RegleStructureValidation.dcm.xml +1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.RegleStructureValidation.dcm.xml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ <entity name="Application\Entity\Db\RegleStructureValidation" table="REGLE_STRUCTURE_VALIDATION"> <id name="id" type="integer" column="ID"> <generator strategy="SEQUENCE"/> <sequence-generator sequence-name="REGLE_STRUCTURE_VALIDAT_ID_SEQ" allocation-size="1"/> </id> <field name="priorite" type="string" column="PRIORITE" length="20" nullable="false"/> <field name="message" type="string" column="MESSAGE" length="500" nullable="true"/> Loading
module/Application/src/Application/Hydrator/RegleStructureValidationHydrator.php +11 −2 Changes for module/Application/src/Application/Hydrator/RegleStructureValidationHydrator.php: 11 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -2,10 +2,15 @@ namespace Application\Hydrator; use Application\Service\Traits\TypeIntervenantServiceAwareTrait; use Application\Service\Traits\TypeVolumeHoraireServiceAwareTrait; use Zend\Hydrator\HydratorInterface; class RegleStructureValidationHydrator implements HydratorInterface { use TypeVolumeHoraireServiceAwareTrait; use TypeIntervenantServiceAwareTrait; /** * Hydrate $object with the provided $data. * Loading @@ -18,8 +23,12 @@ class RegleStructureValidationHydrator implements HydratorInterface { $object->setMessage($data['message']); $object->setPriorite($data['priorite']); $object->setTypeVolumeHoraire($data['type-volume-horaire']); $object->setTypeIntervenant($data['type-intervenant']); if (array_key_exists('type-volume-horaire', $data)) { $object->setTypeVolumeHoraire($this->getServiceTypeVolumeHoraire()->get($data['type-volume-horaire'])); } if (array_key_exists('type-intervenant', $data)) { $object->setTypeIntervenant($this->getServiceTypeIntervenant()->get($data['type-intervenant'])); } return $object; } Loading