feat(Champ.carte): some error style on carte

This commit is contained in:
mfo 2024-04-09 16:18:44 +02:00
parent 4d90b1f662
commit d8a8fb53ce
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
3 changed files with 22 additions and 9 deletions

View file

@ -1,5 +1,8 @@
class EditableChamp::CarteComponent < EditableChamp::EditableChampBaseComponent class EditableChamp::CarteComponent < EditableChamp::EditableChampBaseComponent
include ApplicationHelper include ApplicationHelper
def dsfr_champ_container
:fieldset
end
def initialize(**args) def initialize(**args)
super(**args) super(**args)

View file

@ -1,11 +1,13 @@
= render @autocomplete_component .fr-fieldset__element
= render @autocomplete_component
= react_component("MapEditor", = react_component("MapEditor",
featureCollection: @champ.to_feature_collection, { featureCollection: @champ.to_feature_collection,
url: champs_carte_features_path(@champ), url: champs_carte_features_path(@champ),
options: @champ.render_options, options: @champ.render_options,
autocompleteAnnounceTemplateId: @autocomplete_component.announce_template_id, autocompleteAnnounceTemplateId: @autocomplete_component.announce_template_id,
autocompleteScreenReaderInstructions: t("combo_search_component.screen_reader_instructions")) autocompleteScreenReaderInstructions: t("combo_search_component.screen_reader_instructions") },
{class: 'width-100'})
.geo-areas{ id: dom_id(@champ, :geo_areas) } .geo-areas{ id: dom_id(@champ, :geo_areas) }
= render Dossiers::GeoAreasComponent.new(champ: @champ, editing: true) = render Dossiers::GeoAreasComponent.new(champ: @champ, editing: true)

View file

@ -3,6 +3,14 @@ class Champs::CarteChamp < Champ
DEFAULT_LON = 2.428462 DEFAULT_LON = 2.428462
DEFAULT_LAT = 46.538192 DEFAULT_LAT = 46.538192
def legend_label?
true
end
def html_label?
false
end
# We are not using scopes here as we want to access # We are not using scopes here as we want to access
# the following collections on unsaved records. # the following collections on unsaved records.
def cadastres def cadastres