moins de count dans Instructeurs::ProceduresController#show
exploitation de dossiers_count_for_instructeur dans Instructeurs::ProceduresController#showpour sortir les chiffres facilement
This commit is contained in:
parent
b4910c557d
commit
640984f9b6
2 changed files with 8 additions and 7 deletions
|
@ -102,6 +102,7 @@ module Instructeurs
|
||||||
@has_termine_notifications = current_instructeur.notifications_for_procedure(@procedure, :termine).exists?
|
@has_termine_notifications = current_instructeur.notifications_for_procedure(@procedure, :termine).exists?
|
||||||
|
|
||||||
@not_archived_notifications_dossier_ids = current_instructeur.notifications_for_procedure(@procedure, :not_archived).pluck(:id)
|
@not_archived_notifications_dossier_ids = current_instructeur.notifications_for_procedure(@procedure, :not_archived).pluck(:id)
|
||||||
|
@counters = @procedure.dossiers_count_for_instructeur(current_instructeur)
|
||||||
|
|
||||||
sorted_ids = procedure_presentation.sorted_ids(@dossiers, current_instructeur)
|
sorted_ids = procedure_presentation.sorted_ids(@dossiers, current_instructeur)
|
||||||
|
|
||||||
|
|
|
@ -24,29 +24,29 @@
|
||||||
= tab_item('à suivre',
|
= tab_item('à suivre',
|
||||||
instructeur_procedure_path(@procedure, statut: 'a-suivre'),
|
instructeur_procedure_path(@procedure, statut: 'a-suivre'),
|
||||||
active: @statut == 'a-suivre',
|
active: @statut == 'a-suivre',
|
||||||
badge: number_with_html_delimiter(@a_suivre_dossiers.count))
|
badge: number_with_html_delimiter(@counters['a_suivre']))
|
||||||
|
|
||||||
= tab_item(t('pluralize.followed', count: @followed_dossiers.count),
|
= tab_item(t('pluralize.followed', count: @counters['suivis']),
|
||||||
instructeur_procedure_path(@procedure, statut: 'suivis'),
|
instructeur_procedure_path(@procedure, statut: 'suivis'),
|
||||||
active: @statut == 'suivis',
|
active: @statut == 'suivis',
|
||||||
badge: number_with_html_delimiter(@followed_dossiers.count),
|
badge: number_with_html_delimiter(@counters['suivis']),
|
||||||
notification: @has_en_cours_notifications)
|
notification: @has_en_cours_notifications)
|
||||||
|
|
||||||
= tab_item(t('pluralize.processed', count: @termines_dossiers.count),
|
= tab_item(t('pluralize.processed', count: @counters['termines']),
|
||||||
instructeur_procedure_path(@procedure, statut: 'traites'),
|
instructeur_procedure_path(@procedure, statut: 'traites'),
|
||||||
active: @statut == 'traites',
|
active: @statut == 'traites',
|
||||||
badge: number_with_html_delimiter(@termines_dossiers.count),
|
badge: number_with_html_delimiter(@counters['termines']),
|
||||||
notification: @has_termine_notifications)
|
notification: @has_termine_notifications)
|
||||||
|
|
||||||
= tab_item('tous les dossiers',
|
= tab_item('tous les dossiers',
|
||||||
instructeur_procedure_path(@procedure, statut: 'tous'),
|
instructeur_procedure_path(@procedure, statut: 'tous'),
|
||||||
active: @statut == 'tous',
|
active: @statut == 'tous',
|
||||||
badge: number_with_html_delimiter(@all_state_dossiers.count))
|
badge: number_with_html_delimiter(@counters['total']))
|
||||||
|
|
||||||
= tab_item(t('pluralize.archived', count: @archived_dossiers.count),
|
= tab_item(t('pluralize.archived', count: @archived_dossiers.count),
|
||||||
instructeur_procedure_path(@procedure, statut: 'archives'),
|
instructeur_procedure_path(@procedure, statut: 'archives'),
|
||||||
active: @statut == 'archives',
|
active: @statut == 'archives',
|
||||||
badge: number_with_html_delimiter(@archived_dossiers.count))
|
badge: number_with_html_delimiter(@counters['archived']))
|
||||||
|
|
||||||
.procedure-actions
|
.procedure-actions
|
||||||
= render partial: "download_dossiers",
|
= render partial: "download_dossiers",
|
||||||
|
|
Loading…
Reference in a new issue