Instructeur : add overview table with counts for files

nombre total de dossier :
- 'à suivre'
- 'suivi'
- 'traité'
- 'dossier'
- 'archivé'
This commit is contained in:
Myriam 2020-06-25 15:19:54 +02:00 committed by Keirua (Rebase PR Action)
parent 22515ffbfe
commit a486fe9a2e
7 changed files with 87 additions and 4 deletions

View file

@ -29,6 +29,18 @@ module Instructeurs
.group('groupe_instructeurs.procedure_id')
.reorder(nil)
.count
@all_dossiers_counts = {}
@all_dossiers_counts['à suivre'] = dossiers.without_followers.en_cours.count
@all_dossiers_counts['suivi'] = current_instructeur
.followed_dossiers
.joins(:groupe_instructeur)
.en_cours
.where(groupe_instructeur_id: groupe_ids)
.count
@all_dossiers_counts['traité'] = dossiers.termine.count
@all_dossiers_counts['dossier'] = dossiers.all_state.count
@all_dossiers_counts['archivé'] = dossiers.archived.count
end
def show