feat(file retrieval): basic UI skeleton

This commit is contained in:
simon lehericey 2023-12-19 16:31:57 +01:00
parent a60a082ec5
commit b7c48acf86
7 changed files with 112 additions and 0 deletions

View file

@ -0,0 +1,36 @@
class RecoveriesController < ApplicationController
def nature
end
def post_nature
if nature_params == 'collectivite'
redirect_to identification_recovery_path
else
redirect_to support_recovery_path
end
end
def identification
end
def post_identification
redirect_to selection_recovery_path
end
def selection
end
def post_selection
redirect_to terminee_recovery_path
end
def terminee
end
def support
end
private
def nature_params = params[:nature]
end

View file

@ -0,0 +1,20 @@
- content_for(:title) { "Identification du propriétaire" }
.fr-container.fr-my-6w
%h1 Récupération de dossiers
%h2 Identification du propriétaire des dossiers
= form_with do |f|
.fr-input-group
%label.fr-label{ for: "email" }
Email du propriétaire des dossiers
%span.fr-hint-text= t('email', scope: [:activerecord, :attributes, :default_attributes, :hints])
= f.email_field :previous_email,
required: true,
autocomplete: 'off',
class: 'fr-input width-66',
id: 'email'
%button.fr-btn Continuer

View file

@ -0,0 +1,18 @@
- content_for(:title) { "Nature des dossiers" }
.fr-container.fr-my-6w
%h1.fr-h1 Récupération de dossiers
%h2.fr-h2 Nature des dossiers
= form_with data: { controller: 'radio-enabled-submit' } do |f|
- buttons = [{ label: 'des dossiers concernant une collectivité territoriale',
value: 'collectivite',
hint: '(DETR, autres demandes de subvention, consultation du domaine, ...)' },
{ label: 'autre', value: 'autre'}]
%div{ data: { 'action': "click->radio-enabled-submit#click" } }
= render Dsfr::RadioButtonListComponent.new(form: f, target: :nature, buttons: buttons) do
%legend#radio-hint-element-legend.fr-fieldset__legend--regular.fr-fieldset__legend Quel type de dossier souhaitez vous récupérer ?
%button.fr-btn{ disabled: true, data: { 'radio-enabled-submit-target': 'submit' } } Continuer

View file

@ -0,0 +1,8 @@
- content_for(:title) { "Sélection des démarches" }
.fr-container.fr-my-6w
%h1.fr-h1 Récupération de dossiers
%h2.fr-h2 Sélection des démarches
= form_tag do
%button.fr-btn Continuer

View file

@ -0,0 +1,6 @@
- content_for(:title) { "Contactez le support" }
.fr-container.fr-my-6w
%h1.fr-h1 Récupération de dossiers
%h2.fr-h2 Veuillez contacter le support

View file

@ -0,0 +1,10 @@
- content_for(:title) { "Récupération terminée" }
.fr-container.fr-my-6w
%h1.fr-h1 Récupération de dossiers
%h2.fr-h2 Récupération terminée
%p Les dossiers vous ont été réaffectés.
= link_to "Voir mes dossiers", dossiers_path, class: "fr-btn"

View file

@ -699,6 +699,20 @@ Rails.application.routes.draw do
end
end
resource :recovery, only: [], path: :recuperation_de_dossiers do
collection do
get :nature
post :nature, action: :post_nature
get :identification
post :identification, action: :post_identification
get :selection
post :selection, action: :post_selection
get :terminee
get :support
end
root action: :nature
end
#
# Legacy routes
#