First draft autofetch data for RNA

This commit is contained in:
Damien Le Thiec 2022-10-04 22:11:01 +02:00
parent ecd54de854
commit 0d9f02c88d
15 changed files with 64 additions and 15 deletions

View file

@ -1,8 +1,8 @@
- if champ.blank?
- if champ.value.blank?
%p= t('.not_filled')
- elsif profile == 'instructeur'
- else
- if champ.data.blank?
%p= t('.fetching_data', rna: champ.value)
%p= t('.not_found', rna: champ.value)
- else
%p= t('.data_fetched_title', rna: champ.value)
%ul
@ -12,5 +12,3 @@
- ['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.value