[Fix #1016] display notifications on PJ
This commit is contained in:
parent
c6be745067
commit
5474ff8bb4
3 changed files with 19 additions and 9 deletions
|
@ -26,4 +26,4 @@
|
||||||
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
||||||
.accompagnateur-title Pièces jointes
|
.accompagnateur-title Pièces jointes
|
||||||
.card
|
.card
|
||||||
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier }
|
= render partial: "new_gestionnaire/dossiers/pieces_jointes", locals: { dossier: @dossier, demande_seen_at: nil }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%table.table.vertical.pj
|
%table.table.vertical.pj.dossier-champs
|
||||||
%tbody
|
%tbody
|
||||||
- if dossier.procedure.cerfa_flag?
|
- if dossier.procedure.cerfa_flag?
|
||||||
%tr
|
%tr
|
||||||
|
@ -8,17 +8,22 @@
|
||||||
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "link", target: :blank
|
= link_to "Télécharger", @dossier.cerfa.last.content_url, class: "link", target: :blank
|
||||||
- else
|
- else
|
||||||
Pièce non fournie
|
Pièce non fournie
|
||||||
|
%td
|
||||||
|
|
||||||
|
|
||||||
- dossier.procedure.types_de_piece_justificative.each do |type_de_piece_justificative|
|
- 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
|
%tr
|
||||||
%th= "#{type_de_piece_justificative.libelle} :"
|
%th= "#{type_de_piece_justificative.libelle} :"
|
||||||
- pjs = dossier.retrieve_all_piece_justificative_by_type(type_de_piece_justificative.id).to_ary.dup
|
- if pj
|
||||||
- if pjs.present?
|
|
||||||
- first_pj = pjs.pop
|
|
||||||
%td= display_pj_filename(first_pj)
|
|
||||||
%td= link_to "Télécharger", first_pj.content_url, class: "link", target: :blank
|
|
||||||
%td
|
%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
|
||||||
- if pjs.present?
|
- if pjs.present?
|
||||||
|
%br
|
||||||
%span.button.dropdown
|
%span.button.dropdown
|
||||||
anciennes versions
|
anciennes versions
|
||||||
.dropdown-content.fade-in-down
|
.dropdown-content.fade-in-down
|
||||||
|
@ -28,6 +33,11 @@
|
||||||
= link_to pj.content_url, { target: :blank } do
|
= link_to pj.content_url, { target: :blank } do
|
||||||
%span.filename= display_pj_filename(pj)
|
%span.filename= display_pj_filename(pj)
|
||||||
%span
|
%span
|
||||||
ajoutée le #{pj.created_at.localtime.strftime('%d/%m %H:%M')}
|
ajoutée le #{pj.created_at.localtime.strftime('%d/%m/%Y à %H:%M')}
|
||||||
- else
|
- else
|
||||||
%td Pièce non fournie
|
%td Pièce non fournie
|
||||||
|
%td.updated-at
|
||||||
|
- if pj
|
||||||
|
%span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) }
|
||||||
|
modifié le
|
||||||
|
= pj.updated_at.localtime.strftime("%d/%m/%Y à %H:%M")
|
||||||
|
|
|
@ -25,4 +25,4 @@
|
||||||
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
- if @dossier.procedure.cerfa_flag? || @dossier.types_de_piece_justificative.any?
|
||||||
.accompagnateur-title Pièces jointes
|
.accompagnateur-title Pièces jointes
|
||||||
.card
|
.card
|
||||||
= render partial: "pieces_jointes", locals: { dossier: @dossier }
|
= render partial: "pieces_jointes", locals: { dossier: @dossier, demande_seen_at: @demande_seen_at }
|
||||||
|
|
Loading…
Reference in a new issue