chore: badges "en attente" / "à corriger" in dossiers list & headers
This commit is contained in:
parent
538e24fa7e
commit
36efb31728
8 changed files with 23 additions and 6 deletions
|
@ -45,7 +45,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
.number-col {
|
||||
.number-col,
|
||||
.fr-badge {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,10 @@ module DossierHelper
|
|||
tag.span(status_text, class: "label #{status_class} ")
|
||||
end
|
||||
|
||||
def pending_correction_badge(for_profile, html_class: nil)
|
||||
tag.span(Dossier.human_attribute_name("pending_correction.#{for_profile}"), class: ['fr-badge fr-badge--sm fr-badge--warning super', html_class], role: 'status')
|
||||
end
|
||||
|
||||
def demandeur_dossier(dossier)
|
||||
if dossier.procedure.for_individual?
|
||||
"#{dossier&.individual&.nom} #{dossier&.individual&.prenom}"
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
= "Dossier nº #{dossier.id}"
|
||||
|
||||
= status_badge(dossier.state, 'super')
|
||||
= pending_correction_badge(:for_instructeur) if dossier.pending_resolution?
|
||||
|
||||
= link_to dossier.procedure.libelle.truncate_words(10), instructeur_procedure_path(dossier.procedure), title: dossier.procedure.libelle, class: "fr-link"
|
||||
= procedure_badge(dossier.procedure)
|
||||
|
||||
|
|
|
@ -170,10 +170,9 @@
|
|||
= "- #{t('views.instructeurs.dossiers.deleted_by_user')}" if p.hidden_by_user_at.present?
|
||||
|
||||
%td.status-col
|
||||
- if p.hidden_by_administration_at.present?
|
||||
%span.cell-link= status_badge(p.state)
|
||||
- else
|
||||
%a.cell-link{ href: path }= status_badge(p.state)
|
||||
- status = [status_badge(p.state)]
|
||||
- status << pending_correction_badge(:for_instructeur, html_class: "fr-mt-1v") if p.pending_correction?
|
||||
= link_to_if(p.hidden_by_administration_at.blank?, safe_join(status), path, class: class_names("cell-link": true, "fr-py-0": status.many?))
|
||||
|
||||
%td.action-col.follow-col
|
||||
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right
|
||||
|
|
|
@ -37,7 +37,11 @@
|
|||
%td
|
||||
%span.cell-link= demandeur_dossier(dossier)
|
||||
%td.status-col
|
||||
= status_badge(dossier.state)
|
||||
- if dossier.pending_correction?
|
||||
= pending_correction_badge(:for_user)
|
||||
- else
|
||||
= status_badge(dossier.state)
|
||||
|
||||
%td.updated-at-col.cell-link
|
||||
= try_format_date(dossier.updated_at)
|
||||
%td.action-col.follow-col
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
%h1
|
||||
= dossier.procedure.libelle
|
||||
= status_badge(dossier.state, 'super')
|
||||
= pending_correction_badge(:for_user) if dossier.pending_resolution?
|
||||
%h2
|
||||
= t('views.users.dossiers.show.header.dossier_number', dossier_id: dossier.id)
|
||||
- if dossier.depose_at.present?
|
||||
|
|
|
@ -15,6 +15,9 @@ en:
|
|||
accepte: "Accepted"
|
||||
refuse: "Refused"
|
||||
sans_suite: "No further action"
|
||||
pending_correction:
|
||||
for_instructeur: "pending"
|
||||
for_user: "to be corrected"
|
||||
traitement:
|
||||
state: "State"
|
||||
traitement/state:
|
||||
|
|
|
@ -19,6 +19,9 @@ fr:
|
|||
accepte: "Accepté"
|
||||
refuse: "Refusé"
|
||||
sans_suite: "Classé sans suite"
|
||||
pending_correction:
|
||||
for_instructeur: "en attente"
|
||||
for_user: "à corriger"
|
||||
traitement:
|
||||
state: "État"
|
||||
traitement/state:
|
||||
|
|
Loading…
Add table
Reference in a new issue