Browse Source

feat: initialize constants in correct order

pull/2089/head
natdeanlewissoftwire 2 years ago
parent
commit
05c5d8a829
  1. 16
      app/services/csv/lettings_log_csv_service.rb

16
app/services/csv/lettings_log_csv_service.rb

@ -206,14 +206,6 @@ module Csv
value == 1 ? "Yes" : nil value == 1 ? "Yes" : nil
end end
LABELS = {
"lettype": LETTYPE_LABELS,
"irproduct": IRPRODUCT_LABELS,
"lar": LAR_LABELS,
"newprop": NEWPROP_LABELS,
"incref": INCREF_LABELS,
}.freeze
LETTYPE_LABELS = { LETTYPE_LABELS = {
1 => "Social rent general needs private registered provider", 1 => "Social rent general needs private registered provider",
2 => "Social rent supported housing private registered provider", 2 => "Social rent supported housing private registered provider",
@ -252,6 +244,14 @@ module Csv
1 => "Prefers not to say", 1 => "Prefers not to say",
}.freeze }.freeze
LABELS = {
"lettype": LETTYPE_LABELS,
"irproduct": IRPRODUCT_LABELS,
"lar": LAR_LABELS,
"newprop": NEWPROP_LABELS,
"incref": INCREF_LABELS,
}.freeze
CONVENTIONAL_YES_NO_ATTRIBUTES = %w[illness_type_1 illness_type_2 illness_type_3 illness_type_4 illness_type_5 illness_type_6 illness_type_7 illness_type_8 illness_type_9 illness_type_10 refused cbl cap chr letting_allocation_none housingneeds_a housingneeds_b housingneeds_c housingneeds_d housingneeds_e housingneeds_f housingneeds_g housingneeds_h has_benefits nocharge].freeze CONVENTIONAL_YES_NO_ATTRIBUTES = %w[illness_type_1 illness_type_2 illness_type_3 illness_type_4 illness_type_5 illness_type_6 illness_type_7 illness_type_8 illness_type_9 illness_type_10 refused cbl cap chr letting_allocation_none housingneeds_a housingneeds_b housingneeds_c housingneeds_d housingneeds_e housingneeds_f housingneeds_g housingneeds_h has_benefits nocharge].freeze
YES_OR_BLANK_ATTRIBUTES = %w[declaration rp_homeless rp_insan_unsat rp_medwel rp_hardship rp_dontknow].freeze YES_OR_BLANK_ATTRIBUTES = %w[declaration rp_homeless rp_insan_unsat rp_medwel rp_hardship rp_dontknow].freeze

Loading…
Cancel
Save