Commit 1ea1c254 authored by joriot221's avatar joriot221
Browse files

Merge branch 'master' into FJ_Contrat_sans_projet

parents ee76412b 557f2584
Loading
Loading
Loading
Loading
+1 −2
Changes for data/ddl/view/V_INTERVENANT_HISTORIQUE.sql: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
CREATE
OR REPLACE FORCE VIEW V_INTERVENANT_HISTORIQUE AS
CREATE OR REPLACE FORCE VIEW V_INTERVENANT_HISTORIQUE AS
WITH historique AS (
--Initialisation des données personnelles
    SELECT d.intervenant_id                              intervenant_id,
+4 −11
Changes for module/Application/src/Assertion/ServiceAssertion.php: 4 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -417,22 +417,15 @@ class ServiceAssertion extends AbstractAssertion
    protected function assertHasServices(Intervenant $intervenant, Structure $structure, string $etape, Role $role)
    {
        $services        = $intervenant->getService();
        $serviceEnComposanteAffectation   = [];
        $serviceHorsComposanteAffectation = [];
        $typeIntervenant = $intervenant->getStatut()->getTypeIntervenant();

        $nbServices = 0;
        foreach ($services as $service) {

            if ($service->getHistoDestruction()) continue;
            if (!$service->getElementPedagogique()) continue;

            $intervenantStructure = $service->getIntervenant()->getStructure();
            $serviceStructure     = $service->getElementPedagogique()->getStructure();
            if ($intervenantStructure == $serviceStructure) {
                $serviceEnComposanteAffectation[] = $service;
            } else {
                $serviceHorsComposanteAffectation[] = $service;
            }
            $nbServices++;
        }

        $reglesValidation = $this->getServiceRegleStructureValidation()->getList();
@@ -443,7 +436,7 @@ class ServiceAssertion extends AbstractAssertion
                if ($regle->getTypeIntervenant()->getCode() == $typeIntervenant->getCode()) {
                    //Cas 1 : Si la priorité est sur l'enseignement et qu'il y a du service sur la composante du gestionnaire alors on peut valider ces services
                    //Cas 2 : Si la priorité est sur l'affectation et que la composante d'affectation de l'intervenant égale à la composante du gestionnaire alors on peut valider tout le service
                    if (($regle->getPriorite() == 'enseignement' && count($serviceEnComposanteAffectation) > 0) ||
                    if (($regle->getPriorite() == 'enseignement' && $nbServices > 0) ||
                        ($regle->getPriorite() == 'affectation' && $intervenant->getStructure() == $role->getStructure())) {
                        return true;
                    }
@@ -454,7 +447,7 @@ class ServiceAssertion extends AbstractAssertion
                if ($regle->getTypeIntervenant()->getCode() == $typeIntervenant->getCode()) {
                    //Cas 1 : Si la priorité est sur l'enseignement et qu'il y a du service sur la composante du gestionnaire alors on peut valider ces services
                    //Cas 2 : Si la priorité est sur l'affectation et que la composante d'affectation de l'intervenant égale à la composante du gestionnaire alors on peut valider tout le service
                    if (($regle->getPriorite() == 'enseignement' && count($serviceEnComposanteAffectation) > 0) ||
                    if (($regle->getPriorite() == 'enseignement' && $nbServices > 0) ||
                        ($regle->getPriorite() == 'affectation' && $intervenant->getStructure() == $role->getStructure())) {
                        return true;
                    }
+1 −1
Changes for module/Application/src/Connecteur/Traits/LdapConnecteurAwareTrait.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ trait LdapConnecteurAwareTrait
     *
     * @return self
     */
    public function setConnecteurLdap(LdapConnecteur $connecteurLdap)
    public function setConnecteurLdap(?LdapConnecteur $connecteurLdap)
    {
        $this->connecteurLdap = $connecteurLdap;

+1 −1
Changes for module/Application/src/Controller/TypeInterventionController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ class TypeInterventionController extends AbstractController

        $typeIntervention          = $this->getEvent()->getParam('typeIntervention');
        $typeInterventionStructure = $this->getEvent()->getParam('typeInterventionStructure');
        $form                      = $this->getFormTypeInterventionStructureSaisie();
        $form                      = $this->getFormTypeInterventionTypeInterventionStructureSaisie();
        if (empty($typeInterventionStructure)) {
            $title                     = 'Ajouter une exception pour une structure';
            $typeInterventionStructure = $this->getServiceTypeInterventionStructure()->newEntity()
+4 −2
Changes for module/Application/src/Form/TypeIntervention/Traits/TypeInterventionStructureSaisieFormAwareTrait.php: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -14,12 +14,13 @@ trait TypeInterventionStructureSaisieFormAwareTrait
    protected ?TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie = null;



    /**
     * @param TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie
     *
     * @return self
     */
    public function setFormTypeInterventionnStructureSaisie(?TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie)
    public function setFormTypeInterventionTypeInterventionStructureSaisie(?TypeInterventionStructureSaisieForm $formTypeInterventionTypeInterventionStructureSaisie)
    {
        $this->formTypeInterventionTypeInterventionStructureSaisie = $formTypeInterventionTypeInterventionStructureSaisie;

@@ -27,7 +28,8 @@ trait TypeInterventionStructureSaisieFormAwareTrait
    }


    public function getFormTypeInterventionStructureSaisie(): ?TypeInterventionStructureSaisieForm

    public function getFormTypeInterventionTypeInterventionStructureSaisie(): ?TypeInterventionStructureSaisieForm
    {
        if (!empty($this->formTypeInterventionTypeInterventionStructureSaisie)) {
            return $this->formTypeInterventionTypeInterventionStructureSaisie;