feat(routing): add departements options to value tag if routing by communes
This commit is contained in:
parent
50d0587a81
commit
d1cf60585a
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(:departements)
|
||||
when TypeDeChamp.type_champs.fetch(:communes), TypeDeChamp.type_champs.fetch(:departements)
|
||||
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(:departements)
|
||||
when TypeDeChamp.type_champs.fetch(:communes), TypeDeChamp.type_champs.fetch(:departements)
|
||||
APIGeoService.departements.map { _1[:code] }
|
||||
when TypeDeChamp.type_champs.fetch(:regions)
|
||||
APIGeoService.regions.map { _1[:code] }
|
||||
|
|
Loading…
Reference in a new issue