Loading module/Mission/src/Assertion/OffreEmploiAssertion.php +9 −12 Changes for module/Mission/src/Assertion/OffreEmploiAssertion.php: 9 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa case 'offre-emploi': case 'candidature': //Si il n'y a pas d'offre d'emploi alors il ne peut pas y avoir des candidatures if(!$this->canHaveCandidature()) { if (!$this->canHaveCandidature()) { return false; } Loading Loading @@ -103,18 +102,9 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa if (!$entity) { $entity = $this->getParam(Intervenant::class); } if (!$entity) { $entity = $this->getParam(Mission::class); } if (!$entity) { $entity = $this->getParam(VolumeHoraireMission::class); } if (!$entity) { $entity = $this->getParam(Candidature::class); } if (!$entity) { return false; } switch ($action) { case 'accepterCandidature': Loading @@ -127,8 +117,13 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa case 'candidature': return $this->canHaveCandidature(); break; } case 'get': case 'liste': case 'index': return true; } return false; } Loading Loading @@ -223,6 +218,8 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa ]); } protected function canHaveCandidature(): bool { $query = 'SELECT id FROM offre_emploi WHERE histo_destruction IS NULL AND validation_id IS NOT NULL'; Loading Loading
module/Mission/src/Assertion/OffreEmploiAssertion.php +9 −12 Changes for module/Mission/src/Assertion/OffreEmploiAssertion.php: 9 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa case 'offre-emploi': case 'candidature': //Si il n'y a pas d'offre d'emploi alors il ne peut pas y avoir des candidatures if(!$this->canHaveCandidature()) { if (!$this->canHaveCandidature()) { return false; } Loading Loading @@ -103,18 +102,9 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa if (!$entity) { $entity = $this->getParam(Intervenant::class); } if (!$entity) { $entity = $this->getParam(Mission::class); } if (!$entity) { $entity = $this->getParam(VolumeHoraireMission::class); } if (!$entity) { $entity = $this->getParam(Candidature::class); } if (!$entity) { return false; } switch ($action) { case 'accepterCandidature': Loading @@ -127,8 +117,13 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa case 'candidature': return $this->canHaveCandidature(); break; } case 'get': case 'liste': case 'index': return true; } return false; } Loading Loading @@ -223,6 +218,8 @@ class OffreEmploiAssertion extends AbstractAssertion implements EntityManagerAwa ]); } protected function canHaveCandidature(): bool { $query = 'SELECT id FROM offre_emploi WHERE histo_destruction IS NULL AND validation_id IS NOT NULL'; Loading