fix appearance release CSV export

This commit is contained in:
Bilal
2020-08-05 15:12:39 +02:00
parent fd7357045c
commit 088994b90c
4 changed files with 11 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ class AppearanceRelease < ApplicationRecord
class << self
def custom_csv_exportable_headers
%i[name contact_info]
%i[approved? name contact_info]
end
end

View File

@@ -28,11 +28,16 @@ module CsvExportable
end
private
def owner_info
contact_info(name: person_name, address: person_address, phone: person_phone, email: person_email)
compact_contact_info(name: person_name, address: person_address, phone: person_phone, email: person_email)
end
def contact_info(name: nil, address: nil, phone: nil, email: nil)
def contact_info
owner_info
end
def compact_contact_info(name: nil, address: nil, phone: nil, email: nil)
contact_info = ''
contact_info += "#{name}; " if name.present?
contact_info += "#{address}; " if address.present?

View File

@@ -176,6 +176,7 @@ en:
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release
table_headers:
approved: Approved
approved?: Approved
contact_info: Contact info
name: Name
notes: Notes

View File

@@ -71,6 +71,8 @@ es:
notes: ""
signed_at: ""
tags: ""
approved: Approved (ES)
approved?: Approved (ES)
shared:
imported_appearance_release_contract_name: Contrato Importado
imported_appearance_release_headshot_name: Retrato Importado