Merge pull request #6685 from betagouv/US/fix-user-dossiers-traites
hotfix(scoping): try to avoid requesting archived: false when using termine scope
This commit is contained in:
commit
530069b94d
3 changed files with 3 additions and 4 deletions
|
@ -16,8 +16,8 @@ module Users
|
||||||
before_action :store_user_location!, only: :new
|
before_action :store_user_location!, only: :new
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@user_dossiers = current_user.dossiers.includes(:procedure).not_termine.order_by_updated_at.page(page)
|
@user_dossiers = current_user.dossiers.includes(:procedure).state_not_termine.order_by_updated_at.page(page)
|
||||||
@dossiers_traites = current_user.dossiers.includes(:procedure).termine.not_hidden_by_user.order_by_updated_at.page(page)
|
@dossiers_traites = current_user.dossiers.includes(:procedure).state_termine.not_hidden_by_user.order_by_updated_at.page(page)
|
||||||
@dossiers_invites = current_user.dossiers_invites.includes(:procedure).order_by_updated_at.page(page)
|
@dossiers_invites = current_user.dossiers_invites.includes(:procedure).order_by_updated_at.page(page)
|
||||||
@dossiers_supprimes = current_user.deleted_dossiers.order_by_updated_at.page(page)
|
@dossiers_supprimes = current_user.deleted_dossiers.order_by_updated_at.page(page)
|
||||||
@dossier_transfers = DossierTransfer
|
@dossier_transfers = DossierTransfer
|
||||||
|
|
|
@ -232,7 +232,7 @@ class Dossier < ApplicationRecord
|
||||||
scope :en_construction, -> { not_archived.state_en_construction }
|
scope :en_construction, -> { not_archived.state_en_construction }
|
||||||
scope :en_instruction, -> { not_archived.state_en_instruction }
|
scope :en_instruction, -> { not_archived.state_en_instruction }
|
||||||
scope :termine, -> { not_archived.state_termine }
|
scope :termine, -> { not_archived.state_termine }
|
||||||
scope :not_termine, -> { state_not_termine }
|
|
||||||
scope :processed_in_month, -> (month) do
|
scope :processed_in_month, -> (month) do
|
||||||
state_termine
|
state_termine
|
||||||
.joins(:traitements)
|
.joins(:traitements)
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
dossiers_path(statut: 'en-cours'),
|
dossiers_path(statut: 'en-cours'),
|
||||||
active: @statut == 'en-cours',
|
active: @statut == 'en-cours',
|
||||||
badge: number_with_html_delimiter(@user_dossiers.count))
|
badge: number_with_html_delimiter(@user_dossiers.count))
|
||||||
|
|
||||||
- if @dossiers_traites.present?
|
- if @dossiers_traites.present?
|
||||||
= tab_item(t('pluralize.traites', count: @dossiers_traites.count),
|
= tab_item(t('pluralize.traites', count: @dossiers_traites.count),
|
||||||
dossiers_path(statut: 'traites'),
|
dossiers_path(statut: 'traites'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue