File tree Expand file tree Collapse file tree 2 files changed +26
-27
lines changed
Expand file tree Collapse file tree 2 files changed +26
-27
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ class ImportsController < ApplicationController
44 include ActionView ::Helpers ::UrlHelper
55 after_action :verify_authorized
66
7+ ERR_FAILED_IMPORT_NOTE = "Note: An additional 'error' column has been added to the file. " \
8+ "Please note the failure reason and remove the column when resubmitting."
9+ ERR_FILE_NOT_ATTACHED = "You must attach a CSV file in order to import information!"
10+ ERR_FILE_NOT_FOUND = "CSV import file not found."
11+ ERR_FILE_EMPTY = "File can not be empty."
12+ ERR_INVALID_HEADER = "Looks like this CSV contains invalid formatting. " \
13+ "Please download an example CSV for reference and try again."
14+
715 def index
816 authorize :import
917 @import_type = params . fetch ( :import_type , "volunteer" )
@@ -46,14 +54,6 @@ def download_failed
4654
4755 private
4856
49- ERR_FAILED_IMPORT_NOTE = "Note: An additional 'error' column has been added to the file. " \
50- "Please note the failure reason and remove the column when resubmitting."
51- ERR_FILE_NOT_ATTACHED = "You must attach a CSV file in order to import information!"
52- ERR_FILE_NOT_FOUND = "CSV import file not found."
53- ERR_FILE_EMPTY = "File can not be empty."
54- ERR_INVALID_HEADER = "Looks like this CSV contains invalid formatting. " \
55- "Please download an example CSV for reference and try again."
56-
5757 def header
5858 {
5959 "volunteer" => VolunteerImporter ::IMPORT_HEADER ,
Original file line number Diff line number Diff line change 11class CaseContactReport
2- attr_reader :case_contacts , :columns
2+ COLUMNS = [
3+ :internal_contact_number ,
4+ :duration_minutes ,
5+ :contact_types ,
6+ :contact_made ,
7+ :contact_medium ,
8+ :occurred_at ,
9+ :added_to_system_at ,
10+ :miles_driven ,
11+ :wants_driving_reimbursement ,
12+ :casa_case_number ,
13+ :creator_email ,
14+ :creator_name ,
15+ :supervisor_name ,
16+ :case_contact_notes ,
17+ :court_topics
18+ ]
319
20+ attr_reader :case_contacts , :columns
421 def initialize ( args = { } )
522 @columns = filtered_columns ( args )
623 @case_contacts = filtered_case_contacts ( args )
@@ -34,22 +51,4 @@ def filtered_columns(args)
3451 COLUMNS
3552 end
3653 end
37-
38- COLUMNS = [
39- :internal_contact_number ,
40- :duration_minutes ,
41- :contact_types ,
42- :contact_made ,
43- :contact_medium ,
44- :occurred_at ,
45- :added_to_system_at ,
46- :miles_driven ,
47- :wants_driving_reimbursement ,
48- :casa_case_number ,
49- :creator_email ,
50- :creator_name ,
51- :supervisor_name ,
52- :case_contact_notes ,
53- :court_topics
54- ]
5554end
You can’t perform that action at this time.
0 commit comments