Commit ddc124da authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction acceptation candidature

(cherry picked from commit 5265a58d)
parent c4132c9c
Loading
Loading
Loading
Loading
+2 −14
Changes for module/Application/src/Service/ValidationService.php: 2 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ use RuntimeException;
use Service\Entity\Db\TypeVolumeHoraire;
use Service\Service\TypeVolumeHoraireServiceAwareTrait;


/**
 * Description of Validation
 *
@@ -33,7 +32,6 @@ class ValidationService extends AbstractEntityService
    use MiseEnPaiementServiceAwareTrait;
    use ContratServiceAwareTrait;


    /**
     * retourne la classe des entités
     *
@@ -46,7 +44,6 @@ class ValidationService extends AbstractEntityService
    }



    /**
     * Retourne l'alias d'entité courante
     *
@@ -58,7 +55,6 @@ class ValidationService extends AbstractEntityService
    }



    public function validerDossier (IntervenantDossier $intervenantDossier): Validation
    {
        $validation = $this->newEntity();
@@ -75,7 +71,6 @@ class ValidationService extends AbstractEntityService
    }



    public function validerMission (Mission $mission): Validation
    {
        $validation = $this->newEntity();
@@ -89,7 +84,6 @@ class ValidationService extends AbstractEntityService
    }



    public function validerVolumeHoraireMission (VolumeHoraireMission $volumeHoraireMission): Validation
    {
        if ($volumeHoraireMission->getTypeVolumeHoraire()->isPrevu()) {
@@ -109,7 +103,6 @@ class ValidationService extends AbstractEntityService
    }



    public function validerOffreEmploi (OffreEmploi $offreEmploi): Validation
    {
        $validation = $this->newEntity();
@@ -122,7 +115,6 @@ class ValidationService extends AbstractEntityService
    }



    public function validerCandidature (Candidature $candidature): Validation
    {
        $validation = $this->newEntity();
@@ -131,12 +123,13 @@ class ValidationService extends AbstractEntityService
        $this->save($validation);
        $candidature->setValidation($validation);
        $candidature->setMotif(null);
        $this->getEntityManager()->persist($candidature);
        $this->getEntityManager()->flush($candidature);

        return $validation;
    }



    /**
     *
     * @param Intervenant            $intervenant
@@ -166,7 +159,6 @@ class ValidationService extends AbstractEntityService
    }



    /**
     * Supprime (historise par défaut) le service spécifié.
     *
@@ -193,7 +185,6 @@ class ValidationService extends AbstractEntityService
            $entity->removeVolumeHoraireReferentiel($vh);
        }


        if (!$softDelete) {
            /** @var Contrat[] $contrats */
            $contrats = $this->getEntityManager()->getRepository(Contrat::class)->findBy(['validation' => $entity]);
@@ -212,7 +203,6 @@ class ValidationService extends AbstractEntityService
    }



    /**
     * Retourne une nouvelle entité de la classe donnée
     *
@@ -229,7 +219,6 @@ class ValidationService extends AbstractEntityService
    }



    /**
     * Recherche par type
     *
@@ -255,7 +244,6 @@ class ValidationService extends AbstractEntityService
    }



    /**
     * @param TypeValidation $typeValidation
     * @param Intervenant    $intervenant
+2 −15
Changes for module/Mission/src/Entity/Db/Candidature.php: 2 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@

namespace Mission\Entity\Db;


use Application\Entity\Db\Intervenant;
use Application\Entity\Db\Traits\StructureAwareTrait;
use Application\Entity\Db\Validation;
@@ -35,14 +34,12 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    protected ?string     $motif      = null;



    public function getResourceId ()
    {
        return 'Candidature';
    }



    /**
     * Retourne la représentation littérale de cet objet.
     *
@@ -54,14 +51,12 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    public function getId (): ?int
    {
        return $this->id;
    }



    /**
     * @return Intervenant
     */
@@ -71,7 +66,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @param Intervenant $intervenant
     */
@@ -83,7 +77,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @return OffreEmploi
     */
@@ -93,7 +86,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @param OffreEmploi $offre
     */
@@ -105,11 +97,10 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    public function isValide (): bool
    {

        if ($validation = $this->getValidation()) {
        $validation = $this->getValidation();
        if ($validation) {
            if ($validation->estNonHistorise()) return true;
        }

@@ -117,7 +108,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @return ?Validation
     */
@@ -127,7 +117,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @param ?Validation $validation
     */
@@ -139,7 +128,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @return string|null
     */
@@ -149,7 +137,6 @@ class Candidature implements HistoriqueAwareInterface, ResourceInterface
    }



    /**
     * @param string|null $motif
     */