Browse Source

fixup! CLDC-4136: Hide question on UI flow

remove from question list instead
pull/3140/head
Samuel Young 2 weeks ago committed by oscar-richardson-softwire
parent
commit
26625b6248
  1. 4
      app/models/form/lettings/pages/property_building_type.rb
  2. 3
      app/services/csv/lettings_log_csv_service.rb

4
app/models/form/lettings/pages/property_building_type.rb

@ -2,9 +2,7 @@ class Form::Lettings::Pages::PropertyBuildingType < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_building_type"
@depends_on = [
{ "is_general_needs?" => true, "form.start_year_2026_or_later?" => false },
]
@depends_on = [{ "is_general_needs?" => true }]
end
def questions

3
app/services/csv/lettings_log_csv_service.rb

@ -264,8 +264,6 @@ module Csv
"uprn" => %w[uprn_known uprn],
}.freeze
IGNORED_ATTRIBUTES_2026 = %w[builtype].freeze
def attribute_mappings
if @year >= 2024
ATTRIBUTE_MAPPINGS.merge(ATTRIBUTE_MAPPINGS_2024)
@ -284,7 +282,6 @@ module Csv
ordered_questions = FormHandler.instance.ordered_questions_for_year(@year, "lettings")
soft_validations_attributes = soft_validations_attributes(ordered_questions)
ordered_questions.reject! { |q| q.id.match?(/age\d_known|nationality_all_group|rent_value_check/) }
ordered_questions.reject! { |q| IGNORED_ATTRIBUTES_2026.include?(q.id) } if @year >= 2026
attributes = insert_derived_and_related_attributes(ordered_questions)
order_address_fields_for_support(attributes)
final_attributes = non_question_fields + attributes + SCHEME_AND_LOCATION_ATTRIBUTES

Loading…
Cancel
Save