Dossier: remove a_instruire scope
As it s a duplication of en_instruction
This commit is contained in:
parent
27013c7908
commit
fb5472d3f6
2 changed files with 2 additions and 4 deletions
|
@ -13,7 +13,6 @@ class Dossier < ActiveRecord::Base
|
|||
EN_CONSTRUCTION = %w(initiated)
|
||||
EN_INSTRUCTION = %w(received)
|
||||
EN_CONSTRUCTION_OU_INSTRUCTION = EN_CONSTRUCTION + EN_INSTRUCTION
|
||||
A_INSTRUIRE = %w(received)
|
||||
TERMINE = %w(closed refused without_continuation)
|
||||
|
||||
has_one :etablissement, dependent: :destroy
|
||||
|
@ -48,7 +47,6 @@ class Dossier < ActiveRecord::Base
|
|||
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) }
|
||||
scope :state_a_instruire, -> { where(state: A_INSTRUIRE) }
|
||||
scope :state_termine, -> { where(state: TERMINE) }
|
||||
|
||||
scope :archived, -> { where(archived: true) }
|
||||
|
@ -58,7 +56,7 @@ 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 :a_instruire, -> { not_archived.state_a_instruire.order_by_updated_at(:asc) }
|
||||
scope :en_instruction, -> { not_archived.state_en_instruction.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) }
|
||||
scope :en_cours, -> { not_archived.state_en_construction_ou_instruction.order_by_updated_at(:asc) }
|
||||
|
|
|
@ -32,7 +32,7 @@ class DossiersListGestionnaireService
|
|||
end
|
||||
|
||||
def a_instruire
|
||||
@a_instruire ||= filter_dossiers.a_instruire
|
||||
@a_instruire ||= filter_dossiers.en_instruction
|
||||
end
|
||||
|
||||
def archive
|
||||
|
|
Loading…
Reference in a new issue