2022-09-08 11:25:39 +02:00
|
|
|
class EditableChamp::CarteComponent < EditableChamp::EditableChampBaseComponent
|
2022-08-12 10:45:04 +02:00
|
|
|
include ApplicationHelper
|
2024-04-09 16:18:44 +02:00
|
|
|
def dsfr_champ_container
|
|
|
|
:fieldset
|
|
|
|
end
|
2023-02-27 11:59:38 +01:00
|
|
|
|
|
|
|
def initialize(**args)
|
|
|
|
super(**args)
|
|
|
|
|
|
|
|
@autocomplete_component = EditableChamp::ComboSearchComponent.new(**args)
|
|
|
|
end
|
2024-04-22 10:47:47 +02:00
|
|
|
|
|
|
|
def update_path
|
|
|
|
if Champ.update_by_stable_id?
|
|
|
|
champs_carte_features_path(@champ.dossier, @champ.stable_id, row_id: @champ.row_id)
|
|
|
|
else
|
|
|
|
champs_legacy_carte_features_path(@champ)
|
|
|
|
end
|
|
|
|
end
|
2022-08-12 10:45:04 +02:00
|
|
|
end
|