Loading module/Oscar/src/Oscar/Controller/ProjectGrantController.php +3 −9 Original line number Diff line number Diff line Loading @@ -2775,20 +2775,14 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif case 'ap' : case 'sp' : try { // var_dump($value2); die(); $personsId[] = $value1; $person = $this->getPersonService()->getPerson($value1); $persons[$person->getId()] = $person; $crit['val1Label'] = $person->getDisplayName(); $crit['val2Label'] = $value2 >= 0 ? $this->getOscarUserContextService()->getAllRoleIdPerson( $crit['val2Label'] = $value2 > 0 ? $this->getOscarUserContextService()->getAllRoleIdPerson( )[$value2] : ''; $query = $queryPersonNoRole; if ($value2 >= 0) { $queryParam['roleObj'] = $this->getEntityManager()->getRepository(Role::class)->find( $value2 ); $query = $queryPersonRole; } $ids = array_keys($query->setParameters($queryParam)->getQuery()->getArrayResult()); $ids = $this->getActivityService()->getActivityRepository()->getIdsForPersonWithRole($person->getId(), $value2 ? $value2 : 0); } catch (\Exception $e) { $crit['error'] = "Impossible de filtrer sur la personne"; } Loading module/Oscar/view/oscar/project-grant/advanced-search.phtml +12 −1 Original line number Diff line number Diff line Loading @@ -386,7 +386,7 @@ {{#if error}}<strong class="text-danger"><i class="icon-attention-1"></i> {{error}}</strong>{{/if}} <div class="icon-building-filled"></div> <input type="hidden" name="criteria[]" class="criteria" <input type="text" name="criteria[]" class="criteria" value="{{criteria}}"/> <small>{{typeLabel}}</small> <select class="select2 changer val1"> Loading Loading @@ -917,6 +917,17 @@ } // Select var select = filter.find('select.val2'); if( select.length > 0 ){ var val2Elem = filter.find('.val2'); if( val2Elem ){ val2 = val2Elem[0].value ? val2Elem[0].value : "0"; } } filter.find('.criteria').val(datas.type + ';' + filter.find('.val1').val() + ';' + val2); Loading Loading
module/Oscar/src/Oscar/Controller/ProjectGrantController.php +3 −9 Original line number Diff line number Diff line Loading @@ -2775,20 +2775,14 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif case 'ap' : case 'sp' : try { // var_dump($value2); die(); $personsId[] = $value1; $person = $this->getPersonService()->getPerson($value1); $persons[$person->getId()] = $person; $crit['val1Label'] = $person->getDisplayName(); $crit['val2Label'] = $value2 >= 0 ? $this->getOscarUserContextService()->getAllRoleIdPerson( $crit['val2Label'] = $value2 > 0 ? $this->getOscarUserContextService()->getAllRoleIdPerson( )[$value2] : ''; $query = $queryPersonNoRole; if ($value2 >= 0) { $queryParam['roleObj'] = $this->getEntityManager()->getRepository(Role::class)->find( $value2 ); $query = $queryPersonRole; } $ids = array_keys($query->setParameters($queryParam)->getQuery()->getArrayResult()); $ids = $this->getActivityService()->getActivityRepository()->getIdsForPersonWithRole($person->getId(), $value2 ? $value2 : 0); } catch (\Exception $e) { $crit['error'] = "Impossible de filtrer sur la personne"; } Loading
module/Oscar/view/oscar/project-grant/advanced-search.phtml +12 −1 Original line number Diff line number Diff line Loading @@ -386,7 +386,7 @@ {{#if error}}<strong class="text-danger"><i class="icon-attention-1"></i> {{error}}</strong>{{/if}} <div class="icon-building-filled"></div> <input type="hidden" name="criteria[]" class="criteria" <input type="text" name="criteria[]" class="criteria" value="{{criteria}}"/> <small>{{typeLabel}}</small> <select class="select2 changer val1"> Loading Loading @@ -917,6 +917,17 @@ } // Select var select = filter.find('select.val2'); if( select.length > 0 ){ var val2Elem = filter.find('.val2'); if( val2Elem ){ val2 = val2Elem[0].value ? val2Elem[0].value : "0"; } } filter.find('.criteria').val(datas.type + ';' + filter.find('.val1').val() + ';' + val2); Loading