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_HEADERS = %i[name contact_info].freeze + COMMON_HEADERS
APPEARANCE_VALUES = %w[name contact_info].freeze + COMMON_VALUES 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 = { HEADERS = {
acquired_media_release: ACQUIRED_MEDIA_HEADERS, acquired_media_release: ACQUIRED_MEDIA_HEADERS,
appearance_release: APPEARANCE_HEADERS appearance_release: APPEARANCE_HEADERS,
location_release: LOCATION_HEADERS
}.freeze }.freeze
VALUES = { VALUES = {
acquired_media_release: ACQUIRED_MEDIA_VALUES, acquired_media_release: ACQUIRED_MEDIA_VALUES,
appearance_release: APPEARANCE_VALUES appearance_release: APPEARANCE_VALUES,
location_release: LOCATION_VALUES
}.freeze }.freeze
included do included do
@@ -35,9 +40,11 @@ module CsvExportable
end end
def to_csv_row 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) send(function)
end end
puts v
v
end end
private private

View File

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

View File

@@ -302,6 +302,12 @@ es:
form: form:
photos: photos:
dropzone_label: Tap to take a photo of the Property (optional) (ES) 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: material_releases:
form: form:
photos: photos: