2021-02-09 10:24:13 +01:00
|
|
|
|
- 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 :
|
2022-10-06 18:08:26 +02:00
|
|
|
|
%span.email.font-weight-normal= safe_claimant_email(@avis.claimant)
|
|
|
|
|
%span.date.font-weight-normal Demande d’avis envoyée le #{l(@avis.created_at, format: '%d/%m/%y')}
|
2021-02-09 10:24:13 +01:00
|
|
|
|
%p.introduction= @avis.introduction
|
|
|
|
|
|
|
|
|
|
- if @avis.introduction_file.attached?
|
2022-05-06 12:24:01 +02:00
|
|
|
|
= render Attachment::ShowComponent.new(attachment: @avis.introduction_file.attachment)
|
2021-02-09 10:24:13 +01:00
|
|
|
|
%br/
|
2023-02-21 15:49:13 +01:00
|
|
|
|
= render Attachment::DeleteFormComponent.new
|
2023-03-06 11:05:14 +01:00
|
|
|
|
= form_for @avis, url: expert_avis_path(@avis.procedure, @avis), html: { data: { controller: 'persisted-form', persisted_form_key_value: dom_id(@avis) }, multipart: true } do |f|
|
|
|
|
|
|
|
|
|
|
- if @avis.question_label
|
|
|
|
|
.fr-form-group
|
|
|
|
|
%fieldset.fr-fieldset.fr-fieldset--inline
|
|
|
|
|
%legend#radio-inline-legend.fr-fieldset__legend.fr-text--regular
|
|
|
|
|
= @avis.question_label
|
|
|
|
|
.fr-fieldset__content
|
|
|
|
|
.fr-radio-group
|
|
|
|
|
= f.radio_button :question_answer, true
|
|
|
|
|
= f.label :question_answer, 'oui', value: true, class: 'fr-label'
|
|
|
|
|
|
|
|
|
|
.fr-radio-group
|
|
|
|
|
= f.radio_button :question_answer, false
|
|
|
|
|
= f.label :question_answer, 'non', value: false, class: 'fr-label'
|
|
|
|
|
|
|
|
|
|
.fr-select-group
|
|
|
|
|
= f.text_area :answer, rows: 3, class: 'fr-input', placeholder: 'Votre avis', required: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-08 00:15:05 +01:00
|
|
|
|
= render Attachment::EditComponent.new(attached_file: @avis.piece_justificative_file, view_as: :download)
|
2021-02-09 10:24:13 +01:00
|
|
|
|
|
|
|
|
|
.flex.justify-between.align-baseline
|
|
|
|
|
%p.confidentiel.flex
|
|
|
|
|
- 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
|
2021-02-09 10:24:13 +01:00
|
|
|
|
- else
|
|
|
|
|
%span
|
|
|
|
|
Cet avis est partagé avec les autres experts
|
|
|
|
|
.send-wrapper
|
2022-10-06 18:08:26 +02:00
|
|
|
|
= f.submit 'Envoyer votre avis', class: 'fr-btn'
|
2021-02-09 10:24:13 +01:00
|
|
|
|
|
2022-11-28 22:13:36 +01:00
|
|
|
|
- if !@dossier.termine?
|
2021-02-25 10:05:19 +01:00
|
|
|
|
= render partial: "experts/shared/avis/form", locals: { url: avis_expert_avis_path(@avis.procedure, @avis), linked_dossiers: @dossier.linked_dossiers_for(current_expert), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }
|
2021-02-09 10:24:13 +01:00
|
|
|
|
|
2021-02-25 10:05:19 +01:00
|
|
|
|
- if @dossier.avis_for_expert(current_expert).present?
|
|
|
|
|
= render partial: 'experts/shared/avis/list', locals: { avis: @dossier.avis_for_expert(current_expert), avis_seen_at: nil }
|