diff --git a/app/components/procedure/one_groupe_management_component.rb b/app/components/procedure/one_groupe_management_component.rb index 26110487d..a5fe5ef20 100644 --- a/app/components/procedure/one_groupe_management_component.rb +++ b/app/components/procedure/one_groupe_management_component.rb @@ -34,8 +34,8 @@ class Procedure::OneGroupeManagementComponent < ApplicationComponent end def available_targets_for_select - @revision.types_de_champ_public - .filter { |tdc| [:drop_down_list].include?(tdc.type_champ.to_sym) } + @revision + .routable_types_de_champ .map { |tdc| [tdc.libelle, champ_value(tdc.stable_id).to_json] } end diff --git a/app/models/procedure_revision.rb b/app/models/procedure_revision.rb index 02ef041fe..0de68a045 100644 --- a/app/models/procedure_revision.rb +++ b/app/models/procedure_revision.rb @@ -236,6 +236,10 @@ class ProcedureRevision < ApplicationRecord [coordinate, coordinate&.type_de_champ] end + def routable_types_de_champ + types_de_champ_public.filter { |tdc| [:drop_down_list].include?(tdc.type_champ.to_sym) } + end + private def compute_estimated_fill_duration