2023-10-27 14:21:31 +02:00
|
|
|
|
- if champ.data.blank?
|
|
|
|
|
%p= t('.not_found', rnf: champ.rnf_id)
|
|
|
|
|
- else
|
|
|
|
|
.fr-background-alt--grey.fr-p-3v
|
|
|
|
|
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rnf_champ.rnf_id")) do |c|
|
|
|
|
|
- c.with_value do
|
|
|
|
|
%p
|
|
|
|
|
= champ.rnf_id
|
|
|
|
|
= render Dsfr::CopyButtonComponent.new(text: champ.rnf_id, title: t("activemodel.attributes.rnf_champ.paste"), success: t("activemodel.attributes.rnf_champ.paste_success"))
|
|
|
|
|
|
2023-11-06 15:29:13 +01:00
|
|
|
|
- ['title', 'email', 'phone','status'].each do |scope|
|
2023-10-27 14:21:31 +02:00
|
|
|
|
- if champ.data[scope].present?
|
|
|
|
|
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rnf_champ.data.#{scope}")) do |c|
|
2023-11-06 15:29:13 +01:00
|
|
|
|
- c.with_value do
|
|
|
|
|
%p= champ.data[scope]
|
|
|
|
|
|
2023-10-27 14:21:31 +02:00
|
|
|
|
- ['createdAt', 'updatedAt', 'dissolvedAt'].each do |scope|
|
|
|
|
|
- if champ.data[scope].present?
|
|
|
|
|
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rnf_champ.data.#{scope}")) do |c|
|
|
|
|
|
- c.with_value do
|
|
|
|
|
%p= l(champ.data[scope].to_date)
|
2023-11-06 15:29:13 +01:00
|
|
|
|
|
|
|
|
|
- if champ.data['address'].present?
|
|
|
|
|
- ['label', 'cityCode', 'postalCode'].each do |scope|
|
|
|
|
|
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rnf_champ.data.#{scope}")) do |c|
|
|
|
|
|
- c.with_value do
|
|
|
|
|
%p= champ.data['address'][scope]
|
|
|
|
|
= render Dossiers::RowShowComponent.new(label: t("activemodel.attributes.rnf_champ.data.department")) do |c|
|
|
|
|
|
- c.with_value do
|
|
|
|
|
%p= "#{champ.data['address']['departmentCode']} – #{champ.data['address']['departmentName']}"
|