correctif(validation-des-conditions): les conditions dans un bloc repetable identifient les conditions invalident
Update app/models/procedure_revision.rb Co-authored-by: LeSim <mail@simon.lehericey.net>
This commit is contained in:
parent
92f5e7663e
commit
a53c32b41e
1 changed files with 1 additions and 0 deletions
|
@ -392,6 +392,7 @@ class ProcedureRevision < ApplicationRecord
|
||||||
public_tdcs = types_de_champ_public.to_a
|
public_tdcs = types_de_champ_public.to_a
|
||||||
|
|
||||||
public_tdcs
|
public_tdcs
|
||||||
|
.flat_map { _1.repetition? ? children_of(_1) : _1 }
|
||||||
.map.with_index
|
.map.with_index
|
||||||
.filter_map { |tdc, i| tdc.condition? ? [tdc, i] : nil }
|
.filter_map { |tdc, i| tdc.condition? ? [tdc, i] : nil }
|
||||||
.map { |tdc, i| [tdc, tdc.condition.errors(public_tdcs.take(i))] }
|
.map { |tdc, i| [tdc, tdc.condition.errors(public_tdcs.take(i))] }
|
||||||
|
|
Loading…
Reference in a new issue