nom du demandeur dans user::dossiers#index si >=2 dossiers
This commit is contained in:
parent
c5882a8b22
commit
6df927a46f
2 changed files with 19 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
|||
module DossierHelper
|
||||
include EtablissementHelper
|
||||
|
||||
def button_or_label_class(dossier)
|
||||
if dossier.accepte?
|
||||
'accepted'
|
||||
|
@ -101,6 +103,18 @@ module DossierHelper
|
|||
content_tag(:span, status_text, class: "label #{status_class} ")
|
||||
end
|
||||
|
||||
def demandeur_dossier(dossier)
|
||||
if dossier.procedure.for_individual?
|
||||
"#{dossier&.individual&.nom} #{dossier&.individual&.prenom}"
|
||||
else
|
||||
if dossier.etablissement.present?
|
||||
raison_sociale_or_name(dossier.etablissement)
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def dinum_instance?
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
%th.notification-col
|
||||
%th.number-col Nº dossier
|
||||
%th Démarche
|
||||
- if @dossiers.count > 1
|
||||
%th Demandeur
|
||||
%th.status-col Statut
|
||||
%th.updated-at-col Mis à jour
|
||||
%th
|
||||
|
@ -47,6 +49,9 @@
|
|||
%td
|
||||
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
||||
= procedure_libelle(dossier.procedure)
|
||||
- if @dossiers.count > 1
|
||||
%td.number-col
|
||||
= demandeur_dossier(dossier)
|
||||
%td.status-col
|
||||
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
||||
= status_badge(dossier.state)
|
||||
|
|
Loading…
Reference in a new issue