Use the archived and not_archived Dossier scopes

This commit is contained in:
gregoirenovel 2017-07-10 16:15:09 +02:00
parent f480f26bd4
commit 3a602b05a4
3 changed files with 7 additions and 7 deletions

View file

@ -14,7 +14,7 @@ class DossiersListFacades
end
def total_dossier
current_devise_profil.dossiers.where(archived: false).count
current_devise_profil.dossiers.not_archived.count
end
def total_dossier_follow
@ -22,11 +22,11 @@ class DossiersListFacades
end
def total_new_dossier
current_devise_profil.dossiers.where(state: :initiated, archived: false).count
current_devise_profil.dossiers.where(state: :initiated).not_archived.count
end
def new_dossier_number procedure_id
current_devise_profil.dossiers.where(state: :initiated, archived: false, procedure_id: procedure_id).count
current_devise_profil.dossiers.where(state: :initiated).not_archived.where(procedure_id: procedure_id).count
end
def gestionnaire_procedures_name_and_id_list