use routable_type_de_champ

This commit is contained in:
simon lehericey 2023-05-09 14:36:20 +02:00 committed by LeSim
parent 174f7a7c53
commit f61498693a
2 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -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