diff --git a/app/services/csv/lettings_log_csv_service.rb b/app/services/csv/lettings_log_csv_service.rb index c24267094..bd5965bcd 100644 --- a/app/services/csv/lettings_log_csv_service.rb +++ b/app/services/csv/lettings_log_csv_service.rb @@ -185,6 +185,7 @@ module Csv def get_label(value, attribute, log) return LETTYPE_LABELS[value] if attribute == "lettype" return IRPRODUCT_LABELS[value] if attribute == "irproduct" + return LAR_LABELS[value] if attribute == "lar" return NEWPROP_LABELS[value] if attribute == "newprop" return conventional_yes_no_label(value) if CONVENTIONAL_YES_NO_ATTRIBUTES.include?(attribute) @@ -228,12 +229,24 @@ module Csv 3 => "Other intermediate rent product", }.freeze + LAR_LABELS = { + 1 => "Yes", + 2 => "No", + 3 => "Don't know", + }.freeze + NEWPROP_LABELS = { 1 => "Yes", 2 => "No", }.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 has_benefits nocharge].freeze + INCREF_LABELS = { + 1 => "Yes", + 0 => "No", + 3 => "Don't know", + }.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]