Skip to content

Commit

Permalink
fix: remove brouillon from repousser_expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
seb-by-ouidou authored and mfo committed Dec 9, 2023
1 parent 8c1bc9e commit 96adffb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/components/dossiers/batch_operation_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ def render?

def operations_for_dossier(dossier)
case dossier.state
when Dossier.states.fetch(:brouillon)
[BatchOperation.operations.fetch(:repousser_expiration)]
when Dossier.states.fetch(:en_construction)
[BatchOperation.operations.fetch(:passer_en_instruction), BatchOperation.operations.fetch(:repousser_expiration)]
when Dossier.states.fetch(:en_instruction)
Expand Down
2 changes: 1 addition & 1 deletion app/models/batch_operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def dossiers_safe_scope(dossier_ids = self.dossier_ids)
when BatchOperation.operations.fetch(:follow) then
query.visible_by_administration.without_followers.en_cours
when BatchOperation.operations.fetch(:repousser_expiration) then
query.visible_by_administration.close_to_expiration
query.visible_by_administration.termine_or_en_construction_close_to_expiration
when BatchOperation.operations.fetch(:repasser_en_construction) then
query.visible_by_administration.state_en_instruction
when BatchOperation.operations.fetch(:unfollow) then
Expand Down

0 comments on commit 96adffb

Please sign in to comment.