diff --git a/app/models/concerns/csv_exportable.rb b/app/models/concerns/csv_exportable.rb index 6ba3183..99ccdf2 100644 --- a/app/models/concerns/csv_exportable.rb +++ b/app/models/concerns/csv_exportable.rb @@ -6,9 +6,6 @@ module CsvExportable COMMON_HEADERS = %i[notes tags signed_at].freeze COMMON_VALUES = %w[clean_notes clean_tags signed_on].freeze - ACQUIRED_MEDIA_HEADERS = %i[name file_infos_count].freeze + COMMON_HEADERS - ACQUIRED_MEDIA_VALUES = %w[name file_count].freeze + COMMON_VALUES - APPEARANCE_HEADERS = %i[name contact_info].freeze + COMMON_HEADERS APPEARANCE_VALUES = %w[name contact_info].freeze + COMMON_VALUES @@ -22,19 +19,21 @@ module CsvExportable MEDICAL_VALUES = %w[approved? name contact_info].freeze + COMMON_VALUES HEADERS = { - acquired_media_release: ACQUIRED_MEDIA_HEADERS, + acquired_media_release: %i[name file_infos_count] + COMMON_HEADERS, appearance_release: APPEARANCE_HEADERS, location_release: LOCATION_HEADERS, material_release: MATERIAL_HEADERS, - medical_release: MEDICAL_HEADERS + medical_release: MEDICAL_HEADERS, + misc_release: %i[name contact_info] + COMMON_HEADERS }.freeze VALUES = { - acquired_media_release: ACQUIRED_MEDIA_VALUES, + acquired_media_release: %w[name file_count] + COMMON_VALUES, appearance_release: APPEARANCE_VALUES, location_release: LOCATION_VALUES, material_release: MATERIAL_VALUES, - medical_release: MEDICAL_VALUES + medical_release: MEDICAL_VALUES, + misc_release: %w[name contact_info] + COMMON_VALUES }.freeze included do @@ -64,8 +63,8 @@ module CsvExportable def contact_info contact_info = '' contact_info += "#{person_address}; " if person_address.present? - contact_info += "#{person_phone}; " if person_phone.present? - contact_info += "#{person_email}" if person_email.present? + contact_info += "P: #{person_phone}; " if person_phone.present? + contact_info += "E: #{person_email}" if person_email.present? contact_info.delete_suffix '; ' end diff --git a/app/models/misc_release.rb b/app/models/misc_release.rb index f9437dd..2142510 100644 --- a/app/models/misc_release.rb +++ b/app/models/misc_release.rb @@ -9,6 +9,7 @@ class MiscRelease < ApplicationRecord include PersonName include GuardianName include GuardianPhotoable + include CsvExportable NUMBER_OF_CUSTOM_FIELDS = 15 diff --git a/config/locales/en.yml b/config/locales/en.yml index 75c8e68..e65c006 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -822,6 +822,8 @@ en: search: Search empty: Misc Releases will appear here table_headers: + name: Person name + contact_info: Contact info notes: Notes signed_at: Date Signed tags: Tags diff --git a/config/locales/es.yml b/config/locales/es.yml index 7d0444d..135d506 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -497,3 +497,11 @@ es: tags: Tags (ES) acquired_media_release: no_media: No Media (ES) + misc_releases: + index: + table_headers: + name: Person name (ES) + contact_info: Contact info (ES) + notes: Notes (ES) + signed_at: Date Signed (ES) + tags: Tags (ES)