fix appearance release CSV export
This commit is contained in:
@@ -20,7 +20,7 @@ class AppearanceRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[name contact_info]
|
%i[approved? name contact_info]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -28,11 +28,16 @@ module CsvExportable
|
|||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def owner_info
|
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
|
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 = ''
|
||||||
contact_info += "#{name}; " if name.present?
|
contact_info += "#{name}; " if name.present?
|
||||||
contact_info += "#{address}; " if address.present?
|
contact_info += "#{address}; " if address.present?
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ en:
|
|||||||
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release
|
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved
|
approved: Approved
|
||||||
|
approved?: Approved
|
||||||
contact_info: Contact info
|
contact_info: Contact info
|
||||||
name: Name
|
name: Name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ es:
|
|||||||
notes: ""
|
notes: ""
|
||||||
signed_at: ""
|
signed_at: ""
|
||||||
tags: ""
|
tags: ""
|
||||||
|
approved: Approved (ES)
|
||||||
|
approved?: Approved (ES)
|
||||||
shared:
|
shared:
|
||||||
imported_appearance_release_contract_name: Contrato Importado
|
imported_appearance_release_contract_name: Contrato Importado
|
||||||
imported_appearance_release_headshot_name: Retrato Importado
|
imported_appearance_release_headshot_name: Retrato Importado
|
||||||
|
|||||||
Reference in New Issue
Block a user