Update app/components/procedure/revision_changes_component.rb

Co-authored-by: Colin Darie <colin@darie.eu>
This commit is contained in:
Paul Chavard 2023-04-26 15:01:46 +02:00 committed by GitHub
parent 26798e8ed9
commit e16de77418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ class Procedure::RevisionChangesComponent < ApplicationComponent
@changes = changes
@previous_revision = previous_revision
@public_move_changes, @private_move_changes = changes.filter { _1.op == :move }.partition { !_1.private? }
@delete_champ_warning = !total_dossiers.zero? && !@changes.any? { !_1.can_rebase? }
@delete_champ_warning = !total_dossiers.zero? && !@changes.all?(&:can_rebase?)
end
private