2019-03-25 16:54:46 +01:00
|
|
|
module Gestionnaires
|
2017-11-22 09:56:36 +01:00
|
|
|
class RechercheController < GestionnaireController
|
2017-07-31 11:58:52 +02:00
|
|
|
def index
|
|
|
|
@search_terms = params[:q]
|
2018-07-31 12:04:49 +02:00
|
|
|
@dossiers = DossierSearchService.matching_dossiers_for_gestionnaire(@search_terms, current_gestionnaire)
|
2018-10-18 15:21:58 +02:00
|
|
|
@followed_dossiers_id = current_gestionnaire
|
|
|
|
.followed_dossiers
|
|
|
|
.where(procedure_id: @dossiers.pluck(:procedure_id))
|
|
|
|
.pluck(:id)
|
2018-02-06 12:15:20 +01:00
|
|
|
end
|
2017-07-31 11:58:52 +02:00
|
|
|
end
|
|
|
|
end
|