Loading data/ddl/table/MISSION.php +12 −0 Changes for data/ddl/table/MISSION.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -57,6 +57,18 @@ return [ 'position' => 6, 'commentaire' => NULL, ], 'ETUDIANTS_SUIVIS' => [ 'name' => 'ETUDIANTS_SUIVIS', 'type' => 'string', 'bdd-type' => 'VARCHAR2', 'length' => 4000, 'scale' => NULL, 'precision' => NULL, 'nullable' => TRUE, 'default' => NULL, 'position' => 16, 'commentaire' => NULL, ], 'HISTO_CREATEUR_ID' => [ 'name' => 'HISTO_CREATEUR_ID', 'type' => 'int', Loading data/ddl_columns_pos.php +1 −1 Changes for data/ddl_columns_pos.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2177,6 +2177,7 @@ return [ 'STRUCTURE_ID', 'AUTO_VALIDATION', 'TAUX_REMU_ID', 'ETUDIANTS_SUIVIS', ], 'MISSION_ETUDIANT' => [ 'MISSION_ID', Loading Loading @@ -2371,7 +2372,6 @@ return [ 'DATE_EFFET', 'VALEUR', ], ]; //@formatter:on module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml +1 −0 Changes for module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <field name="dateDebut" type="datetime" column="DATE_DEBUT" nullable="false"/> <field name="dateFin" type="datetime" column="DATE_FIN" nullable="false"/> <field name="description" type="string" column="DESCRIPTION" length="4000" nullable="true"/> <field name="etudiantsSuivis" type="string" column="ETUDIANTS_SUIVIS" length="4000" nullable="true"/> <many-to-many field="etudiants" target-entity="Application\Entity\Db\Intervenant"> <join-table name="MISSION_ETUDIANT"> Loading module/Mission/src/Entity/Db/Mission.php +19 −1 Changes for module/Mission/src/Entity/Db/Mission.php: 19 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana protected ?string $description = null; protected ?string $etudiantsSuivis = null; protected bool $autoValidation = false; private Collection $etudiants; Loading Loading @@ -150,6 +152,22 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana public function getEtudiantsSuivis(): ?string { return $this->etudiantsSuivis; } public function setEtudiantsSuivis(?string $etudiantsSuivis): self { $this->etudiantsSuivis = $etudiantsSuivis; return $this; } public function isAutoValidation(): bool { return $this->autoValidation; Loading @@ -157,7 +175,7 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana public function setAutoValidation(bool $autoValidation): Mission public function setAutoValidation(bool $autoValidation): self { $this->autoValidation = $autoValidation; Loading module/Mission/src/Form/MissionForm.php +15 −5 Changes for module/Mission/src/Form/MissionForm.php: 15 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Mission\Entity\Db\Mission; use Paiement\Entity\Db\TauxRemu; use Mission\Entity\Db\TypeMission; use UnicaenApp\Util; /** Loading @@ -21,15 +22,23 @@ class MissionForm extends AbstractForm public function init() { $this->spec(Mission::class, ['intervenant', 'autoValidation']); $tmDql = "SELECT tm FROM " . TypeMission::class . " tm WHERE tm.histoDestruction IS NULL AND tm.annee = :annee"; $tmDqlParams = ['annee' => $this->getServiceContext()->getAnnee()]; /** @var TypeMission[] $typesMissions */ $typesMissions = $this->getEntityManager()->createQuery($tmDql)->setParameters($tmDqlParams)->getResult(); $this->spec(['description' => ['type' => 'Textarea']]); $tmAccEtu = []; foreach ($typesMissions as $typeMission) { $tmAccEtu[$typeMission->getId()] = $typeMission->isAccompagnementEtudiants(); } $this->spec(Mission::class, ['intervenant', 'autoValidation']); $this->spec(['description' => ['type' => 'Textarea'], 'etudiantsSuivis' => ['type' => 'Textarea']]); $this->build(); $tmDql = "SELECT tm FROM " . TypeMission::class . " tm WHERE tm.histoDestruction IS NULL AND tm.annee = :annee"; $tmDqlParams = ['annee' => $this->getServiceContext()->getAnnee()]; $this->setValueOptions('typeMission', $tmDql, $tmDqlParams); $this->setValueOptions('typeMission', Util::collectionAsOptions($typesMissions)); $this->get('typeMission')->setAttribute('data-accompagnement-etudiants', json_encode($tmAccEtu)); $trDql = "SELECT mtr FROM " . TauxRemu::class . " mtr"; $this->setValueOptions('tauxRemu', $trDql); Loading @@ -44,6 +53,7 @@ class MissionForm extends AbstractForm 'dateDebut' => 'Date de début', 'dateFin' => 'Date de fin', 'description' => 'Descriptif de la mission', 'etudiantsSuivis' => 'Noms des étudiants suivis', ]); $this->addSubmit(); Loading Loading
data/ddl/table/MISSION.php +12 −0 Changes for data/ddl/table/MISSION.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -57,6 +57,18 @@ return [ 'position' => 6, 'commentaire' => NULL, ], 'ETUDIANTS_SUIVIS' => [ 'name' => 'ETUDIANTS_SUIVIS', 'type' => 'string', 'bdd-type' => 'VARCHAR2', 'length' => 4000, 'scale' => NULL, 'precision' => NULL, 'nullable' => TRUE, 'default' => NULL, 'position' => 16, 'commentaire' => NULL, ], 'HISTO_CREATEUR_ID' => [ 'name' => 'HISTO_CREATEUR_ID', 'type' => 'int', Loading
data/ddl_columns_pos.php +1 −1 Changes for data/ddl_columns_pos.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -2177,6 +2177,7 @@ return [ 'STRUCTURE_ID', 'AUTO_VALIDATION', 'TAUX_REMU_ID', 'ETUDIANTS_SUIVIS', ], 'MISSION_ETUDIANT' => [ 'MISSION_ID', Loading Loading @@ -2371,7 +2372,6 @@ return [ 'DATE_EFFET', 'VALEUR', ], ]; //@formatter:on
module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml +1 −0 Changes for module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Mission.dcm.xml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <field name="dateDebut" type="datetime" column="DATE_DEBUT" nullable="false"/> <field name="dateFin" type="datetime" column="DATE_FIN" nullable="false"/> <field name="description" type="string" column="DESCRIPTION" length="4000" nullable="true"/> <field name="etudiantsSuivis" type="string" column="ETUDIANTS_SUIVIS" length="4000" nullable="true"/> <many-to-many field="etudiants" target-entity="Application\Entity\Db\Intervenant"> <join-table name="MISSION_ETUDIANT"> Loading
module/Mission/src/Entity/Db/Mission.php +19 −1 Changes for module/Mission/src/Entity/Db/Mission.php: 19 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana protected ?string $description = null; protected ?string $etudiantsSuivis = null; protected bool $autoValidation = false; private Collection $etudiants; Loading Loading @@ -150,6 +152,22 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana public function getEtudiantsSuivis(): ?string { return $this->etudiantsSuivis; } public function setEtudiantsSuivis(?string $etudiantsSuivis): self { $this->etudiantsSuivis = $etudiantsSuivis; return $this; } public function isAutoValidation(): bool { return $this->autoValidation; Loading @@ -157,7 +175,7 @@ class Mission implements HistoriqueAwareInterface, ResourceInterface, EntityMana public function setAutoValidation(bool $autoValidation): Mission public function setAutoValidation(bool $autoValidation): self { $this->autoValidation = $autoValidation; Loading
module/Mission/src/Form/MissionForm.php +15 −5 Changes for module/Mission/src/Form/MissionForm.php: 15 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Mission\Entity\Db\Mission; use Paiement\Entity\Db\TauxRemu; use Mission\Entity\Db\TypeMission; use UnicaenApp\Util; /** Loading @@ -21,15 +22,23 @@ class MissionForm extends AbstractForm public function init() { $this->spec(Mission::class, ['intervenant', 'autoValidation']); $tmDql = "SELECT tm FROM " . TypeMission::class . " tm WHERE tm.histoDestruction IS NULL AND tm.annee = :annee"; $tmDqlParams = ['annee' => $this->getServiceContext()->getAnnee()]; /** @var TypeMission[] $typesMissions */ $typesMissions = $this->getEntityManager()->createQuery($tmDql)->setParameters($tmDqlParams)->getResult(); $this->spec(['description' => ['type' => 'Textarea']]); $tmAccEtu = []; foreach ($typesMissions as $typeMission) { $tmAccEtu[$typeMission->getId()] = $typeMission->isAccompagnementEtudiants(); } $this->spec(Mission::class, ['intervenant', 'autoValidation']); $this->spec(['description' => ['type' => 'Textarea'], 'etudiantsSuivis' => ['type' => 'Textarea']]); $this->build(); $tmDql = "SELECT tm FROM " . TypeMission::class . " tm WHERE tm.histoDestruction IS NULL AND tm.annee = :annee"; $tmDqlParams = ['annee' => $this->getServiceContext()->getAnnee()]; $this->setValueOptions('typeMission', $tmDql, $tmDqlParams); $this->setValueOptions('typeMission', Util::collectionAsOptions($typesMissions)); $this->get('typeMission')->setAttribute('data-accompagnement-etudiants', json_encode($tmAccEtu)); $trDql = "SELECT mtr FROM " . TauxRemu::class . " mtr"; $this->setValueOptions('tauxRemu', $trDql); Loading @@ -44,6 +53,7 @@ class MissionForm extends AbstractForm 'dateDebut' => 'Date de début', 'dateFin' => 'Date de fin', 'description' => 'Descriptif de la mission', 'etudiantsSuivis' => 'Noms des étudiants suivis', ]); $this->addSubmit(); Loading