39 lines
1.8 KiB
Text
39 lines
1.8 KiB
Text
- content_for(:title, "Avis · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
|
||
|
||
= render partial: 'header', locals: { avis: @avis, dossier: @dossier }
|
||
|
||
.container
|
||
%section.give-avis
|
||
%h1.tab-title Donner votre avis
|
||
%h2.claimant
|
||
Demandeur :
|
||
%span.email= @avis.claimant.email
|
||
%span.date Demande d’avis envoyée le #{l(@avis.created_at, format: '%d/%m/%y')}
|
||
%p.introduction= @avis.introduction
|
||
|
||
- if @avis.introduction_file.attached?
|
||
= render Attachment::ShowComponent.new(attachment: @avis.introduction_file.attachment)
|
||
%br/
|
||
|
||
= render Attachment::DeleteFormComponent.new
|
||
= form_for @avis, url: instructeur_avis_path(@avis.procedure, @avis), html: { class: 'form' } do |f|
|
||
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
|
||
= render Attachment::EditComponent.new(attached_file: @avis.piece_justificative_file)
|
||
|
||
.flex.justify-between.align-baseline
|
||
%p.confidentiel.flex
|
||
- if @avis.confidentiel?
|
||
%span.icon.lock
|
||
%span
|
||
Cet avis est confidentiel et n’est pas affiché aux autres experts consultés
|
||
- else
|
||
%span
|
||
Cet avis est partagé avec les autres experts
|
||
.send-wrapper
|
||
= f.submit 'Envoyer votre avis', class: 'fr-btn'
|
||
|
||
- if !@dossier.termine?
|
||
= 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 }
|
||
|
||
- if @dossier.avis_for(current_instructeur).present?
|
||
= render partial: 'instructeurs/shared/avis/list', locals: { avis: @dossier.avis_for(current_instructeur), avis_seen_at: nil }
|