Loading data/ddl/table/CANDIDATURE.php +12 Changes for data/ddl/table/CANDIDATURE.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -141,6 +141,18 @@ return [ 'position' => 4, 'commentaire' => NULL, ], 'DATE_COMMISSION' => [ 'name' => 'DATE_COMMISSION', 'type' => 'date', 'bdd-type' => 'DATE', 'length' => 0, 'scale' => null, 'precision' => null, 'nullable' => true, 'default' => null, 'position' => 4, 'commentaire' => null, ], ], ]; Loading front/Mission/ListeCandidatures.vue +10 −4 Changes for front/Mission/ListeCandidatures.vue: 10 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -6,17 +6,19 @@ <th>Offre d'emploi</th> <th>Composante</th> <th>Etat</th> <th>Date commission</th> <th v-if="canValiderCandidature">Action</th> </tr> </thead> <tbody> <tr v-if="candidatures.length == 0"> <td v-if="canValiderCandidature" colspan="4" style="text-align:center;">Aucune candidature</td> <td v-if="!canValiderCandidature" colspan="3" style="text-align:center;">Aucune candidature</td> <td v-if="canValiderCandidature" colspan="5" style="text-align:center;">Aucune candidature</td> </tr> <tr v-for="candidature in candidatures" :key="candidature.id"> <td style="text-align:center;"><a :href="urlOffre(candidature)">{{ candidature.offre.titre }}</a></td> <td style="text-align:center;">{{ candidature.offre.structure.libelleLong }}</td> <td style="text-align:center;">{{ candidature.offre.structure.libelleCourt }}</td> <td style="text-align:center;"> <span v-if="candidature.validation" class="badge rounded-pill bg-success">Acceptée par {{ candidature.validation.histoCreateur.displayName Loading @@ -24,6 +26,10 @@ <span v-if="!candidature.validation && candidature.motif !== null" class="badge rounded-pill bg-danger">{{ candidature.motif }}</span> <span v-if="!candidature.validation && candidature.motif === null" class="badge rounded-pill bg-warning">En attente d'acceptation</span> </td> <td> <u-date v-if="candidature.dateCommission" :value="candidature.dateCommission"/> </td> <td v-if="this.canValiderCandidature" style="text-align:center;"> <a v-if="!candidature.validation" :href="urlAccepterCandidature(candidature)" class="btn btn-success" Loading Loading @@ -97,7 +103,7 @@ export default { }, validerCandidature(event) { popConfirm(event.target, (response) => { modAjax(event.currentTarget, (widget) => { this.reload(); }); }, Loading module/Mission/src/Controller/OffreEmploiController.php +23 −4 Changes for module/Mission/src/Controller/OffreEmploiController.php: 23 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\ValidationServiceAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use Doctrine\ORM\Query; use Laminas\View\Model\ViewModel; use Mission\Entity\Db\Candidature; use Mission\Entity\Db\Mission; use Mission\Entity\Db\OffreEmploi; Loading Loading @@ -177,9 +178,17 @@ class OffreEmploiController extends AbstractController /** @var Candidature $candidature */ $candidature = $this->getEvent()->getParam('candidature'); if ($candidature->isValide()) { $this->flashMessenger()->addInfoMessage('La candidature est déjà acceptée'); } else { $title = "Accepter candidature"; $request = $this->getRequest(); if ($request->isPost()) { $dateCommission = $this->getRequest()->getPost('date-commission'); if (!empty($dateCommission)) { $dateCommission = new \DateTime($dateCommission); $candidature->setDateCommission($dateCommission); $this->getServiceValidation()->validerCandidature($candidature); $this->getServiceCandidature()->save($candidature); //Envoyer mail de confirmation d'acceptation de candidature Loading @@ -187,10 +196,19 @@ class OffreEmploiController extends AbstractController $this->flashMessenger()->addSuccessMessage("La candidature est bien acceptée"); $mission = $this->getServiceMission()->createMissionFromCandidature($candidature); $this->getServiceWorkflow()->calculerTableauxBord([], $candidature->getIntervenant()); } else { $this->flashMessenger()->addErrorMessage("Vous n'avez pas renseigné la date de commission de recurtement"); } //On valide la candidature } $vm = new ViewModel(); $vm->setTemplate('mission/offre-emploi/accepter-candidature'); $vm->setVariables(compact('title', 'candidature')); return $vm; return $this->getAction($candidature->getOffre()); } Loading @@ -211,6 +229,7 @@ class OffreEmploiController extends AbstractController if ($candidature->isValide()) { $validation = $candidature->getValidation(); $candidature->setValidation(null); $candidature->setDateCommission(null); $this->getServiceValidation()->delete($validation); } Loading module/Mission/src/Entity/Db/Candidature.php +14 Changes for module/Mission/src/Entity/Db/Candidature.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface protected ?string $motif = null; protected ?\DateTime $dateCommission = null; public function getResourceId () { Loading Loading @@ -147,4 +149,16 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface return $this; } public function getDateCommission (): ?\DateTime { return $this->dateCommission; } public function setDateCommission (?\DateTime $dateCommission): self { $this->dateCommission = $dateCommission; return $this; } } module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Candidature.dcm.xml +2 Changes for module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Candidature.dcm.xml: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ <join-column name="VALIDATION_ID" referenced-column-name="ID"/> </many-to-one> <field name="motif" type="string" column="MOTIF" length="4000" nullable="true"/> <field name="dateCommission" type="datetime" column="DATE_COMMISSION" nullable="true"/> <field name="histoCreation" type="datetime" column="HISTO_CREATION" nullable="false"/> <many-to-one field="histoCreateur" target-entity="Application\Entity\Db\Utilisateur"> <join-column name="HISTO_CREATEUR_ID" referenced-column-name="ID"/> Loading Loading
data/ddl/table/CANDIDATURE.php +12 Changes for data/ddl/table/CANDIDATURE.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -141,6 +141,18 @@ return [ 'position' => 4, 'commentaire' => NULL, ], 'DATE_COMMISSION' => [ 'name' => 'DATE_COMMISSION', 'type' => 'date', 'bdd-type' => 'DATE', 'length' => 0, 'scale' => null, 'precision' => null, 'nullable' => true, 'default' => null, 'position' => 4, 'commentaire' => null, ], ], ]; Loading
front/Mission/ListeCandidatures.vue +10 −4 Changes for front/Mission/ListeCandidatures.vue: 10 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -6,17 +6,19 @@ <th>Offre d'emploi</th> <th>Composante</th> <th>Etat</th> <th>Date commission</th> <th v-if="canValiderCandidature">Action</th> </tr> </thead> <tbody> <tr v-if="candidatures.length == 0"> <td v-if="canValiderCandidature" colspan="4" style="text-align:center;">Aucune candidature</td> <td v-if="!canValiderCandidature" colspan="3" style="text-align:center;">Aucune candidature</td> <td v-if="canValiderCandidature" colspan="5" style="text-align:center;">Aucune candidature</td> </tr> <tr v-for="candidature in candidatures" :key="candidature.id"> <td style="text-align:center;"><a :href="urlOffre(candidature)">{{ candidature.offre.titre }}</a></td> <td style="text-align:center;">{{ candidature.offre.structure.libelleLong }}</td> <td style="text-align:center;">{{ candidature.offre.structure.libelleCourt }}</td> <td style="text-align:center;"> <span v-if="candidature.validation" class="badge rounded-pill bg-success">Acceptée par {{ candidature.validation.histoCreateur.displayName Loading @@ -24,6 +26,10 @@ <span v-if="!candidature.validation && candidature.motif !== null" class="badge rounded-pill bg-danger">{{ candidature.motif }}</span> <span v-if="!candidature.validation && candidature.motif === null" class="badge rounded-pill bg-warning">En attente d'acceptation</span> </td> <td> <u-date v-if="candidature.dateCommission" :value="candidature.dateCommission"/> </td> <td v-if="this.canValiderCandidature" style="text-align:center;"> <a v-if="!candidature.validation" :href="urlAccepterCandidature(candidature)" class="btn btn-success" Loading Loading @@ -97,7 +103,7 @@ export default { }, validerCandidature(event) { popConfirm(event.target, (response) => { modAjax(event.currentTarget, (widget) => { this.reload(); }); }, Loading
module/Mission/src/Controller/OffreEmploiController.php +23 −4 Changes for module/Mission/src/Controller/OffreEmploiController.php: 23 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\ValidationServiceAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use Doctrine\ORM\Query; use Laminas\View\Model\ViewModel; use Mission\Entity\Db\Candidature; use Mission\Entity\Db\Mission; use Mission\Entity\Db\OffreEmploi; Loading Loading @@ -177,9 +178,17 @@ class OffreEmploiController extends AbstractController /** @var Candidature $candidature */ $candidature = $this->getEvent()->getParam('candidature'); if ($candidature->isValide()) { $this->flashMessenger()->addInfoMessage('La candidature est déjà acceptée'); } else { $title = "Accepter candidature"; $request = $this->getRequest(); if ($request->isPost()) { $dateCommission = $this->getRequest()->getPost('date-commission'); if (!empty($dateCommission)) { $dateCommission = new \DateTime($dateCommission); $candidature->setDateCommission($dateCommission); $this->getServiceValidation()->validerCandidature($candidature); $this->getServiceCandidature()->save($candidature); //Envoyer mail de confirmation d'acceptation de candidature Loading @@ -187,10 +196,19 @@ class OffreEmploiController extends AbstractController $this->flashMessenger()->addSuccessMessage("La candidature est bien acceptée"); $mission = $this->getServiceMission()->createMissionFromCandidature($candidature); $this->getServiceWorkflow()->calculerTableauxBord([], $candidature->getIntervenant()); } else { $this->flashMessenger()->addErrorMessage("Vous n'avez pas renseigné la date de commission de recurtement"); } //On valide la candidature } $vm = new ViewModel(); $vm->setTemplate('mission/offre-emploi/accepter-candidature'); $vm->setVariables(compact('title', 'candidature')); return $vm; return $this->getAction($candidature->getOffre()); } Loading @@ -211,6 +229,7 @@ class OffreEmploiController extends AbstractController if ($candidature->isValide()) { $validation = $candidature->getValidation(); $candidature->setValidation(null); $candidature->setDateCommission(null); $this->getServiceValidation()->delete($validation); } Loading
module/Mission/src/Entity/Db/Candidature.php +14 Changes for module/Mission/src/Entity/Db/Candidature.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface protected ?string $motif = null; protected ?\DateTime $dateCommission = null; public function getResourceId () { Loading Loading @@ -147,4 +149,16 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface return $this; } public function getDateCommission (): ?\DateTime { return $this->dateCommission; } public function setDateCommission (?\DateTime $dateCommission): self { $this->dateCommission = $dateCommission; return $this; } }
module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Candidature.dcm.xml +2 Changes for module/Mission/src/Entity/Db/Mapping/Mission.Entity.Db.Candidature.dcm.xml: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ <join-column name="VALIDATION_ID" referenced-column-name="ID"/> </many-to-one> <field name="motif" type="string" column="MOTIF" length="4000" nullable="true"/> <field name="dateCommission" type="datetime" column="DATE_COMMISSION" nullable="true"/> <field name="histoCreation" type="datetime" column="HISTO_CREATION" nullable="false"/> <many-to-one field="histoCreateur" target-entity="Application\Entity\Db\Utilisateur"> <join-column name="HISTO_CREATEUR_ID" referenced-column-name="ID"/> Loading