demarches-normaliennes/app/components/editable_champ/carte_component.rb

23 lines
551 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class EditableChamp::CarteComponent < EditableChamp::EditableChampBaseComponent
2022-08-12 10:45:04 +02:00
include ApplicationHelper
def dsfr_champ_container
:fieldset
end
2024-05-06 18:10:30 +02:00
def react_props
{
feature_collection: @champ.to_feature_collection,
champ_id: @champ.input_id,
url: update_path,
adresse_source: data_sources_data_source_adresse_path,
options: @champ.render_options
}
end
def update_path
champs_carte_features_path(@champ.dossier, @champ.stable_id, row_id: @champ.row_id)
end
2022-08-12 10:45:04 +02:00
end