TMP commit
This commit is contained in:
@@ -15,16 +15,26 @@ module CsvExportable
|
||||
LOCATION_HEADERS = %i[name address].freeze + COMMON_HEADERS
|
||||
LOCATION_VALUES = %w[name address].freeze + COMMON_VALUES
|
||||
|
||||
MATERIAL_HEADERS = %i[name].freeze + COMMON_HEADERS
|
||||
MATERIAL_VALUES = %w[name].freeze + COMMON_VALUES
|
||||
|
||||
MEDICAL_HEADERS = %i[approved name contact_info].freeze + COMMON_HEADERS
|
||||
MEDICAL_VALUES = %w[approved? name contact_info].freeze + COMMON_VALUES
|
||||
|
||||
HEADERS = {
|
||||
acquired_media_release: ACQUIRED_MEDIA_HEADERS,
|
||||
appearance_release: APPEARANCE_HEADERS,
|
||||
location_release: LOCATION_HEADERS
|
||||
location_release: LOCATION_HEADERS,
|
||||
material_release: MATERIAL_HEADERS,
|
||||
medical_release: MEDICAL_HEADERS
|
||||
}.freeze
|
||||
|
||||
VALUES = {
|
||||
acquired_media_release: ACQUIRED_MEDIA_VALUES,
|
||||
appearance_release: APPEARANCE_VALUES,
|
||||
location_release: LOCATION_VALUES
|
||||
location_release: LOCATION_VALUES,
|
||||
material_release: MATERIAL_VALUES,
|
||||
medical_release: MEDICAL_VALUES
|
||||
}.freeze
|
||||
|
||||
included do
|
||||
@@ -40,11 +50,9 @@ module CsvExportable
|
||||
end
|
||||
|
||||
def to_csv_row
|
||||
v = VALUES[self.class.name.underscore.to_sym].map do |function|
|
||||
VALUES[self.class.name.underscore.to_sym].map do |function|
|
||||
send(function)
|
||||
end
|
||||
puts v
|
||||
v
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -10,6 +10,7 @@ class MaterialRelease < ApplicationRecord
|
||||
include Syncable
|
||||
include Taggable
|
||||
include PersonName
|
||||
include CsvExportable
|
||||
|
||||
composed_of :person_address,
|
||||
class_name: "Address",
|
||||
|
||||
@@ -11,6 +11,7 @@ class MedicalRelease < ApplicationRecord
|
||||
include SecondGuardianPhotoable
|
||||
include GuardianName
|
||||
include SecondGuardianName
|
||||
include CsvExportable
|
||||
|
||||
NUMBER_OF_CUSTOM_FIELDS = 15
|
||||
|
||||
|
||||
@@ -780,6 +780,7 @@ en:
|
||||
search: Search
|
||||
empty: Material Releases will appear here
|
||||
table_headers:
|
||||
name: Name
|
||||
notes: Notes
|
||||
signed_at: Date Signed
|
||||
tags: Tags
|
||||
@@ -802,6 +803,8 @@ en:
|
||||
empty: Medical releases will appear here
|
||||
table_headers:
|
||||
approved: Approved
|
||||
name: Person name
|
||||
contact_info: Contact info
|
||||
notes: Notes
|
||||
signed_at: Date Signed
|
||||
tags: Tags
|
||||
|
||||
@@ -312,12 +312,23 @@ es:
|
||||
form:
|
||||
photos:
|
||||
dropzone_label: Tap to take a photo of Licensed Material (optional) (ES)
|
||||
index:
|
||||
table_headers:
|
||||
name: Name (ES)
|
||||
notes: Notes (ES)
|
||||
tags: Tags (ES)
|
||||
signed_at: Date Signed (ES)
|
||||
medical_releases:
|
||||
custom_validation_errors:
|
||||
question_answer_is_required: answer is required (ES)
|
||||
index:
|
||||
table_headers:
|
||||
approved: Approved (ES)
|
||||
name: Person name (ES)
|
||||
contact_info: Contact info (ES)
|
||||
notes: Notes (ES)
|
||||
tags: Tags (ES)
|
||||
signed_at: Date Signed (ES)
|
||||
medical_release:
|
||||
actions:
|
||||
review: Review (ES)
|
||||
|
||||
Reference in New Issue
Block a user