diff --git a/composer.json b/composer.json index 0114580cdc6815bcfcdeafbc62e91e949861434b..ece737e99be4be5a98f1d083acd54cbbc0571a12 100755 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "minimum-stability": "dev", "require": { "unicaen/app": "3.2.0", - "unicaen/authentification": "dev-master", + "unicaen/authentification": "^1.1.0", "unicaen/utilisateur": "dev-master", "unicaen/privilege": "dev-master", "unicaen/renderer": "dev-master", diff --git a/documentation/001-BD_BIBLIOTHEQUE.sql b/documentation/001-BD_BIBLIOTHEQUE.sql index ca7c5a619f59260fb15123f41f9dd31664857236..bff088fcc39fa3061ccbae22e47f6e1d00d4b7dc 100644 --- a/documentation/001-BD_BIBLIOTHEQUE.sql +++ b/documentation/001-BD_BIBLIOTHEQUE.sql @@ -453,7 +453,7 @@ create table unicaen_autoform_validation_reponse create unique index validation_reponse_id_uindex on unicaen_autoform_validation_reponse (id); --- --------------------------------------------------------------------------------------------------------------------- +-- FICHIER ------------------------------------------------------------------------------------------------------------- create table fichier_nature ( diff --git a/documentation/002-BD_EMC2.sql b/documentation/002-BD_EMC2.sql index 2b99a5a3b16adfe4c74437ddaed85b44dd154198..3ddfa92c6655313eaa920614f5acde5a3ab376c2 100644 --- a/documentation/002-BD_EMC2.sql +++ b/documentation/002-BD_EMC2.sql @@ -511,8 +511,6 @@ create table formation_instance_formateur nom varchar(256) not null, email varchar(1024), attachement varchar(1024), - volume double precision, - montant double precision, histo_creation timestamp not null, histo_createur_id integer not null constraint formation_instance_formateur_user_id_fk references unicaen_utilisateur_user, histo_modification timestamp, diff --git a/module/Application/src/Application/View/Helper/partial/fiches-postes-as-table.phtml b/module/Application/src/Application/View/Helper/partial/fiches-postes-as-table.phtml index 7aae6c91e0aace522c32cd760bb74e0709e0acfc..02858e4efd5f9a8e6b9792931a144bc3f5b8778c 100644 --- a/module/Application/src/Application/View/Helper/partial/fiches-postes-as-table.phtml +++ b/module/Application/src/Application/View/Helper/partial/fiches-postes-as-table.phtml @@ -65,8 +65,8 @@ if ($retour) $query['retour'] = $retour; $destruction = $fiche->getHistoDestruction(); $agentId = ($fiche->getAgent())?$fiche->getAgent()->getId():null; $agent = ($fiche->getAgent())?$fiche->getAgent()->getDenomination():null; - $structureId = ($fiche->getAgent())?$fiche->getAgent()->getAffectationPrincipale()->getStructure()->getId():null; - $structure = ($fiche->getAgent())?$fiche->getAgent()->getAffectationPrincipale()->getStructure()->getLibelleCourt():null; + $structureId = ($fiche->getAgent() AND $fiche->getAgent()->getAffectationPrincipale())?$fiche->getAgent()->getAffectationPrincipale()->getStructure()->getId():null; + $structure = ($fiche->getAgent() AND $fiche->getAgent()->getAffectationPrincipale())?$fiche->getAgent()->getAffectationPrincipale()->getStructure()->getLibelleCourt():null; $fichePrincipale = ($fiche->toStringFicheMetierPrincipal() !== '')?$fiche->toStringFicheMetierPrincipal():null; $ficheLibelle = ($fiche->getLibelle() !== '')?$fiche->getLibelle():null; $isEnCours = $fiche->isEnCours(); diff --git a/module/Element/config/merged/application-element.config.php b/module/Element/config/merged/application-element.config.php index d35896d1fc05f73e9a0ff5215bee827881bf0383..64f14838595ce00ee22d7028aec30878b206cb8a 100644 --- a/module/Element/config/merged/application-element.config.php +++ b/module/Element/config/merged/application-element.config.php @@ -4,6 +4,8 @@ namespace Element; use Element\Form\ApplicationElement\ApplicationElementForm; use Element\Form\ApplicationElement\ApplicationElementFormFactory; +use Element\Form\ApplicationElement\ApplicationElementHydrator; +use Element\Form\ApplicationElement\ApplicationElementHydratorFactory; use Element\Service\ApplicationElement\ApplicationElementService; use Element\Service\ApplicationElement\ApplicationElementServiceFactory; use UnicaenPrivilege\Guard\PrivilegeController; @@ -39,7 +41,9 @@ return [ ], ], 'hydrators' => [ - 'factories' => [], + 'factories' => [ + ApplicationElementHydrator::class => ApplicationElementHydratorFactory::class, + ], ] ]; \ No newline at end of file diff --git a/module/Element/config/merged/competence-element.config.php b/module/Element/config/merged/competence-element.config.php index 122aa04b7195972f593ebf89264fdae5c5feda38..698645e8cec361e8803cc1f9541ed9977261ff3f 100644 --- a/module/Element/config/merged/competence-element.config.php +++ b/module/Element/config/merged/competence-element.config.php @@ -4,6 +4,8 @@ namespace Element; use Element\Form\CompetenceElement\CompetenceElementForm; use Element\Form\CompetenceElement\CompetenceElementFormFactory; +use Element\Form\CompetenceElement\CompetenceElementHydrator; +use Element\Form\CompetenceElement\CompetenceElementHydratorFactory; use Element\Service\CompetenceElement\CompetenceElementService; use Element\Service\CompetenceElement\CompetenceElementServiceFactory; use UnicaenPrivilege\Guard\PrivilegeController; @@ -38,7 +40,9 @@ return [ ], ], 'hydrators' => [ - 'factories' => [], + 'factories' => [ + CompetenceElementHydrator::class => CompetenceElementHydratorFactory::class, + ], ] ]; \ No newline at end of file diff --git a/module/EntretienProfessionnel/src/EntretienProfessionnel/Entity/Db/EntretienProfessionnel.php b/module/EntretienProfessionnel/src/EntretienProfessionnel/Entity/Db/EntretienProfessionnel.php index 9b11e66a2c4672d91aa98eda9a4722ed2ecfebf2..f36af1e3ab9e5db2a14d54c382d3524e0a64cf7d 100644 --- a/module/EntretienProfessionnel/src/EntretienProfessionnel/Entity/Db/EntretienProfessionnel.php +++ b/module/EntretienProfessionnel/src/EntretienProfessionnel/Entity/Db/EntretienProfessionnel.php @@ -628,7 +628,8 @@ class EntretienProfessionnel implements HistoriqueAwareInterface, ResourceInterf public function toStringCREP_Champ($motsClefs) { $mots = explode(";", $motsClefs); - return $this->formulaireInstance->fetchChampReponseByMotsClefs($mots); + $texte = $this->formulaireInstance->fetchChampReponseByMotsClefs($mots); + return str_replace("_"," ",$texte); } /** MACRO du CREF *************************************************************************************************/ diff --git a/module/Formation/config/merged/formation-groupe.config.php b/module/Formation/config/merged/formation-groupe.config.php index cf7846d2651338848b90947392c4f4b0e1febb7d..5ed84b158dbb727b652b8cf68afc46f4b70f871a 100644 --- a/module/Formation/config/merged/formation-groupe.config.php +++ b/module/Formation/config/merged/formation-groupe.config.php @@ -33,7 +33,7 @@ return [ [ 'controller' => FormationGroupeController::class, 'action' => [ - 'afficher-groupe', + 'afficher', ], 'privileges' => [ FormationgroupePrivileges::FORMATIONGROUPE_AFFICHER, @@ -120,7 +120,7 @@ return [ 'route' => '/afficher/:formation-groupe', 'defaults' => [ 'controller' => FormationGroupeController::class, - 'action' => 'afficher-groupe', + 'action' => 'afficher', ], ], ], diff --git a/module/Formation/config/merged/formation.config.php b/module/Formation/config/merged/formation.config.php index f3d16ca312d827c733ae612f899338b142d9cd1a..7db87729fb222956028b64074c6292fe7f16b33b 100644 --- a/module/Formation/config/merged/formation.config.php +++ b/module/Formation/config/merged/formation.config.php @@ -123,7 +123,7 @@ return [ 'ressource' => [ 'pages' => [ 'formation_' => [ - 'label' => 'Formations', + 'label' => 'Actions de formation', 'route' => 'formation', 'resource' => PrivilegeController::getResourceId(FormationController::class, 'index') , 'order' => 310, diff --git a/module/Formation/src/Formation/Assertion/FormationInstanceInscritAssertion.php b/module/Formation/src/Formation/Assertion/FormationInstanceInscritAssertion.php index 348c92cd131db787cf4ccb64f9fbe12e3bc53066..b87ebea8bda1836da35d0f56494aeae22dee8f15 100644 --- a/module/Formation/src/Formation/Assertion/FormationInstanceInscritAssertion.php +++ b/module/Formation/src/Formation/Assertion/FormationInstanceInscritAssertion.php @@ -19,7 +19,7 @@ class FormationInstanceInscritAssertion extends AbstractAssertion use StructureServiceAwareTrait; use UserServiceAwareTrait; - protected function assertEntity(ResourceInterface $entity = null, $privilege = null) + protected function assertEntity(ResourceInterface $entity = null, $privilege = null): bool { if (!$entity instanceof FormationInstanceInscrit) { return false; @@ -82,7 +82,7 @@ class FormationInstanceInscritAssertion extends AbstractAssertion } } - return false; + return true; } } diff --git a/module/Formation/src/Formation/Controller/FormationController.php b/module/Formation/src/Formation/Controller/FormationController.php index 9643225f1d499e6342b367a3ae99419417be6d54..c6fbd606748a9af68f5075041e48c2d20121c126 100644 --- a/module/Formation/src/Formation/Controller/FormationController.php +++ b/module/Formation/src/Formation/Controller/FormationController.php @@ -2,6 +2,7 @@ namespace Formation\Controller; +use Application\Entity\Db\Interfaces\HasSourceInterface; use Application\Service\ParcoursDeFormation\ParcoursDeFormationServiceAwareTrait; use Element\Entity\Db\ApplicationElement; use Element\Entity\Db\CompetenceElement; @@ -77,7 +78,7 @@ class FormationController extends AbstractActionController $form->setData($data); if ($form->isValid()) { $this->getFormationService()->create($formation); - $formation->setSource(Formation::SOURCE_EMC2); + $formation->setSource(HasSourceInterface::SOURCE_EMC2); $formation->setIdSource($formation->getId()); $this->getFormationService()->update($formation); exit; @@ -196,7 +197,6 @@ class FormationController extends AbstractActionController { $type = $this->params()->fromRoute('type'); $hasApplicationElement = $this->getFormationService()->getRequestedFormation($this); - $clef='masquer'; if ($hasApplicationElement !== null) { $element = new ApplicationElement(); @@ -204,7 +204,7 @@ class FormationController extends AbstractActionController $form = $this->getApplicationElementForm(); $form->setAttribute('action', $this->url()->fromRoute('formation/ajouter-application-element', ['type' => $type, 'id' => $hasApplicationElement->getId()], [], true)); $form->bind($element); - if ($clef === 'masquer') $form->masquerClef(); + $form->masquerClef(); $request = $this->getRequest(); if ($request->isPost()) { @@ -231,7 +231,6 @@ class FormationController extends AbstractActionController { $type = $this->params()->fromRoute('type'); $hasCompetenceElement = $this->getFormationService()->getRequestedFormation($this); - $clef='masquer'; if ($hasCompetenceElement !== null) { $element = new CompetenceElement(); @@ -239,7 +238,7 @@ class FormationController extends AbstractActionController $form = $this->getCompetenceElementForm(); $form->setAttribute('action', $this->url()->fromRoute('formation/ajouter-competence-element', ['type' => $type, 'id' => $hasCompetenceElement->getId()], [], true)); $form->bind($element); - if ($clef === 'masquer') $form->masquerClef(); + $form->masquerClef(); $request = $this->getRequest(); if ($request->isPost()) { @@ -301,8 +300,6 @@ class FormationController extends AbstractActionController $instance->setFormation($formationSub); $this->getFormationInstanceService()->update($instance); } - //décalage des parcours - // TODO décaler dans les parcours de formations //decalage des applications acquises $applications = $formation->getApplicationCollection(); diff --git a/module/Formation/src/Formation/Controller/FormationGroupeController.php b/module/Formation/src/Formation/Controller/FormationGroupeController.php index bc85052e4de73010911c71f9b7d74f4e0fed0b4e..0e43164a1c6fa6a8d7effc1a10ef9c76d54c3bb2 100644 --- a/module/Formation/src/Formation/Controller/FormationGroupeController.php +++ b/module/Formation/src/Formation/Controller/FormationGroupeController.php @@ -20,8 +20,6 @@ class FormationGroupeController extends AbstractActionController use FormationGroupeFormAwareTrait; use SelectionFormationGroupeFormAwareTrait; - /** CRUD **********************************************************************************************************/ - public function indexAction() : ViewModel { $source = $this->params()->fromQuery('source'); @@ -42,7 +40,9 @@ class FormationGroupeController extends AbstractActionController ]); } - public function afficherGroupeAction() : ViewModel + /** CRUD **********************************************************************************************************/ + + public function afficherAction() : ViewModel { $groupe = $this->getFormationGroupeService()->getRequestedFormationGroupe($this); @@ -110,14 +110,20 @@ class FormationGroupeController extends AbstractActionController { $groupe = $this->getFormationGroupeService()->getRequestedFormationGroupe($this); $this->getFormationGroupeService()->historise($groupe); - return $this->redirect()->toRoute('formation', [], [], true); + + $retour = $this->params()->fromQuery('retour'); + if ($retour) return $this->redirect()->toUrl($retour); + return $this->redirect()->toRoute('formation-groupe', [], [], true); } public function restaurerGroupeAction() : Response { $groupe = $this->getFormationGroupeService()->getRequestedFormationGroupe($this); $this->getFormationGroupeService()->restore($groupe); - return $this->redirect()->toRoute('formation', [], [], true); + + $retour = $this->params()->fromQuery('retour'); + if ($retour) return $this->redirect()->toUrl($retour); + return $this->redirect()->toRoute('formation-groupe', [], [], true); } public function detruireGroupeAction() : ViewModel diff --git a/module/Formation/src/Formation/Controller/FormationInstanceFormateurController.php b/module/Formation/src/Formation/Controller/FormationInstanceFormateurController.php index 6777f9bfc6be497fb31797a2754a1282aa85be3a..7cf1c714331cc1f28e6507dff2a08ed0ffd73775 100644 --- a/module/Formation/src/Formation/Controller/FormationInstanceFormateurController.php +++ b/module/Formation/src/Formation/Controller/FormationInstanceFormateurController.php @@ -7,6 +7,7 @@ use Formation\Form\FormationInstanceFormateur\FormationInstanceFormateurFormAwar use Formation\Service\FormationInstance\FormationInstanceServiceAwareTrait; use Formation\Service\FormationInstanceFormateur\FormationInstanceFormateurServiceAwareTrait; use Zend\Http\Request; +use Zend\Http\Response; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; @@ -16,7 +17,7 @@ class FormationInstanceFormateurController extends AbstractActionController use FormationInstanceFormateurServiceAwareTrait; use FormationInstanceFormateurFormAwareTrait; - public function ajouterFormateurAction() + public function ajouterFormateurAction() : ViewModel { $instance = $this->getFormationInstanceService()->getRequestedFormationInstance($this); @@ -45,7 +46,7 @@ class FormationInstanceFormateurController extends AbstractActionController return $vm; } - public function modifierFormateurAction() + public function modifierFormateurAction() : ViewModel { $formateur = $this->getFormationInstanceFormateurService()->getRequestedFormationInstanceFormateur($this); @@ -71,21 +72,21 @@ class FormationInstanceFormateurController extends AbstractActionController return $vm; } - public function historiserFormateurAction() + public function historiserFormateurAction() : Response { $formateur = $this->getFormationInstanceFormateurService()->getRequestedFormationInstanceFormateur($this); $this->getFormationInstanceFormateurService()->historise($formateur); return $this->redirect()->toRoute('formation-instance/afficher', ['formation-instance' => $formateur->getInstance()->getId()], [], true); } - public function restaurerFormateurAction() + public function restaurerFormateurAction() : Response { $formateur = $this->getFormationInstanceFormateurService()->getRequestedFormationInstanceFormateur($this); $this->getFormationInstanceFormateurService()->restore($formateur); return $this->redirect()->toRoute('formation-instance/afficher', ['formation-instance' => $formateur->getInstance()->getId()], [], true); } - public function supprimerFormateurAction() + public function supprimerFormateurAction() : ViewModel { $formateur = $this->getFormationInstanceFormateurService()->getRequestedFormationInstanceFormateur($this); diff --git a/module/Formation/src/Formation/Controller/FormationInstanceInscritController.php b/module/Formation/src/Formation/Controller/FormationInstanceInscritController.php index 9573403ff7f968ad6065e9b9ec31553ed05048f7..5ccc55cfe4fe9155775ab7dbe4bfb7c15fe5c12d 100644 --- a/module/Formation/src/Formation/Controller/FormationInstanceInscritController.php +++ b/module/Formation/src/Formation/Controller/FormationInstanceInscritController.php @@ -154,11 +154,15 @@ class FormationInstanceInscritController extends AbstractActionController $agent = $this->getAgentService()->getAgentByUser($utilisateur); $inscriptions = $this->getFormationInstanceInscritService()->getFormationsByInscrit($agent); + $formations = $this->getFormationInstanceInscritService()->getFormationsBySuivies($agent); + $rendu = $this->getRenduService()->generateRenduByTemplateCode('PARCOURS_ENTREE_TEXTE', []); return new ViewModel([ 'instances' => $instances, 'inscriptions' => $inscriptions, + 'formations' => $formations, 'agent' => $agent, + 'texteParcours' => $rendu->getCorps(), ]); } diff --git a/module/Formation/src/Formation/Entity/Db/FormationInstance.php b/module/Formation/src/Formation/Entity/Db/FormationInstance.php index 26daafd7edeae1d8d9a74d19e2cfa2b9aa00e452..74f956ebbc83b9e10ecc2bb9b674953a334cb835 100644 --- a/module/Formation/src/Formation/Entity/Db/FormationInstance.php +++ b/module/Formation/src/Formation/Entity/Db/FormationInstance.php @@ -54,6 +54,11 @@ class FormationInstance implements HistoriqueAwareInterface, HasSourceInterface, /** @var ArrayCollection (FormationInstanceFormateur) */ private $formateurs; + /** @var float|null */ + private $coutHt; + /** @var float|null */ + private $coutTtc; + /** * @return string */ @@ -210,19 +215,6 @@ class FormationInstance implements HistoriqueAwareInterface, HasSourceInterface, return $this->formateurs->toArray(); } - /** - * @return float - */ - public function getVolumeHoraireSomme() : float - { - $somme = 0; - /** @var FormationInstanceFormateur $formateur */ - foreach ($this->formateurs as $formateur) { - if ($formateur->estNonHistorise() and $formateur->getVolume()) $somme += $formateur->getVolume(); - } - return $somme; - } - /** JOURNEE *******************************************************************************************************/ /** @@ -389,6 +381,40 @@ class FormationInstance implements HistoriqueAwareInterface, HasSourceInterface, return false; } + /** COUT DE LA FORMATION *********************************************************************************/ + + /** + * @return float|null + */ + public function getCoutHt(): ?float + { + return $this->coutHt; + } + + /** + * @param float|null $coutHt + */ + public function setCoutHt(?float $coutHt): void + { + $this->coutHt = $coutHt; + } + + /** + * @return float|null + */ + public function getCoutTtc(): ?float + { + return $this->coutTtc; + } + + /** + * @param float|null $coutTtc + */ + public function setCoutTtc(?float $coutTtc): void + { + $this->coutTtc = $coutTtc; + } + /** Fonctions pour les macros **********************************************************************************/ public function getInstanceLibelle() : string @@ -414,7 +440,6 @@ class FormationInstance implements HistoriqueAwareInterface, HasSourceInterface, $text .= "<tr style='border-bottom:1px solid black;'>"; $text .= "<th>Dénomination </th>"; $text .= "<th>Structure de rattachement </th>"; - $text .= "<th>Volume </th>"; $text .= "</tr>"; $text .= "</thead>"; $text .= "<tbody>"; @@ -422,7 +447,6 @@ class FormationInstance implements HistoriqueAwareInterface, HasSourceInterface, $text .= "<tr>"; $text .= "<td>" . $formateur->getPrenom() . " " . $formateur->getNom() . "</td>"; $text .= "<td>" . $formateur->getAttachement() . "</td>"; - $text .= "<td>" . (($formateur->getVolume()) ?: "N.C.") . "</td>"; $text .= "</tr>"; } $text .= "</tbody>"; diff --git a/module/Formation/src/Formation/Entity/Db/FormationInstanceFormateur.php b/module/Formation/src/Formation/Entity/Db/FormationInstanceFormateur.php index 8246961ed82d7b4bc853b13032fdda03e2a34f68..7b21239ca1c1ed7f33dd7ceb32fa708e092f63b6 100644 --- a/module/Formation/src/Formation/Entity/Db/FormationInstanceFormateur.php +++ b/module/Formation/src/Formation/Entity/Db/FormationInstanceFormateur.php @@ -21,10 +21,6 @@ class FormationInstanceFormateur implements HistoriqueAwareInterface private $email; /** @var string */ private $attachement; - /** @var float */ - private $volume; - /** @var float */ - private $montant; /** * @return int @@ -124,39 +120,4 @@ class FormationInstanceFormateur implements HistoriqueAwareInterface return $this; } - /** - * @return float|null - */ - public function getVolume(): ?float - { - return $this->volume; - } - - /** - * @param float|null $volume - * @return FormationInstanceFormateur - */ - public function setVolume(?float $volume): FormationInstanceFormateur - { - $this->volume = $volume; - return $this; - } - - /** - * @return float|null - */ - public function getMontant(): ?float - { - return $this->montant; - } - - /** - * @param float|null $montant - * @return FormationInstanceFormateur - */ - public function setMontant(?float $montant): FormationInstanceFormateur - { - $this->montant = $montant; - return $this; - } } \ No newline at end of file diff --git a/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstance.dcm.xml b/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstance.dcm.xml index c4f1f298782726de4290e23ec12c638b54759c0a..97280af7bc6bea5122de9e4bbdeed417870a21a2 100644 --- a/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstance.dcm.xml +++ b/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstance.dcm.xml @@ -24,6 +24,9 @@ <one-to-many field="inscrits" target-entity="Formation\Entity\Db\FormationInstanceInscrit" mapped-by="instance"/> <one-to-many field="formateurs" target-entity="Formation\Entity\Db\FormationInstanceFormateur" mapped-by="instance"/> + <field name="coutHt" type="float" column="cout_ht" nullable="true"/> + <field name="coutTtc" type="float" column="cout_ttc" nullable="true"/> + <!-- SOURCE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="source" type="string" length="256" column="source" nullable="true"/> <field name="idSource" type="string" length="256" column="id_source" nullable="true"/> diff --git a/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstanceFormateur.dcm.xml b/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstanceFormateur.dcm.xml index b0ed6e9d3adfa059cba57b8688bfdf781df08e67..ce83095647d681897943145c5df553332f663eff 100644 --- a/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstanceFormateur.dcm.xml +++ b/module/Formation/src/Formation/Entity/Db/Mapping/Formation.Entity.Db.FormationInstanceFormateur.dcm.xml @@ -14,8 +14,6 @@ <field name="nom" column="nom" type="string" length="256" nullable="false"/> <field name="email" column="email" type="string" length="1024" nullable="false"/> <field name="attachement" column="attachement" type="string" length="1024" nullable="true"/> - <field name="volume" column="volume" type="float" nullable="true"/> - <field name="montant" column="montant" type="float" nullable="true"/> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> <field name="histoModification" type="datetime" column="histo_modification" nullable="false"/> diff --git a/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceForm.php b/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceForm.php index b3f0c48b72dea22acbae10d806e7537ad6797d32..c35ad880eb3a5bd51ca33f4392d4a03428a62764 100644 --- a/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceForm.php +++ b/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceForm.php @@ -10,6 +10,7 @@ use Zend\Form\Element\Text; use Zend\Form\Element\Textarea; use Zend\Form\Form; use Zend\InputFilter\Factory; +use Zend\Validator\Regex; class FormationInstanceForm extends Form { @@ -97,6 +98,28 @@ class FormationInstanceForm extends Form 'id' => 'lieu', ], ]); + //cout ht + $this->add([ + 'type' => Text::class, + 'name' => 'cout_ht', + 'options' => [ + 'label' => "Coût HT :", + ], + 'attributes' => [ + 'id' => 'cout_ht', + ], + ]); + //cout ht + $this->add([ + 'type' => Text::class, + 'name' => 'cout_ttc', + 'options' => [ + 'label' => "Coût TTC :", + ], + 'attributes' => [ + 'id' => 'cout_ttc', + ], + ]); //button $this->add([ 'type' => Button::class, @@ -120,6 +143,37 @@ class FormationInstanceForm extends Form 'inscription' => ['required' => true,], 'lieu' => ['required' => true,], 'type' => ['required' => true,], + 'cout_ht' => [ + 'required' => false, + 'validators' => [ + [ + 'name' => Regex::class, + 'options' => [ + 'pattern' => '/[0-9]*\.?[0-9]*/', + 'messages' => [ + Regex::NOT_MATCH => "Veuillez saisir une valeur correcte", + ], + //'break_chain_on_failure' => true, + ], + ], + ], + ], + 'cout_ttc' => [ + 'required' => false, + 'validators' => [ + [ + 'name' => Regex::class, + 'options' => [ + 'pattern' => '/[0-9]*\.?[0-9]*/', + 'messages' => [ + Regex::NOT_MATCH => "Veuillez saisir une valeur correcte", + ], + //'break_chain_on_failure' => true, + ], + ], + ], + ], + ])); } } \ No newline at end of file diff --git a/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceHydrator.php b/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceHydrator.php index 9974694de32e21b2c6ac0267ce07fff0a9c0deb2..3e4f24a791bd75399d36c6fb40288f7659c57a1b 100644 --- a/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceHydrator.php +++ b/module/Formation/src/Formation/Form/FormationInstance/FormationInstanceHydrator.php @@ -12,15 +12,17 @@ class FormationInstanceHydrator implements HydratorInterface * @param FormationInstance $object * @return array */ - public function extract($object) + public function extract($object) : array { $data = [ - 'description' => ($object->getComplement()) ?: null, - 'principale' => ($object->getNbPlacePrincipale()) ?: 0, - 'complementaire' => ($object->getNbPlaceComplementaire()) ?: 0, - 'lieu' => ($object->getLieu()) ?: null, - 'type' => ($object->getType()) ?: null, - 'inscription' => $object->isAutoInscription(), + 'description' => ($object AND $object->getComplement()) ?: null, + 'principale' => ($object AND $object->getNbPlacePrincipale()) ?: 0, + 'complementaire' => ($object AND $object->getNbPlaceComplementaire()) ?: 0, + 'lieu' => ($object AND $object->getLieu()) ?: null, + 'type' => ($object AND $object->getType()) ?: null, + 'inscription' => ($object) ? $object->isAutoInscription() : null, + 'cout_ht' => ($object) ? $object->getCoutHt() : null, + 'cout_ttc' => ($object) ? $object->getCoutTtc() : null, ]; return $data; } @@ -38,6 +40,8 @@ class FormationInstanceHydrator implements HydratorInterface $lieu = (isset($data['lieu']) and trim($data['lieu']) !== "") ? trim($data['lieu']) : null; $type = (isset($data['type']) and trim($data['type']) !== "") ? trim($data['type']) : null; $inscription = (isset($data['inscription']))?$data['inscription'] : false; + $coutHt = (isset($data['cout_ht']) and trim($data['cout_ht']) !== "") ? trim($data['cout_ht']) : null; + $coutTtc = (isset($data['cout_ttc']) and trim($data['cout_ttc']) !== "") ? trim($data['cout_ttc']) : null; $object->setComplement($description); $object->setNbPlacePrincipale($principale); @@ -45,6 +49,8 @@ class FormationInstanceHydrator implements HydratorInterface $object->setLieu($lieu); $object->setType($type); $object->setAutoInscription($inscription); + $object->setCoutHt($coutHt); + $object->setCoutTtc($coutTtc); return $object; } diff --git a/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurForm.php b/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurForm.php index 628ed126132be0937a6942e6444aa398f1d15ea9..850c2007d9e1c42e80dfae004b5fa73fd2b09c47 100644 --- a/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurForm.php +++ b/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurForm.php @@ -57,28 +57,6 @@ class FormationInstanceFormateurForm extends Form 'id' => 'attachement', ], ]); - //volume - $this->add([ - 'type' => Text::class, - 'name' => 'volume', - 'options' => [ - 'label' => "Volume horaire dispensé :", - ], - 'attributes' => [ - 'id' => 'volume', - ], - ]); - //montant - $this->add([ - 'type' => Text::class, - 'name' => 'montant', - 'options' => [ - 'label' => "Montant horaire :", - ], - 'attributes' => [ - 'id' => 'montant', - ], - ]); //button $this->add([ 'type' => Button::class, @@ -101,36 +79,6 @@ class FormationInstanceFormateurForm extends Form 'nom' => ['required' => true], 'email' => ['required' => true], 'attachement' => ['required' => false], - 'volume' => [ - 'required' => false, - 'validators' => [ - [ - 'name' => Regex::class, - 'options' => [ - 'pattern' => '/[0-9]*\.?[0-9]*/', - 'messages' => [ - Regex::NOT_MATCH => "Veuillez saisir une valeur correcte", - ], - //'break_chain_on_failure' => true, - ], - ], - ], - ], - 'montant' => [ - 'required' => false, - 'validators' => [ - [ - 'name' => Regex::class, - 'options' => [ - 'pattern' => '/[0-9]*\.?[0-9]*/', - 'messages' => [ - Regex::NOT_MATCH => "Veuillez saisir une valeur correcte", - ], - //'break_chain_on_failure' => true, - ], - ], - ], - ], ])); } } \ No newline at end of file diff --git a/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurHydrator.php b/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurHydrator.php index d0c36337d9dbfa88ac2faf651deefbe748b5b199..772b209c6201c9396e2f89127ead064d5a998bd0 100644 --- a/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurHydrator.php +++ b/module/Formation/src/Formation/Form/FormationInstanceFormateur/FormationInstanceFormateurHydrator.php @@ -19,8 +19,6 @@ class FormationInstanceFormateurHydrator implements HydratorInterface 'nom' => ($object) ? $object->getNom() : null, 'email' => ($object) ? $object->getEmail() : null, 'attachement' => ($object) ? $object->getAttachement() : null, - 'volume' => ($object) ? $object->getVolume() : null, - 'montant' => ($object) ? $object->getMontant() : null, ]; return $data; } @@ -36,15 +34,11 @@ class FormationInstanceFormateurHydrator implements HydratorInterface $nom = (isset($data['nom']) and trim($data['nom']) !== "") ? trim($data['nom']) : null; $email = (isset($data['email']) and trim($data['email']) !== "") ? trim($data['email']) : null; $attachement = (isset($data['attachement']) and trim($data['attachement']) !== "") ? trim($data['attachement']) : null; - $volume = (isset($data['volume']) and trim($data['volume']) !== "") ? trim($data['volume']) : null; - $montant = (isset($data['montant']) and trim($data['montant']) !== "") ? trim($data['montant']) : null; $object->setPrenom($prenom); $object->setNom($nom); $object->setEmail($email); $object->setAttachement($attachement); - $object->setVolume($volume); - $object->setMontant($montant); return $object; } diff --git a/module/Formation/src/Formation/Service/FormationInstance/FormationInstanceService.php b/module/Formation/src/Formation/Service/FormationInstance/FormationInstanceService.php index 9b20227a6fca17ba610ef3e43c8e2334fd852416..12b7e7042d351456ef07cc27642d4eaae606dde1 100644 --- a/module/Formation/src/Formation/Service/FormationInstance/FormationInstanceService.php +++ b/module/Formation/src/Formation/Service/FormationInstance/FormationInstanceService.php @@ -254,7 +254,7 @@ class FormationInstanceService $instance->setEtat($this->getEtatService()->getEtatByCode(FormationInstance::ETAT_INSCRIPTION_OUVERTE)); $this->update($instance); - $email = $this->getParametreService()->getParametreByCode('GLOBAL', 'MAIL_LISTE_BIATS')->getValeur(); + $email = $this->getParametreService()->getParametreByCode('FORMATION', 'MAIL_PERSONNEL')->getValeur(); $vars = [ 'instance' => $instance, 'UrlService' => $this->getUrlService(), diff --git a/module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php b/module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php index f198183823ec5b97cc4a0c8276eab51b46d89487..3908090006f744d914f76c6ca4918ef6c354b197 100644 --- a/module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php +++ b/module/Formation/src/Formation/Service/FormationInstanceInscrit/FormationInstanceInscritService.php @@ -182,6 +182,25 @@ class FormationInstanceInscritService return $result; } + /** + * @param Agent $agent + * @return FormationInstanceInscrit[] + */ + public function getFormationsBySuivies(Agent $agent) : array + { + $qb = $this->createQueryBuilder() + ->andWhere('inscrit.agent = :agent') + ->setParameter('agent', $agent) + ->andWhere('instanceetat.code = :retour OR instanceetat.code = :close') + ->setParameter('retour', FormationInstance::ETAT_ATTENTE_RETOURS) + ->setParameter('close', FormationInstance::ETAT_CLOTURE_INSTANCE) + ->andWhere('inscrit.histoDestruction IS NULL') + ->orderBy('formation.libelle', 'ASC'); + + $result = $qb->getQuery()->getResult(); + return $result; + } + /** * @param Structure $structure * @param bool $avecStructuresFilles diff --git a/module/Formation/src/Formation/Service/Notification/NotificationService.php b/module/Formation/src/Formation/Service/Notification/NotificationService.php index 63ab6095f6532593e8e69e972b24b82741a7e6d9..6fdf611f46c4178f280700cff050351c85843794 100644 --- a/module/Formation/src/Formation/Service/Notification/NotificationService.php +++ b/module/Formation/src/Formation/Service/Notification/NotificationService.php @@ -31,7 +31,7 @@ class NotificationService { ]; $rendu = $this->getRenduService()->generateRenduByTemplateCode("FORMATION_INSCRIPTION_DEMANDE_AGENT", $vars); - $email = $this->getParametreService()->getParametreByCode('FORMATION','EMAIL')->getValeur(); + $email = $this->getParametreService()->getParametreByCode('FORMATION','MAIL_CCC')->getValeur(); $mail = $this->getMailService()->sendMail($email, $rendu->getSujet(), $rendu->getCorps()); $mail->setMotsClefs([$instance->generateTag(), $rendu->getTemplate()->generateTag()]); $this->getMailService()->update($mail); @@ -44,7 +44,7 @@ class NotificationService { $instance = $inscription->getInstance(); $agent = $inscription->getAgent(); - $email = $this->getParametreService()->getParametreByCode('FORMATION','EMAIL')->getValeur(); + $email = $this->getParametreService()->getParametreByCode('FORMATION','MAIL_CCC')->getValeur(); $email .= ","; $email .= $agent->getEmail(); diff --git a/module/Formation/src/Formation/View/Helper/partial/formation-instance-informations.phtml b/module/Formation/src/Formation/View/Helper/partial/formation-instance-informations.phtml index 9a8eb87d46e6c3d73da08bf82977bcca1fe5263b..0562e2ce37d29112ebbfbf611ae5d9daffc7c511 100644 --- a/module/Formation/src/Formation/View/Helper/partial/formation-instance-informations.phtml +++ b/module/Formation/src/Formation/View/Helper/partial/formation-instance-informations.phtml @@ -37,6 +37,14 @@ use Formation\Entity\Db\FormationInstance; Non (les agents doivent notifier les gestionnaires de formation) <?php endif; ?> </dd> + <?php if ($instance->getCoutHt() !== null) : ?> + <dt> Coût HT </dt> + <dd> <?php echo $instance->getCoutHt(); ?>€</dd> + <?php endif; ?> + <?php if ($instance->getCoutTtc() !== null) : ?> + <dt> Coût TTC </dt> + <dd> <?php echo $instance->getCoutTtc(); ?>€</dd> + <?php endif; ?> </dl> <?php endif; ?> diff --git a/module/Formation/view/formation/formation-groupe/afficher-groupe.phtml b/module/Formation/view/formation/formation-groupe/afficher.phtml similarity index 100% rename from module/Formation/view/formation/formation-groupe/afficher-groupe.phtml rename to module/Formation/view/formation/formation-groupe/afficher.phtml diff --git a/module/Formation/view/formation/formation-groupe/index.phtml b/module/Formation/view/formation/formation-groupe/index.phtml index c6603d50490bad80fc49bcd1d066ef52e575ee12..e1433fe4116086590e297513d2738d48a1d875cc 100644 --- a/module/Formation/view/formation/formation-groupe/index.phtml +++ b/module/Formation/view/formation/formation-groupe/index.phtml @@ -46,9 +46,9 @@ $canDetruire = $this->isAllowed(FormationgroupePrivileges::getResourceId( <thead> <tr> <th> Libellé </th> - <th style="width: 12rem;"> #Formation </th> - <th style="width: 12rem;"> Source </th> - <th style="width: 12rem;"> Action </th> + <th style="width: 10rem;"> #Formation </th> + <th style="width: 14rem;"> Source </th> + <th style="width: 9rem;"> Action </th> </tr> </thead> <tbody> @@ -99,15 +99,17 @@ $canDetruire = $this->isAllowed(FormationgroupePrivileges::getResourceId( <span class="icon restaurer" style="color:lightgrey;"></span> <?php endif; ?> <?php endif; ?> + <?php if (false) : ?> <?php if ($canDedoublonner) : ?> - <a - <?php /** @see FormationGroupeController::dedoublonnerAction() */ ?> - href="<?php echo $this->url('formation-groupe/dedoublonner', ['formation-groupe' => $groupe->getId()], [], true); ?>" - class="ajax-modal" data-event="modification" - > - <span class="icon fusionner" title="Dedoublonner le groupe"></span></a> - <?php else : ?> - <span class="icon fusionner" style="color:lightgrey;"></span> + <a + <?php /** @see FormationGroupeController::dedoublonnerAction() */ ?> + href="<?php echo $this->url('formation-groupe/dedoublonner', ['formation-groupe' => $groupe->getId()], [], true); ?>" + class="ajax-modal" data-event="modification" + > + <span class="icon fusionner" title="Dedoublonner le groupe"></span></a> + <?php else : ?> + <span class="icon fusionner" style="color:lightgrey;"></span> + <?php endif; ?> <?php endif; ?> <?php if ($canDetruire) : ?> <a @@ -115,7 +117,7 @@ $canDetruire = $this->isAllowed(FormationgroupePrivileges::getResourceId( href="<?php echo $this->url('formation-groupe/detruire', ['formation-groupe' => $groupe->getId()], [], true); ?>" class="ajax-modal" data-event="modification" > - <span class="icon detruire" title="Afficher le groupe"></span></a> + <span class="icon detruire text-danger" title="Supprimer le groupe"></span></a> <?php else : ?> <span class="icon detruire" style="color:lightgrey;"></span> <?php endif; ?> diff --git a/module/Formation/view/formation/formation-instance-inscrit/liste-formations-instances.phtml b/module/Formation/view/formation/formation-instance-inscrit/liste-formations-instances.phtml index 10aabd0e53186f16a5ba7942ba2f8bc24bd4988c..0e3b1c9c962470399b886a6054e7777f38808dc8 100644 --- a/module/Formation/view/formation/formation-instance-inscrit/liste-formations-instances.phtml +++ b/module/Formation/view/formation/formation-instance-inscrit/liste-formations-instances.phtml @@ -3,8 +3,10 @@ /** * @see \Formation\Controller\FormationInstanceInscritController::listeFormationsInstancesAction() * @var FormationInstance[] $instances + * @var FormationInstance[] $formations * @var FormationInstanceInscrit[] $inscriptions * @var Agent $agent + * @var string $texteParcours */ use Application\Entity\Db\Agent; @@ -44,6 +46,22 @@ $this->headTitle("Liste des actions de formations proposées"); </span> </a> </li> + <li> + <a href="#formations" aria-controls="formations" role="tab" data-toggle="tabz"> + Mes formations suivies + <span class="badge"> + <?php echo count($formations); ?> + </span> + </a> + </li> + <li class="pull-right"> + <a href="#parcours" aria-controls="parcours" role="tab" data-toggle="tabz" > + Mon parcours d'entrée +<!-- <span class="badge">--> + <?php //echo count($inscriptions); ?> +<!-- </span>--> + </a> + </li> </ul> </div> </div> @@ -62,6 +80,16 @@ $this->headTitle("Liste des actions de formations proposées"); <?php echo $this->partial('partial/inscriptions', ['instances' => $instances, 'inscriptions' => $inscriptions, 'agent' => $agent]); ?> </div> + <!-- Type----------------------------------------------------------------------------------------------> + <div id="formations" class="tab-pane " role="tabpanel"> + <?php echo $this->partial('partial/formations', ['formations' => $formations, 'agent' => $agent]); ?> + </div> + + <!-- Type----------------------------------------------------------------------------------------------> + <div id="parcours" class="tab-pane " role="tabpanel"> + <?php echo $this->partial('partial/parcours-entree', ['description' => $texteParcours, 'agent' => $agent]); ?> + </div> + </div> </div> diff --git a/module/Formation/view/formation/formation-instance-inscrit/partial/formations.phtml b/module/Formation/view/formation/formation-instance-inscrit/partial/formations.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d0241aba4faa0b6ceb01cfbcffe17e4cf55d6cd1 --- /dev/null +++ b/module/Formation/view/formation/formation-instance-inscrit/partial/formations.phtml @@ -0,0 +1,78 @@ +<?php + +/** + * @var FormationInstanceInscrit[] $formations + * @var Agent $agent + */ + +use Application\Entity\Db\Agent; +use Formation\Entity\Db\FormationInstance; +use Formation\Entity\Db\FormationInstanceInscrit; + +$retours = array_filter($formations, function (FormationInstanceInscrit $a) { return $a->getInstance()->getEtat()->getCode() === FormationInstance::ETAT_ATTENTE_RETOURS;} ); +$closes = array_filter($formations, function (FormationInstanceInscrit $a) { return $a->getInstance()->getEtat()->getCode() === FormationInstance::ETAT_CLOTURE_INSTANCE;} ); +?> + +<h2> + Formations en attentes de retour + <span class="badge"><?php echo count($retours); ?></span> +</h2> + +<?php if (empty($retours)) : ?> + <em> Aucune formation en attente de retour </em> +<?php else : ?> + <?php foreach ($retours as $inscription) : ?> + <div class="row formation-inscription"> + <div class="col-md-8 description"> + <?php echo $this->formationInstanceInformations($inscription->getInstance(), 'bloc'); ?> + <br/> + <br/> + </div> + <div class="pull-right"> + <a + <?php /** @see \Formation\Controller\FormationInstanceController::renseignerQuestionnaireAction() */?> + href="<?php echo $this->url('formation-instance/renseigner-questionnaire', ['inscrit' => $inscription->getId()], [], true); ?>" + class="btn btn-primary action" + > + <span class="icon editer"> Je complète le formulaire</span> + </a> + <br/> + <a + <?php /** @see \Formation\Controller\FormationInstanceDocumentController::genererAttestationAction() */?> + href="<?php echo $this->url('formation-instance/generer-attestation', ['inscrit' => $inscription->getId()], [], true); ?>" + class="btn btn-primary action <?php if ($inscription->getQuestionnaire() === null) echo " disabled "; ?>" + > + <span class="icon pdf"> Je télécharge mon attestation</span> + </a> + </div> + </div> + <?php endforeach; ?> +<?php endif; ?> + +<h2> + Formations closes + <span class="badge"><?php echo count($closes); ?></span> +</h2> + +<?php if (empty($closes)) : ?> + <em> Aucune formation close </em> +<?php else : ?> + <?php foreach ($closes as $inscription) : ?> + <div class="row formation-inscription"> + <div class="col-md-8 description"> + <?php echo $this->formationInstanceInformations($inscription->getInstance(), 'bloc'); ?> + <br/> + <br/> + </div> + <div class="pull-right"> + <a + <?php /** @see \Formation\Controller\FormationInstanceDocumentController::genererAttestationAction() */?> + href="<?php echo $this->url('formation-instance/generer-attestation', ['inscrit' => $inscription->getId()], [], true); ?>" + class="btn btn-primary action <?php if ($inscription->getQuestionnaire() === null) echo " disabled "; ?>" + > + <span class="icon pdf"> Je télécharge mon attestation</span> + </a> + </div> + </div> + <?php endforeach; ?> +<?php endif; ?> \ No newline at end of file diff --git a/module/Formation/view/formation/formation-instance-inscrit/partial/parcours-entree.phtml b/module/Formation/view/formation/formation-instance-inscrit/partial/parcours-entree.phtml new file mode 100644 index 0000000000000000000000000000000000000000..09af8dd8131128816461b4ff9688de1298300bc7 --- /dev/null +++ b/module/Formation/view/formation/formation-instance-inscrit/partial/parcours-entree.phtml @@ -0,0 +1,13 @@ +<?php + +/** + * @var string $description + */ + +?> + +<h2> + Mon parcours d'entrée +</h2> + +<?php echo $description; ?> \ No newline at end of file diff --git a/module/Formation/view/formation/formation-instance/afficher.phtml b/module/Formation/view/formation/formation-instance/afficher.phtml index 555609842be52bbee17cf96da04564f1b452d7da..9567d0d9895272b4d454cca338392d287253c9b8 100644 --- a/module/Formation/view/formation/formation-instance/afficher.phtml +++ b/module/Formation/view/formation/formation-instance/afficher.phtml @@ -187,7 +187,7 @@ $canGererInscription = $this->isAllowed(FormationinstancePrivileges::getResou <div class="row"> <div class="col-sm-6 col-md-8"> - <h3>Formateurs <span class="badge"><?php echo count($formateurs); ?></span> </h3> + <h3>Formateurs </h3> </div> <div class="pull-right"> <?php if ($canFormateurModifier) : ?> @@ -207,7 +207,6 @@ $canGererInscription = $this->isAllowed(FormationinstancePrivileges::getResou <tr> <th> Dénomination </th> <th> Structure de rattachement </th> - <th> Volume </th> <th> Action </th> </tr> </thead> @@ -216,7 +215,6 @@ $canGererInscription = $this->isAllowed(FormationinstancePrivileges::getResou <tr class="<?php echo ($formateur->estHistorise())?"historise":""; ?>"> <td> <?php echo $formateur->getPrenom(); ?> <?php echo $formateur->getNom(); ?> </td> <td> <?php echo ($formateur->getAttachement())?:"Non renseigné"; ?> </td> - <td> <?php echo ($formateur->getVolume())?:"Non renseigné"; ?> </td> <td> <?php if ($canFormateurModifier) : ?> <a <?php /** @see FormationInstanceFormateurController::modifierFormateurAction() */ ?> @@ -244,9 +242,6 @@ $canGererInscription = $this->isAllowed(FormationinstancePrivileges::getResou <?php endforeach; ?> </tbody> </table> - <?php if ($canJourneeModifier) : ?> - <strong>Volume horaire sommé :</strong> <?php echo $instance->getVolumeHoraireSomme(); ?> heures. - <?php endif; ?> <div class="row"> <div class="col-md-8"> diff --git a/module/Formation/view/formation/formation/index.phtml b/module/Formation/view/formation/formation/index.phtml index a0d8a03f7bb356839a640fad605319b8d042b216..fa7153e97d433eb11c7b0b36372f7ce8d4690522 100644 --- a/module/Formation/view/formation/formation/index.phtml +++ b/module/Formation/view/formation/formation/index.phtml @@ -53,7 +53,7 @@ $this->headTitle("Actions de formation"); <th class="col-md-6 nosort"> Libellé </th> <th class="col-md-3 nosort" style="min-width:10rem;"> Groupe </th> <th class="col-md-2 nosort" style="min-width:10rem;"> Source </th> - <th class="col-md-1 nosort" style="min-width:8rem;"> Action </th> + <th class="col-md-1 nosort" style="min-width:10rem;"> Action </th> </tr> </thead> <tbody> @@ -89,13 +89,15 @@ $this->headTitle("Actions de formation"); <span class="icon restaurer" title="Restaurer la formation"></span></a> <?php endif; ?> <?php endif; ?> - <?php if ($canDedoublonner) : ?> - <a - <?php /** @see FormationController::dedoublonnerAction() */ ?> - href="<?php echo $this->url('formation/dedoublonner', ['formation' => $formation->getId()], [], true); ?>" - class="ajax-modal" data-event="modification" - > - <span class="icon fusionner" title="Dédoublonner la formation"></span></a> + <?php if (false) : ?> + <?php if ($canDedoublonner) : ?> + <a + <?php /** @see FormationController::dedoublonnerAction() */ ?> + href="<?php echo $this->url('formation/dedoublonner', ['formation' => $formation->getId()], [], true); ?>" + class="ajax-modal" data-event="modification" + > + <span class="icon fusionner" title="Dédoublonner la formation"></span></a> + <?php endif; ?> <?php endif; ?> <?php if ($canDetruire) : ?> <a @@ -103,7 +105,7 @@ $this->headTitle("Actions de formation"); href="<?php echo $this->url('formation/detruire', ['formation' => $formation->getId()], [], true); ?>" class="ajax-modal" data-event="modification" > - <span class="icon detruire" title="Supprimer la formation"></span></a> + <span class="icon detruire text-danger" title="Supprimer la formation"></span></a> <?php endif; ?> </td> </tr> diff --git a/module/Structure/src/Structure/Controller/StructureController.php b/module/Structure/src/Structure/Controller/StructureController.php index 82df1a6f642fe8a7fab82b2d47436b866e69ad4a..dec756b6ada910b8990642f5fb77d8babb988dbe 100644 --- a/module/Structure/src/Structure/Controller/StructureController.php +++ b/module/Structure/src/Structure/Controller/StructureController.php @@ -11,7 +11,6 @@ use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\AgentMissionSpecifique\AgentMissionSpecifiqueServiceAwareTrait; use Application\Service\FichePoste\FichePosteServiceAwareTrait; use Application\Service\FicheProfil\FicheProfilServiceAwareTrait; -use Application\Service\Poste\PosteServiceAwareTrait; use Application\Service\SpecificitePoste\SpecificitePosteServiceAwareTrait; use DateTime; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; @@ -43,7 +42,6 @@ class StructureController extends AbstractActionController { use FichePosteServiceAwareTrait; use FicheProfilServiceAwareTrait; use FormationInstanceInscritServiceAwareTrait; - use PosteServiceAwareTrait; use StructureServiceAwareTrait; use StructureAgentForceServiceAwareTrait; use SpecificitePosteServiceAwareTrait; @@ -98,7 +96,6 @@ class StructureController extends AbstractActionController { $allAgents = array_merge($agents, $agentsForces); $fichesRecrutements = $this->getStructureService()->getFichesPostesRecrutementsByStructures($structures); - $postes = $this->getPosteService()->getPostesByStructures($structures); usort($allAgents, function (Agent $a, Agent $b) { $aaa = $a->getNomUsuel() . " ". $a->getPrenom(); $bbb = $b->getNomUsuel() . " ". $b->getPrenom(); return $aaa > $bbb;}); /** Campagne */ @@ -108,10 +105,7 @@ class StructureController extends AbstractActionController { $agentsForcesLast = array_map(function (StructureAgentForce $a) { return $a->getAgent(); }, $structure->getAgentsForces()); $allAgentsLast = array_merge($agentsLast, $agentsForcesLast); - - $campagnes = $this->getCampagneService()->getCampagnesActives(); - $entretiens = []; $delegues = $this->getDelegueService()->getDeleguesByStructure($structure); $inscriptions = $this->getFormationInstanceInscritService()->getInscriptionsByStructure($structure, true, true); @@ -139,12 +133,10 @@ class StructureController extends AbstractActionController { 'agents' => $agents, 'agentsForces' => $agentsForces, 'agentsAll' => $allAgents, - 'postes' => $postes, 'last' => $last, 'agentsLast' => $allAgentsLast, 'campagnes' => $campagnes, - 'entretiens' => $entretiens, 'delegues' => $delegues, ]); } diff --git a/module/Structure/src/Structure/Controller/StructureControllerFactory.php b/module/Structure/src/Structure/Controller/StructureControllerFactory.php index be4b30cb779cca9bb30e34a0682a22b669d9da05..d680606327da8b2140a53c80cfbbe30528ed3d15 100644 --- a/module/Structure/src/Structure/Controller/StructureControllerFactory.php +++ b/module/Structure/src/Structure/Controller/StructureControllerFactory.php @@ -36,7 +36,6 @@ class StructureControllerFactory { * @var FichePosteService $fichePosteService * @var FicheProfilService $ficheProfilService * @var FormationInstanceInscritService $formationInstanceInscritService - * @var PosteService $posteService * @var SpecificitePosteService $specificiteService * @var StructureService $structureService * @var StructureAgentForceService $structureAgentForceService @@ -50,7 +49,6 @@ class StructureControllerFactory { $fichePosteService = $container->get(FichePosteService::class); $ficheProfilService = $container->get(FicheProfilService::class); $formationInstanceInscritService = $container->get(FormationInstanceInscritService::class); - $posteService = $container->get(PosteService::class); $specificiteService = $container->get(SpecificitePosteService::class); $structureService = $container->get(StructureService::class); $structureAgentForceService = $container->get(StructureAgentForceService::class); @@ -80,7 +78,6 @@ class StructureControllerFactory { $controller->setFichePosteService($fichePosteService); $controller->setFicheProfilService($ficheProfilService); $controller->setFormationInstanceInscritService($formationInstanceInscritService); - $controller->setPosteService($posteService); $controller->setSpecificitePosteService($specificiteService); $controller->setStructureService($structureService); $controller->setStructureAgentForceService($structureAgentForceService); diff --git a/module/Structure/view/structure/structure/afficher.phtml b/module/Structure/view/structure/structure/afficher.phtml index 366822b2a450f3c9c3c8f8de94c0cd03f2f41284..53018d68e228dcc8937edafb3a109265966ec7b2 100644 --- a/module/Structure/view/structure/structure/afficher.phtml +++ b/module/Structure/view/structure/structure/afficher.phtml @@ -13,7 +13,6 @@ * @var FichePoste[] $fichesCompletes * @var FichePoste[] $fichesIncompletes * @var FichePoste[] $fichesRecrutements - * @var Poste[] $postes * @var Agent[] $agents * @var Agent[] $agentsForces * @var Agent[] $agentsAll @@ -30,7 +29,6 @@ use Application\Entity\Db\Agent; use Application\Entity\Db\AgentMissionSpecifique; use Application\Entity\Db\FichePoste; use Application\Entity\Db\FicheProfil; -use Application\Entity\Db\Poste; use EntretienProfessionnel\Entity\Db\Campagne; use EntretienProfessionnel\Entity\Db\Delegue; use Formation\Entity\Db\FormationInstanceInscrit;