2017-11-17 23:40:51 +01:00
|
|
|
|
- content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
|
|
|
|
|
|
2017-12-15 11:26:57 +01:00
|
|
|
|
= render partial: 'header', locals: { avis: @avis, dossier: @dossier }
|
2017-09-06 16:14:03 +02:00
|
|
|
|
|
|
|
|
|
.container
|
|
|
|
|
%section.give-avis
|
2017-12-12 16:53:19 +01:00
|
|
|
|
%h1.tab-title Donner votre avis
|
2017-09-20 10:52:48 +02:00
|
|
|
|
%h2.claimant
|
2017-09-20 10:51:06 +02:00
|
|
|
|
Demandeur :
|
|
|
|
|
%span.email= @avis.claimant.email
|
2021-05-26 15:16:30 +02:00
|
|
|
|
%span.date Demande d’avis envoyée le #{l(@avis.created_at, format: '%d/%m/%y')}
|
2017-09-20 10:52:48 +02:00
|
|
|
|
%p.introduction= @avis.introduction
|
2017-09-06 16:14:03 +02:00
|
|
|
|
|
2020-03-03 12:52:35 +01:00
|
|
|
|
- if @avis.introduction_file.attached?
|
2022-05-06 12:24:01 +02:00
|
|
|
|
= render Attachment::ShowComponent.new(attachment: @avis.introduction_file.attachment)
|
2020-03-03 12:52:35 +01:00
|
|
|
|
%br/
|
|
|
|
|
|
2020-05-20 16:32:06 +02:00
|
|
|
|
= form_for @avis, url: instructeur_avis_path(@avis.procedure, @avis), html: { class: 'form' } do |f|
|
2017-09-06 16:14:03 +02:00
|
|
|
|
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
|
2022-11-17 19:18:58 +01:00
|
|
|
|
= render Attachment::EditComponent.new(attached_file: @avis.piece_justificative_file)
|
2019-03-01 17:16:56 +01:00
|
|
|
|
|
2017-09-20 10:52:48 +02:00
|
|
|
|
.flex.justify-between.align-baseline
|
2017-12-18 17:20:43 +01:00
|
|
|
|
%p.confidentiel.flex
|
2018-11-22 18:28:08 +01:00
|
|
|
|
- if @avis.confidentiel?
|
|
|
|
|
%span.icon.lock
|
|
|
|
|
%span
|
2021-05-26 15:16:30 +02:00
|
|
|
|
Cet avis est confidentiel et n’est pas affiché aux autres experts consultés
|
2018-11-22 18:28:08 +01:00
|
|
|
|
- else
|
|
|
|
|
%span
|
|
|
|
|
Cet avis est partagé avec les autres experts
|
2017-09-20 10:52:48 +02:00
|
|
|
|
.send-wrapper
|
2022-10-12 12:26:18 +02:00
|
|
|
|
= f.submit 'Envoyer votre avis', class: 'fr-btn'
|
2017-09-06 16:14:03 +02:00
|
|
|
|
|
2022-11-28 22:13:36 +01:00
|
|
|
|
- if !@dossier.termine?
|
2020-05-20 16:32:06 +02:00
|
|
|
|
= render partial: "instructeurs/shared/avis/form", locals: { url: avis_instructeur_avis_path(@avis.procedure, @avis), linked_dossiers: @dossier.linked_dossiers_for(current_instructeur), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
|
2017-09-06 16:14:03 +02:00
|
|
|
|
|
2019-08-06 11:02:54 +02:00
|
|
|
|
- if @dossier.avis_for(current_instructeur).present?
|
|
|
|
|
= render partial: 'instructeurs/shared/avis/list', locals: { avis: @dossier.avis_for(current_instructeur), avis_seen_at: nil }
|