add data from rnf field to export

This commit is contained in:
Christophe Robillard 2023-11-21 11:02:33 +01:00
parent a6f4ae3ee4
commit daa4c28af7
4 changed files with 30 additions and 0 deletions

View file

@ -20,4 +20,12 @@ class Champs::RNFChamp < Champ
def blank?
rnf_id.blank?
end
def for_export
if data
[rnf_id, data['title'], data.dig('address', 'label'), data.dig('address', 'cityCode'), "#{data['department']} - #{APIGeoService.departement_name(data['department'])}"]
else
[rnf_id, nil, nil, nil, nil]
end
end
end