From ea559edb92995e9297d57931c4250af919ddf2a3 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 27 Jun 2023 13:07:19 +0200 Subject: [PATCH] style(demande): fix highlighted background updated at champ --- app/assets/stylesheets/02_utils.scss | 5 +++-- .../champ_row_show_component.html.haml | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/02_utils.scss b/app/assets/stylesheets/02_utils.scss index 0870552ae..d4d6f21ce 100644 --- a/app/assets/stylesheets/02_utils.scss +++ b/app/assets/stylesheets/02_utils.scss @@ -136,8 +136,9 @@ // who known .highlighted { - background: $orange-bg; - color: $black; + background-color: var(--background-contrast-yellow-moutarde); // from fr-badge--new + color: var(--text-action-high-grey); + background-clip: content-box; } .overflow-y-visible { diff --git a/app/components/dossiers/champ_row_show_component/champ_row_show_component.html.haml b/app/components/dossiers/champ_row_show_component/champ_row_show_component.html.haml index 60d763bc3..85441b587 100644 --- a/app/components/dossiers/champ_row_show_component/champ_row_show_component.html.haml +++ b/app/components/dossiers/champ_row_show_component/champ_row_show_component.html.haml @@ -8,10 +8,12 @@ - else .flex.d-block-sm %p.champ-label.flex-grow= "#{champ.libelle} :" - %p.fr-mb-0.fr-text--sm - - if updated_after_deposer?(champ) + + - if updated_after_deposer?(champ) + %p.fr-mb-0.fr-text--sm %span{ class: highlight_if_unseen_class(@demande_seen_at, champ.updated_at) } = t(:updated_at, scope: [:views, :shared, :dossiers, :form], datetime: try_format_datetime(champ.updated_at)) + - if champ.blank? && ![TypeDeChamp.type_champs.fetch(:piece_justificative), TypeDeChamp.type_champs.fetch(:titre_identite)].include?(champ.type_champ) .champ-content.fr-text-mention--grey{ class: [highlight_if_unseen_class(@demande_seen_at, champ.updated_at), champ.type_champ] } %p= t('.blank') @@ -59,4 +61,5 @@ - when TypeDeChamp.type_champs.fetch(:number) %p= number_with_html_delimiter(champ.to_s) - else - %p= format_text_value(champ.to_s.strip) unless champ.blank? + - if champ.present? + = format_text_value(champ.to_s.strip) # format already wrap in p