Skip to content
Snippets Groups Projects
Commit 50e6c712 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Modification du formulaire

parent f5b7270e
No related branches found
No related tags found
No related merge requests found
Version 4.0.0 (XX/XX/2023)
====
Évolution
---
- Interface pour déclarer les référentiel de compétences.
- Changement des formulaires de saisie des compétences : Référentiel et Identifiant source.
- Interface d'import des compétences depuis le CSV d'un référentiel de compétence
Modification en BD
---
```postgresql
```
Evolution des librairies
---
```bash
```
Ou réinstalle des libraires
```bash
rm -fr vendor
rm -fr composer.lock
composer install
```
Evolution des macros et templates
---
...@@ -91,6 +91,18 @@ class CompetenceForm extends Form { ...@@ -91,6 +91,18 @@ class CompetenceForm extends Form {
'data-live-search' => 'true', 'data-live-search' => 'true',
], ],
]); ]);
//identifiant dans referentiel
$this->add([
'type' => Text::class,
'name' => 'identifiant',
'options' => [
'label' => "Identifiant dans le référentiel source:",
'label_options' => [ 'disable_html_escape' => true, ],
],
'attributes' => [
'id' => 'identifiant',
],
]);
//submit //submit
$this->add([ $this->add([
...@@ -114,6 +126,7 @@ class CompetenceForm extends Form { ...@@ -114,6 +126,7 @@ class CompetenceForm extends Form {
'type' => [ 'required' => true, ], 'type' => [ 'required' => true, ],
'theme' => [ 'required' => false, ], 'theme' => [ 'required' => false, ],
'referentiel' => [ 'required' => false, ], 'referentiel' => [ 'required' => false, ],
'identifiant' => [ 'required' => false, ],
])); ]));
} }
} }
\ No newline at end of file
...@@ -24,6 +24,7 @@ class CompetenceHydrator implements HydratorInterface { ...@@ -24,6 +24,7 @@ class CompetenceHydrator implements HydratorInterface {
$data['type'] = ($object->getType())?$object->getType()->getId():null; $data['type'] = ($object->getType())?$object->getType()->getId():null;
$data['theme'] = ($object->getTheme())?$object->getTheme()->getId():null; $data['theme'] = ($object->getTheme())?$object->getTheme()->getId():null;
$data['referentiel'] = ($object->getReferentiel())?$object->getReferentiel()->getId():null; $data['referentiel'] = ($object->getReferentiel())?$object->getReferentiel()->getId():null;
$data['identifiant'] = ($object->getIdSource())??null;
return $data; return $data;
} }
...@@ -36,11 +37,12 @@ class CompetenceHydrator implements HydratorInterface { ...@@ -36,11 +37,12 @@ class CompetenceHydrator implements HydratorInterface {
{ {
$object->setLibelle($data['libelle']); $object->setLibelle($data['libelle']);
$object->setDescription($data['description']); $object->setDescription($data['description']);
$object->setIdSource($data['identifiant']??null);
$type = null; $theme = null; $referentiel = null; $theme = null; $type = null;
if (isset($data['type']) AND $data['type'] != '') $type = $this->getCompetenceTypeService()->getCompetenceType($data['type']);
if (isset($data['theme']) AND $data['theme'] != '') $theme = $this->getCompetenceThemeService()->getCompetenceTheme($data['theme']);
if (isset($data['referentiel']) AND $data['referentiel'] != '') $referentiel = $this->getCompetenceReferentielService()->getCompetenceReferentiel($data['referentiel']); if (isset($data['referentiel']) AND $data['referentiel'] != '') $referentiel = $this->getCompetenceReferentielService()->getCompetenceReferentiel($data['referentiel']);
if (isset($data['theme']) AND $data['theme'] != '') $theme = $this->getCompetenceThemeService()->getCompetenceTheme($data['theme']);
if (isset($data['type']) AND $data['type'] != '') $type = $this->getCompetenceTypeService()->getCompetenceType($data['type']);
$object->setReferentiel($referentiel); $object->setReferentiel($referentiel);
$object->setTheme($theme); $object->setTheme($theme);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment