feat(routing): add departements options to value tag if routing by epci
This commit is contained in:
parent
cf7c7d9761
commit
60e5abd266
2 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ class Procedure::OneGroupeManagementComponent < ApplicationComponent
|
|||
return [] if targeted_champ.is_a?(Logic::Empty)
|
||||
|
||||
case @revision.types_de_champ_public.find_by(stable_id: targeted_champ.stable_id).type_champ
|
||||
when TypeDeChamp.type_champs.fetch(:communes), TypeDeChamp.type_champs.fetch(:departements)
|
||||
when TypeDeChamp.type_champs.fetch(:communes), TypeDeChamp.type_champs.fetch(:departements), TypeDeChamp.type_champs.fetch(:epci)
|
||||
departements_for_select
|
||||
when TypeDeChamp.type_champs.fetch(:regions)
|
||||
regions_for_select
|
||||
|
|
|
@ -105,7 +105,7 @@ class GroupeInstructeur < ApplicationRecord
|
|||
routing_tdc = procedure.active_revision.types_de_champ.find_by(stable_id: routing_rule.left.stable_id)
|
||||
|
||||
options = case routing_tdc.type_champ
|
||||
when TypeDeChamp.type_champs.fetch(:communes), TypeDeChamp.type_champs.fetch(:departements)
|
||||
when TypeDeChamp.type_champs.fetch(:communes), TypeDeChamp.type_champs.fetch(:departements), TypeDeChamp.type_champs.fetch(:epci)
|
||||
APIGeoService.departements.map { _1[:code] }
|
||||
when TypeDeChamp.type_champs.fetch(:regions)
|
||||
APIGeoService.regions.map { _1[:code] }
|
||||
|
|
Loading…
Reference in a new issue