new user: thanks page
This commit is contained in:
parent
e05b7647cf
commit
eb937649a1
8 changed files with 67 additions and 6 deletions
1
app/assets/images/user/envoi-dossier.svg
Normal file
1
app/assets/images/user/envoi-dossier.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="82" height="88"><g fill="none" fill-rule="evenodd"><g stroke="#0069CC" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M9.203 33.348L1.083 39h-.045L1 79.334C1 83.606 4.538 87 8.865 87h62.92c4.325 0 8.296-3.168 8.296-7.44V39m-.068.125L71 33"/><path d="M2.459 39.212l38.014 25.92 38.014-26.211M3.384 84.25L29.967 58m47.595 26.25L50.979 58"/></g><path fill="#D9E9FD" d="M69.153 1H11.06c-1.087 0-1.97.896-1.97 2v6h62.031V3c0-1.104-.882-2-1.97-2"/><path stroke="#0069CC" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M69.153 1H11.06c-1.087 0-1.97.896-1.97 2v6h62.031V3c0-1.104-.882-2-1.97-2zM9.091 10v34m62.031-1V10"/><path fill="#0069CC" d="M14.017 4.695c0 .828-.661 1.5-1.477 1.5a1.49 1.49 0 0 1-1.477-1.5c0-.829.662-1.5 1.477-1.5.816 0 1.477.671 1.477 1.5m4.923 0c0 .828-.661 1.5-1.477 1.5a1.49 1.49 0 0 1-1.476-1.5c0-.829.661-1.5 1.476-1.5.816 0 1.477.671 1.477 1.5m4.923 0c0 .828-.661 1.5-1.476 1.5a1.49 1.49 0 0 1-1.477-1.5c0-.829.661-1.5 1.477-1.5.815 0 1.476.671 1.476 1.5"/><path stroke="#0069CC" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M60.291 28H20.907m39.384 8H20.907m22.646-16H20.907"/></g></svg>
|
After Width: | Height: | Size: 1.2 KiB |
32
app/assets/stylesheets/new_design/merci.scss
Normal file
32
app/assets/stylesheets/new_design/merci.scss
Normal file
|
@ -0,0 +1,32 @@
|
|||
@import "colors";
|
||||
@import "common";
|
||||
@import "constants";
|
||||
|
||||
.merci {
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
margin-top: 4 * $default-padding;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: (2 * $default-padding) 0;
|
||||
}
|
||||
|
||||
b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.send {
|
||||
margin-bottom: 2 * $default-padding;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: $default-padding;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-top: 40px;
|
||||
}
|
||||
}
|
|
@ -68,11 +68,19 @@ module NewUser
|
|||
flash.now.notice = 'Votre brouillon a bien été sauvegardé.'
|
||||
render :modifier
|
||||
else
|
||||
if @dossier.brouillon?
|
||||
redirect_to merci_dossier_path(@dossier)
|
||||
else
|
||||
redirect_to users_dossier_recapitulatif_path(@dossier)
|
||||
end
|
||||
@dossier.en_construction!
|
||||
redirect_to users_dossier_recapitulatif_path(@dossier)
|
||||
end
|
||||
end
|
||||
|
||||
def merci
|
||||
@dossier = current_user.dossiers.includes(:procedure).find(params[:id])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# FIXME: require(:dossier) when all the champs are united
|
||||
|
|
19
app/views/new_user/dossiers/merci.html.haml
Normal file
19
app/views/new_user/dossiers/merci.html.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
.merci
|
||||
.container
|
||||
= image_tag('user/envoi-dossier.svg')
|
||||
%h1 Merci !
|
||||
%p.send
|
||||
Votre dossier sur la procédure
|
||||
%b= @dossier.procedure.libelle
|
||||
a bien été envoyé.
|
||||
%p
|
||||
Vous avez désormais accès à votre
|
||||
%b dossier en ligne.
|
||||
%p
|
||||
Vous pouvez
|
||||
%b le modifier
|
||||
et
|
||||
%b échanger avec un instructeur
|
||||
lors de sa construction et de son instruction
|
||||
|
||||
= link_to 'Accéder à votre dossier', users_dossier_recapitulatif_path(@dossier), class: 'button large primary'
|
|
@ -207,6 +207,7 @@ Rails.application.routes.draw do
|
|||
get 'identite'
|
||||
patch 'update_identite'
|
||||
get 'modifier'
|
||||
get 'merci'
|
||||
end
|
||||
get 'attestation'
|
||||
end
|
||||
|
|
|
@ -162,7 +162,7 @@ describe NewUser::DossiersController, type: :controller do
|
|||
it 'updates the champs' do
|
||||
subject
|
||||
|
||||
expect(response).to redirect_to(users_dossier_recapitulatif_path(dossier))
|
||||
expect(response).to redirect_to(merci_dossier_path(dossier))
|
||||
expect(first_champ.reload.value).to eq('beautiful value')
|
||||
expect(dossier.reload.state).to eq('en_construction')
|
||||
end
|
||||
|
@ -219,7 +219,7 @@ describe NewUser::DossiersController, type: :controller do
|
|||
it 'does not raise any errors' do
|
||||
subject
|
||||
|
||||
expect(response).to redirect_to(users_dossier_recapitulatif_path(dossier))
|
||||
expect(response).to redirect_to(merci_dossier_path(dossier))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -105,7 +105,7 @@ feature 'The user' do
|
|||
click_on 'Soumettre le dossier'
|
||||
expect(user_dossier.reload.en_construction?).to be(true)
|
||||
expect(champ_value_for('text')).to eq('super texte')
|
||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(user_dossier))
|
||||
expect(page).to have_current_path(merci_dossier_path(user_dossier))
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -71,8 +71,8 @@ feature 'user path for dossier creation' do
|
|||
page.find_by_id("dossier_champs_attributes_0_value").set 'Mon super projet'
|
||||
click_on 'Soumettre le dossier'
|
||||
end
|
||||
scenario 'user is on recap page' do
|
||||
expect(page).to have_css('#users-recapitulatif-dossier-show')
|
||||
scenario 'user is on merci page' do
|
||||
expect(page).to have_current_path(merci_dossier_path(Dossier.last))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue