Dossier: replace nouveau scope by en_construction

This commit is contained in:
Simon Lehericey 2017-12-05 16:14:02 +01:00 committed by LeSim
parent 4be6cb9126
commit 40b9a77395
3 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ class Dossier < ActiveRecord::Base
scope :order_by_updated_at, -> (order = :desc) { order(updated_at: order) }
scope :all_state, -> { not_archived.state_not_brouillon }
scope :nouveaux, -> { not_archived.state_en_construction }
scope :en_construction, -> { not_archived.state_en_construction }
scope :en_instruction, -> { not_archived.state_en_instruction }
scope :termine, -> { not_archived.state_termine }
scope :downloadable_sorted, -> { state_not_brouillon.includes(:entreprise, :etablissement, :champs, :champs_private).order(en_construction_at: 'asc') }

View file

@ -28,7 +28,7 @@ class DossiersListGestionnaireService
end
def nouveaux
@nouveaux ||= filter_dossiers.nouveaux.order_by_updated_at('asc')
@nouveaux ||= filter_dossiers.en_construction.order_by_updated_at('asc')
end
def a_instruire

View file

@ -3,7 +3,7 @@
.count= current_gestionnaire.followed_dossiers.count
.text SUIVIS
.nouveaux-dossiers
.count= current_gestionnaire.dossiers.nouveaux.count
.count= current_gestionnaire.dossiers.en_construction.count
.text NOUVEAUX
.nouvelles-notifications
.count= current_gestionnaire.dossiers_with_notifications_count
@ -28,7 +28,7 @@
= link_to backoffice_dossiers_procedure_path(procedure.id), { title: procedure.libelle } do
.procedure-list-element{ class: ('active' if procedure.id.to_s == params[:id]) }
= procedure.libelle.truncate(50)
- total_new = procedure.dossiers.nouveaux.count
- total_new = procedure.dossiers.en_construction.count
- if total_new > 0
.badge.progress-bar-success{ title: 'Nouveaux dossiers' }
= total_new