feat(demarche): sign up when prefilling a dossier (#8247)
* store prefill params in session Instead of using query params on /dossier/new, we assume the user comes from /commencer/:path, which is the new prefill link. There, we store the prefill params in session, and use them to prefill the dossier when creating it, in /dossiers/new. * spec: cover the case * review: serialize with json instead of yaml * review: rename method * review: store only query params * review: comment why we dont override already stored params
This commit is contained in:
parent
663c13f819
commit
b8ff0ba4a2
9 changed files with 141 additions and 30 deletions
|
@ -1,6 +1,7 @@
|
|||
module Users
|
||||
class DossiersController < UserController
|
||||
include DossierHelper
|
||||
include QueryParamsStoreConcern
|
||||
|
||||
layout 'procedure_context', only: [:identite, :update_identite, :siret, :update_siret]
|
||||
|
||||
|
@ -304,7 +305,7 @@ module Users
|
|||
)
|
||||
dossier.build_default_individual
|
||||
dossier.save!
|
||||
dossier.prefill!(PrefillParams.new(dossier, params).to_a)
|
||||
dossier.prefill!(PrefillParams.new(dossier, retrieve_and_delete_stored_query_params).to_a)
|
||||
|
||||
if dossier.procedure.for_individual
|
||||
redirect_to identite_dossier_path(dossier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue