Merge pull request #9597 from demarches-simplifiees/display-rna-info-for-user-ldu

[amélioration] Affichage de plus d'info RNA coté usager + amélioration affichage coté instructeur/usager
This commit is contained in:
Lisa Durand 2023-10-17 08:35:52 +00:00 committed by GitHub
commit f8c6080292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 9 deletions

View file

@ -1,16 +1,23 @@
- if champ.value.blank?
%p= t('.not_filled')
- elsif profile == 'instructeur'
- else
- if champ.data.blank?
%p= t('.not_found', rna: champ.value)
- else
%p= t('.data_fetched_title', rna: champ.value)
%ul
.fr-background-alt--grey.fr-p-3v
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rna_champ.value")) do |c|
- c.with_value do
%p
= champ.value
= render Dsfr::CopyButtonComponent.new(text: champ.value, title: t("activemodel.attributes.rna_champ.paste"), success: t("activemodel.attributes.rna_champ.paste_success"))
- ['association_titre', 'association_objet', ].each do |scope|
- if champ.data[scope].present?
%li #{t("activemodel.attributes.rna_champ.data.#{scope}")} : #{champ.data[scope].capitalize}
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rna_champ.data.#{scope}")) do |c|
- c.with_value do
%p= champ.data[scope]
- ['association_date_creation', 'association_date_declaration', 'association_date_publication'].each do |scope|
- if champ.data[scope].present?
%li #{t("activemodel.attributes.rna_champ.data.#{scope}")} : #{l(champ.data[scope].to_date)}
- else
%p= champ.identifier
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rna_champ.data.#{scope}")) do |c|
- c.with_value do
%p= l(champ.data[scope].to_date)

View file

@ -2,12 +2,15 @@ en:
activemodel:
attributes:
rna_champ:
value: N° RNA
data:
association_titre: Association name
association_objet: Association purpose
association_date_creation: Creation date
association_date_declaration: Declaration date
association_date_publication: Publication date
paste: Copy the RNA to the clipboard
paste_success: The RNA has been copied to the clipboard
activerecord:
attributes:
champs/rna_champ:

View file

@ -9,6 +9,8 @@ fr:
association_date_creation: Date de création
association_date_declaration: Date de déclaration
association_date_publication: Date de publication
paste: Copier le RNA dans le presse-papier
paste_success: Le RNA a été copié dans le presse-papier
activerecord:
attributes:
champs/rna_champ:

View file

@ -26,7 +26,6 @@ en:
show:
not_filled: not filled
not_found: "RNA number %{rna} (no association found)"
data_fetched_title: Data received from RNA number "%{rna}"
association:
data_fetched: "This RNA number is linked to %{title}"
not_found: "No association found"

View file

@ -28,7 +28,6 @@ fr:
show:
not_filled: non renseigné
not_found: "RNA %{rna} (aucun établissement trouvé)"
data_fetched_title: Données obtenues grâce au RNA "%{rna}"
association:
data_fetched: "Ce RNA correspond à %{title}"
not_found: "Aucun établissement trouvé"