fix location release CSV export
This commit is contained in:
@@ -16,7 +16,7 @@ class LocationRelease < ApplicationRecord
|
||||
|
||||
class << self
|
||||
def custom_csv_exportable_headers
|
||||
%i[name address]
|
||||
%i[approved? location_info owner_info amendment_signed_column]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -67,6 +67,22 @@ class LocationRelease < ApplicationRecord
|
||||
true
|
||||
end
|
||||
|
||||
def location_info
|
||||
contact_info(name: name, address: address)
|
||||
end
|
||||
|
||||
def owner_info
|
||||
contact_info(name: person_name, address: person_address, phone: person_phone, email: person_email)
|
||||
end
|
||||
|
||||
def amendment_signed_column
|
||||
if amendment_signable?
|
||||
amendment_signed?
|
||||
else
|
||||
I18n.t('location_releases.csv.no_amendment_clause')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def end_date_after_start_date
|
||||
|
||||
Reference in New Issue
Block a user