fix location release CSV export

This commit is contained in:
Bilal
2020-08-05 14:32:53 +02:00
parent 56d73d9844
commit 708cc5e0a8
4 changed files with 32 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
module CsvExportable
extend ActiveSupport::Concern
COMMON_HEADERS = %i[approved? notes tags signed_at].freeze
COMMON_HEADERS = %i[notes tags signed_at].freeze
COMMON_VALUES = %w[clean_notes clean_tags signed_on].freeze
included do
@@ -29,11 +29,12 @@ module CsvExportable
private
def contact_info
def contact_info(name: nil, address: nil, phone: nil, email: nil)
contact_info = ''
contact_info += "#{person_address}; " if person_address.present?
contact_info += "P: #{person_phone}; " if person_phone.present?
contact_info += "E: #{person_email}" if person_email.present?
contact_info += "#{name}; " if name.present?
contact_info += "#{address}; " if address.present?
contact_info += "P: #{phone}; " if phone.present?
contact_info += "E: #{email}" if email.present?
contact_info.delete_suffix '; '
end