Merge branch 'main' into feature/add_rna_type_de_champs
This commit is contained in:
commit
73f6063c87
173 changed files with 1194 additions and 1316 deletions
|
@ -181,7 +181,14 @@ module Users
|
|||
|
||||
respond_to do |format|
|
||||
format.html { render :brouillon }
|
||||
format.turbo_stream { render layout: false }
|
||||
format.turbo_stream do
|
||||
@to_shows, @to_hides = @dossier.champs
|
||||
.filter(&:conditional?)
|
||||
.partition(&:visible?)
|
||||
.map { |champs| champs_to_one_selector(champs) }
|
||||
|
||||
render(:update, layout: false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -205,7 +212,14 @@ module Users
|
|||
|
||||
respond_to do |format|
|
||||
format.html { render :modifier }
|
||||
format.turbo_stream { render layout: false }
|
||||
format.turbo_stream do
|
||||
@to_shows, @to_hides = @dossier.champs
|
||||
.filter(&:conditional?)
|
||||
.partition(&:visible?)
|
||||
.map { |champs| champs_to_one_selector(champs) }
|
||||
|
||||
render layout: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -392,7 +406,7 @@ module Users
|
|||
end
|
||||
|
||||
def dossier_with_champs
|
||||
dossier_scope.with_champs.find(params[:id])
|
||||
DossierPreloader.load_one(dossier)
|
||||
end
|
||||
|
||||
def should_change_groupe_instructeur?
|
||||
|
@ -520,5 +534,12 @@ module Users
|
|||
# rubocop:enable Lint/BooleanSymbol
|
||||
end
|
||||
end
|
||||
|
||||
def champs_to_one_selector(champs)
|
||||
champs
|
||||
.map(&:input_group_id)
|
||||
.map { |id| "##{id}" }
|
||||
.join(',')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue