2016-10-05 14:28:10 +02:00
|
|
|
class Users::Dossiers::AddSiretController < ApplicationController
|
|
|
|
def show
|
2017-06-12 16:12:03 +02:00
|
|
|
@facade = DossierFacades.new params[:dossier_id], current_user.email
|
2016-10-05 14:28:10 +02:00
|
|
|
|
2018-10-01 13:24:37 +02:00
|
|
|
if !@facade.procedure.individual_with_siret?
|
|
|
|
raise ActiveRecord::RecordNotFound
|
|
|
|
end
|
2016-10-05 14:28:10 +02:00
|
|
|
|
2018-10-01 13:24:37 +02:00
|
|
|
if current_user.siret.present?
|
|
|
|
@siret = current_user.siret
|
|
|
|
end
|
2016-10-05 14:28:10 +02:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
flash.alert = t('errors.messages.dossier_not_found')
|
2018-06-27 14:47:02 +02:00
|
|
|
redirect_to url_for dossiers_path
|
2016-10-05 14:28:10 +02:00
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|