[Fix #503] Dossier: Remove waiting for gestionnaire scope

This commit is contained in:
Simon Lehericey 2017-09-21 15:27:14 +02:00
parent 460cd3e237
commit 73357c5144
4 changed files with 0 additions and 17 deletions

View file

@ -32,10 +32,6 @@ class AdminProceduresShowFacades
dossiers.size
end
def dossiers_waiting_gestionnaire_total
dossiers.waiting_for_gestionnaire.size
end
def dossiers_termine_total
dossiers.where(state: :termine).size
end

View file

@ -13,7 +13,6 @@ class Dossier < ActiveRecord::Base
BROUILLON = %w(draft)
NOUVEAUX = %w(initiated)
OUVERT = %w(updated replied)
WAITING_FOR_GESTIONNAIRE = %w(updated)
EN_CONSTRUCTION = %w(initiated updated replied)
EN_INSTRUCTION = %w(received)
EN_CONSTRUCTION_OU_INSTRUCTION = EN_CONSTRUCTION + EN_INSTRUCTION
@ -50,7 +49,6 @@ class Dossier < ActiveRecord::Base
scope :state_not_brouillon, -> { where.not(state: BROUILLON) }
scope :state_nouveaux, -> { where(state: NOUVEAUX) }
scope :state_ouvert, -> { where(state: OUVERT) }
scope :state_waiting_for_gestionnaire, -> { where(state: WAITING_FOR_GESTIONNAIRE) }
scope :state_en_construction, -> { where(state: EN_CONSTRUCTION) }
scope :state_en_instruction, -> { where(state: EN_INSTRUCTION) }
scope :state_en_construction_ou_instruction, -> { where(state: EN_CONSTRUCTION_OU_INSTRUCTION) }
@ -65,7 +63,6 @@ class Dossier < ActiveRecord::Base
scope :all_state, -> { not_archived.state_not_brouillon.order_by_updated_at(:asc) }
scope :nouveaux, -> { not_archived.state_nouveaux.order_by_updated_at(:asc) }
scope :ouvert, -> { not_archived.state_ouvert.order_by_updated_at(:asc) }
scope :waiting_for_gestionnaire, -> { not_archived.state_waiting_for_gestionnaire.order_by_updated_at(:asc) }
scope :a_instruire, -> { not_archived.state_a_instruire.order_by_updated_at(:asc) }
scope :termine, -> { not_archived.state_termine.order_by_updated_at(:asc) }
scope :downloadable, -> { state_not_brouillon.order_by_updated_at(:asc) }

View file

@ -98,10 +98,6 @@
%div
= @facade.dossiers_total
%h4.text-danger Attente Accompagnateur
%div
= @facade.dossiers_waiting_gestionnaire_total
%h4.text-success Terminé
%div
= @facade.dossiers_termine_total

View file

@ -50,12 +50,6 @@ describe AdminProceduresShowFacades do
it { is_expected.to eq(4) }
end
describe 'dossiers_waiting_gestionnaire_total' do
subject { super().dossiers_waiting_gestionnaire_total }
it { is_expected.to eq(1) }
end
describe 'dossiers_termine_total' do
subject { super().dossiers_termine_total }