TMP commit

This commit is contained in:
Bilal
2020-07-09 20:17:48 +02:00
parent 5ed930108d
commit bb8e5c9b73
3 changed files with 17 additions and 3 deletions

View File

@@ -12,14 +12,19 @@ module CsvExportable
APPEARANCE_HEADERS = %i[name contact_info].freeze + COMMON_HEADERS
APPEARANCE_VALUES = %w[name contact_info].freeze + COMMON_VALUES
LOCATION_HEADERS = %i[name address].freeze + COMMON_HEADERS
LOCATION_VALUES = %w[name address].freeze + COMMON_VALUES
HEADERS = {
acquired_media_release: ACQUIRED_MEDIA_HEADERS,
appearance_release: APPEARANCE_HEADERS
appearance_release: APPEARANCE_HEADERS,
location_release: LOCATION_HEADERS
}.freeze
VALUES = {
acquired_media_release: ACQUIRED_MEDIA_VALUES,
appearance_release: APPEARANCE_VALUES
appearance_release: APPEARANCE_VALUES,
location_release: LOCATION_VALUES
}.freeze
included do
@@ -35,9 +40,11 @@ module CsvExportable
end
def to_csv_row
VALUES[self.class.name.underscore.to_sym].map do |function|
v = VALUES[self.class.name.underscore.to_sym].map do |function|
send(function)
end
puts v
v
end
private

View File

@@ -744,6 +744,7 @@ en:
search: Search
empty: Location Releases will appear here
table_headers:
name: Name
address: Address
notes: Notes
signed_at: Date Signed

View File

@@ -302,6 +302,12 @@ es:
form:
photos:
dropzone_label: Tap to take a photo of the Property (optional) (ES)
index:
table_headers:
address: Address (ES)
notes: Notes (ES)
tags: Tags (ES)
signed_at: Date Signed (ES)
material_releases:
form:
photos: