dossier: fix redirection to dossiers/invite
This commit is contained in:
parent
01599ac1e1
commit
a5419b2f08
2 changed files with 11 additions and 7 deletions
|
@ -122,14 +122,14 @@ module NewUser
|
|||
flash.now.alert = errors
|
||||
render :modifier
|
||||
else
|
||||
if current_user.owns?(dossier)
|
||||
if Flipflop.new_dossier_details?
|
||||
redirect_to demande_dossier_path(@dossier)
|
||||
else
|
||||
redirect_to users_dossier_recapitulatif_path(@dossier)
|
||||
end
|
||||
if Flipflop.new_dossier_details?
|
||||
redirect_to demande_dossier_path(@dossier)
|
||||
else
|
||||
redirect_to users_dossiers_invite_path(@dossier.invite_for_user(current_user))
|
||||
if current_user.owns?(dossier)
|
||||
redirect_to users_dossier_recapitulatif_path(@dossier)
|
||||
else
|
||||
redirect_to users_dossiers_invite_path(@dossier.invite_for_user(current_user))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,10 @@ class Users::Dossiers::InvitesController < UsersController
|
|||
def show
|
||||
@facade = InviteDossierFacades.new params[:id].to_i, current_user.email
|
||||
|
||||
if Flipflop.new_dossier_details?
|
||||
return redirect_to dossier_path(@facade.dossier)
|
||||
end
|
||||
|
||||
if @facade.dossier.brouillon?
|
||||
redirect_to brouillon_dossier_path(@facade.dossier)
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue