Commit d73e0119 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : Erreurs sur les filtres Plusieurs Personnes/Organisations

parent bda597bd
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
## 2024

### Novembre 2024
 - [Fix] Erreur sur les filtres 'Plusieurs personnes' et 'Plusieurs organisations'
 - [Fix] Erreur avec les commandes lièes aux dépenses (`spent:list`, `spent:infos`, `spent:accounts`)
 - [Fix] Erreur dans le calcule d'accès aux documents des activités pour les personnes associées à une organisation affectée au projet des activitées.
 - [Fix] La date de dernière autentification est de nouveau mise à jour correctement.
+5 −13
Original line number Diff line number Diff line
@@ -263,8 +263,8 @@ class ProjectGrantSearchService implements UseEntityManager, UsePersonService, U

                // Personne (plusieurs)
                case 'pm' :
                    $value1 = ArrayUtils::explodeIntegerFromString($filterParams[1]);
                    if ($value1 < 1) {
                    $value1 = explode(',', $filterParams[1]);
                    if (count($value1) < 1) {
                        $filtersError = true;
                        $param['error'] = "Identifiant de personne incorrecte";
                    }
@@ -441,11 +441,7 @@ class ProjectGrantSearchService implements UseEntityManager, UsePersonService, U
        // RECHERCHE TEXTUELLE
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if ($search) {
            $this->getLoggerService()->debug("Recherche textuelle '$search'");
            try {
                $this->getLoggerService()->debug(
                    "Recherche textuelle '" . $search . "')"
                );;
                $idsSearched = $this->getProjectGrantService()->search($search, true);
                $idsActivitySearch = $idsSearched['activity_ids'];
                $this->getLoggerService()->debug(
@@ -541,8 +537,7 @@ class ProjectGrantSearchService implements UseEntityManager, UsePersonService, U
                    ///////////////////////////////// Structure de RECHERCHE - PLUSIEURS
                    case 'om':
                        try {
                            $value1 = explode(',', $params[1]);
                            $filter['val1'] = $value1;
                            $filter['val1'] = implode(',', $value1);
                            $organisationsRequire = $this->getOrganizationService()->getOrganizationsByIds($value1);

                            foreach ($organisationsRequire as $organisation) {
@@ -630,8 +625,8 @@ class ProjectGrantSearchService implements UseEntityManager, UsePersonService, U

                    ///////////////////////////////// Plusieurs PERSONNE
                    case 'pm' :
                        $value1 = \Oscar\Utils\ArrayUtils::explodeIntegerFromString($params[1]);
                        $filter['val1'] = $value1;
                        $value1 = $value1;
                        $filter['val1'] = implode(',', $value1);
                        $filterPersons = $this->getProjectGrantService()->getPersonService()->getPersonRepository(
                        )->getPersonsByIds_idValue(
                            $value1
@@ -929,9 +924,6 @@ class ProjectGrantSearchService implements UseEntityManager, UsePersonService, U

                    $filter['filtered'] = count($filteredIds);
                }
                else {
                    $filter['error'] = $filter['error'] ?: "Filtre non-appliqué";
                }

                $filter['took'] = (int)((microtime(true) - $time_start) * 1000);
                $criterias[] = $filter;
+0 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@
            <nav>
                <a href="#" class="delete">
                    <i class="icon-cancel-outline"></i>
                    <i class="icon-cancel-outline"></i>
                </a>
            </nav>
        </article>