Fixe la liste 'tous' des dossiers instructeurs lorsqu'un dossier est en constructino et caché par l'usager
This commit is contained in:
parent
88c298a8c7
commit
0e3532a0b2
2 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ module Instructeurs
|
|||
.order(closed_at: :desc, unpublished_at: :desc, published_at: :desc, created_at: :desc)
|
||||
|
||||
dossiers = current_instructeur.dossiers.joins(:groupe_instructeur)
|
||||
@dossiers_count_per_procedure = dossiers.all_state.group('groupe_instructeurs.procedure_id').reorder(nil).count
|
||||
@dossiers_count_per_procedure = dossiers.all_state.visible_by_administration.group('groupe_instructeurs.procedure_id').reorder(nil).count
|
||||
@dossiers_a_suivre_count_per_procedure = dossiers.without_followers.en_cours.visible_by_administration.group('groupe_instructeurs.procedure_id').reorder(nil).count
|
||||
@dossiers_archived_count_per_procedure = dossiers.archived.group('groupe_instructeurs.procedure_id').count
|
||||
@dossiers_termines_count_per_procedure = dossiers.termine.visible_by_administration.group('groupe_instructeurs.procedure_id').reorder(nil).count
|
||||
|
@ -71,7 +71,7 @@ module Instructeurs
|
|||
@followed_dossiers_id = @followed_dossiers.pluck(:id)
|
||||
|
||||
@termines_dossiers = dossiers_visibles.termine.visible_by_administration
|
||||
@all_state_dossiers = dossiers_visibles.all_state
|
||||
@all_state_dossiers = dossiers_visibles.all_state.visible_by_administration
|
||||
@archived_dossiers = dossiers_visibles.archived
|
||||
@expirant_dossiers = dossiers_visibles.termine_or_en_construction_close_to_expiration
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ class Instructeur < ApplicationRecord
|
|||
COUNT(DISTINCT dossiers.id) FILTER (where not archived AND NOT (dossiers.hidden_by_user_at IS NOT NULL AND state = 'en_construction') AND dossiers.state in ('en_construction', 'en_instruction') AND follows.id IS NULL) AS a_suivre,
|
||||
COUNT(DISTINCT dossiers.id) FILTER (where not archived AND dossiers.state in ('en_construction', 'en_instruction') AND follows.instructeur_id = :instructeur_id) AS suivis,
|
||||
COUNT(DISTINCT dossiers.id) FILTER (where not archived AND dossiers.state in ('accepte', 'refuse', 'sans_suite')) AS traites,
|
||||
COUNT(DISTINCT dossiers.id) FILTER (where not archived) AS tous,
|
||||
COUNT(DISTINCT dossiers.id) FILTER (where not archived AND NOT (dossiers.hidden_by_user_at IS NOT NULL AND state = 'en_construction')) AS tous,
|
||||
COUNT(DISTINCT dossiers.id) FILTER (where archived) AS archives,
|
||||
COUNT(DISTINCT dossiers.id) FILTER (where
|
||||
procedures.procedure_expires_when_termine_enabled
|
||||
|
|
Loading…
Add table
Reference in a new issue