Commit 92402be7 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix: La recherche de projet ne tiens plus compte de la case pour les projets vides

Up : Le bouton "Modifier le projet" a été modifier pour "Lier à un projet" plus parlant
parent e5de3a1c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2353,6 +2353,9 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
                $this->getActivityService()->getGearmanJobLauncherService()->triggerUpdateSearchIndexActivity(
                    $entity
                );
                $this->getActivityService()->getGearmanJobLauncherService()->triggerUpdateSearchIndexProject(
                        $project
                );
                $this->redirect()->toRoute(
                    'contract/show',
                    ['id' => $entity->getId()]
+2 −2
Original line number Diff line number Diff line
@@ -119,8 +119,8 @@ class ProjectRepository extends EntityRepository
            ->where('g.id IS NULL');

        if ($searchExp) {
            $qb->andWhere('p.label LIKE :exp OR p.description LIKE :exp OR p.acronym LIKE :exp')
                ->setParameter('exp', "%$searchExp%");
            $qb->andWhere('LOWER(p.label) LIKE :exp OR LOWER(p.description) LIKE :exp OR LOWER(p.acronym) LIKE :exp')
                ->setParameter('exp', "%" . mb_strtolower($searchExp) . "%");
        }

        return $qb;
+0 −1
Original line number Diff line number Diff line
@@ -405,7 +405,6 @@ class ProjectService implements UseServiceContainer
        $idsProject = $this->getProjectGrantService()->searchProject($search);
        $idsProjectsEmpty = $this->getProjectRepository()->getEmptyIds($search);
        $idsProject = array_merge($idsProject, $idsProjectsEmpty);

        return $qb = $this->getBaseQuery()
            ->where('p.id IN (:ids)')
            ->setParameter('ids', $idsProject);
+1 −1
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@

            <a class="btn btn-default" v-if="credentials.core.change_project" :href="core.urls.change_project">
              <i class="icon-cubes"></i>
              Modifier le projet</a>
              Lier à un projet</a>

            <a class="btn btn-default" v-if="credentials.core.new_project" :href="core.urls.new_project">
              <i class="icon-cubes"></i>