dossier: remove UI for viewing old pieces justificatives
This commit is contained in:
parent
5502f2e42e
commit
f825f62ce5
7 changed files with 0 additions and 67 deletions
|
@ -1,5 +0,0 @@
|
|||
module PieceJustificativeHelper
|
||||
def display_pj_filename(pj)
|
||||
truncate(pj.original_filename, length: 60)
|
||||
end
|
||||
end
|
|
@ -17,20 +17,6 @@
|
|||
- if champs.any?
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, dossier: @dossier, demande_seen_at: nil, profile: 'instructeur' }
|
||||
|
||||
- if @dossier.types_de_piece_justificative.any?
|
||||
%h3 Pièces jointes
|
||||
|
||||
%table
|
||||
- @dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
||||
%tr
|
||||
%th= "#{type_de_piece_justificative.libelle} :"
|
||||
%td
|
||||
- pj = @dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)
|
||||
- if pj.present?
|
||||
#{pj.original_filename}
|
||||
- else
|
||||
Pièce non fournie
|
||||
|
||||
%h2 Annotations privées
|
||||
|
||||
- champs_annotations_privees = @dossier.champs_private
|
||||
|
|
|
@ -26,8 +26,3 @@
|
|||
- if champs.any?
|
||||
.card
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, demande_seen_at: demande_seen_at, profile: profile }
|
||||
|
||||
- if dossier.types_de_piece_justificative.any?
|
||||
.tab-title Pièces jointes
|
||||
.card
|
||||
= render partial: "shared/dossiers/pieces_jointes", locals: { dossier: dossier, demande_seen_at: demande_seen_at }
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
%table.table.vertical.pj.dossier-champs
|
||||
%tbody
|
||||
- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
||||
- pjs = dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).to_ary.dup
|
||||
- pj = pjs.shift if pjs.present?
|
||||
%tr
|
||||
%th= "#{type_de_piece_justificative.libelle} :"
|
||||
- if pj
|
||||
%td
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
||||
= display_pj_filename(pj)
|
||||
·
|
||||
= link_to "Télécharger", pj.content_url, class: "link", target: :blank, rel: :noopener
|
||||
- if pjs.present?
|
||||
%br
|
||||
%span.dropdown
|
||||
%button.button.dropdown-button
|
||||
anciennes versions
|
||||
.dropdown-content.fade-in-down
|
||||
%ul.dropdown-items
|
||||
- pjs.each do |pj|
|
||||
%li
|
||||
= link_to pj.content_url, { target: :blank, rel: :noopener } do
|
||||
%span.filename= display_pj_filename(pj)
|
||||
%span
|
||||
ajoutée le #{try_format_datetime(pj.created_at)}
|
||||
- else
|
||||
%td Pièce non fournie
|
||||
%td.updated-at
|
||||
- if pj
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
||||
modifié le
|
||||
= try_format_datetime(pj.updated_at)
|
|
@ -16,6 +16,5 @@ describe 'gestionnaires/dossiers/show.html.haml', type: :view do
|
|||
it 'renders the dossier infos' do
|
||||
expect(rendered).to have_text('Identité')
|
||||
expect(rendered).to have_text('Demande')
|
||||
expect(rendered).to have_text('Pièces jointes')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -51,12 +51,4 @@ describe 'shared/dossiers/demande.html.haml', type: :view do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the dossier has pièces justificatives' do
|
||||
let(:procedure) { create(:procedure, :published, :with_two_type_de_piece_justificative) }
|
||||
|
||||
it 'renders the pièces justificatives' do
|
||||
expect(rendered).to have_text('Pièces jointes')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,6 @@ describe 'users/dossiers/demande.html.haml', type: :view do
|
|||
expect(rendered).to have_text('Déposé le')
|
||||
expect(rendered).to have_text('Identité')
|
||||
expect(rendered).to have_text('Demande')
|
||||
expect(rendered).to have_text('Pièces jointes')
|
||||
end
|
||||
|
||||
context 'when the dossier is editable' do
|
||||
|
|
Loading…
Reference in a new issue