fix: simplify queries
This commit is contained in:
parent
ec60c884e3
commit
51aba39787
1 changed files with 3 additions and 3 deletions
|
@ -15,9 +15,9 @@
|
||||||
|
|
||||||
- else
|
- else
|
||||||
- revision = @revision.draft? ? @revision : @procedure.revisions.where.not(id: @procedure.draft_revision_id)
|
- revision = @revision.draft? ? @revision : @procedure.revisions.where.not(id: @procedure.draft_revision_id)
|
||||||
- dossiers = current_user.dossiers.visible_by_user.where(revision: revision)
|
- dossiers = current_user.dossiers.visible_by_user.where(revision:)
|
||||||
- drafts = dossiers.merge(Dossier.state_brouillon)
|
- drafts = dossiers.brouillon
|
||||||
- not_drafts = dossiers.merge(Dossier.state_not_brouillon)
|
- not_drafts = dossiers.state_not_brouillon
|
||||||
|
|
||||||
- if @prefilled_dossier
|
- if @prefilled_dossier
|
||||||
= render Dsfr::CalloutComponent.new(title: t(".prefilled_draft"), heading_level: 'h2') do |c|
|
= render Dsfr::CalloutComponent.new(title: t(".prefilled_draft"), heading_level: 'h2') do |c|
|
||||||
|
|
Loading…
Reference in a new issue