Browse Source

Rename household needs occurences

pull/2772/head
Kat 1 year ago
parent
commit
cd1694fe69
  1. 2
      app/models/form/sales/sections/household.rb
  2. 4
      app/models/form/sales/subsections/household_needs.rb
  3. 2
      config/locales/forms/2023/sales/household_needs.en.yml
  4. 2
      config/locales/forms/2024/sales/household_needs.en.yml
  5. 2
      config/locales/forms/2025/sales/household_needs.en.yml
  6. 2
      spec/models/form/sales/sections/household_spec.rb
  7. 4
      spec/models/form/sales/subsections/household_needs_spec.rb

2
app/models/form/sales/sections/household.rb

@ -7,7 +7,7 @@ class Form::Sales::Sections::Household < ::Form::Section
@subsections = [ @subsections = [
Form::Sales::Subsections::HouseholdCharacteristics.new(nil, nil, self), Form::Sales::Subsections::HouseholdCharacteristics.new(nil, nil, self),
Form::Sales::Subsections::HouseholdSituation.new(nil, nil, self), Form::Sales::Subsections::HouseholdSituation.new(nil, nil, self),
Form::Sales::Subsections::HouseholdNeeds.new(nil, nil, self), Form::Sales::Subsections::OtherHouseholdInformation.new(nil, nil, self),
] ]
end end
end end

4
app/models/form/sales/subsections/household_needs.rb

@ -1,7 +1,7 @@
class Form::Sales::Subsections::HouseholdNeeds < ::Form::Subsection class Form::Sales::Subsections::OtherHouseholdInformation < ::Form::Subsection
def initialize(id, hsh, section) def initialize(id, hsh, section)
super super
@id = "household_needs" @id = "other_household_information"
@label = "Other household information" @label = "Other household information"
@depends_on = [{ "setup_completed?" => true }] @depends_on = [{ "setup_completed?" => true }]
end end

2
config/locales/forms/2023/sales/household_needs.en.yml

@ -2,7 +2,7 @@ en:
forms: forms:
2023: 2023:
sales: sales:
household_needs: other_household_information:
hhregres: hhregres:
page_header: "" page_header: ""
check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?" check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"

2
config/locales/forms/2024/sales/household_needs.en.yml

@ -2,7 +2,7 @@ en:
forms: forms:
2024: 2024:
sales: sales:
household_needs: other_household_information:
hhregres: hhregres:
page_header: "" page_header: ""
check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?" check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"

2
config/locales/forms/2025/sales/household_needs.en.yml

@ -2,7 +2,7 @@ en:
forms: forms:
2025: 2025:
sales: sales:
household_needs: other_household_information:
hhregres: hhregres:
page_header: "" page_header: ""
check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?" check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?"

2
spec/models/form/sales/sections/household_spec.rb

@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Sections::Household, type: :model do
%w[ %w[
household_characteristics household_characteristics
household_situation household_situation
household_needs other_household_information
], ],
) )
end end

4
spec/models/form/sales/subsections/household_needs_spec.rb

@ -1,6 +1,6 @@
require "rails_helper" require "rails_helper"
RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do RSpec.describe Form::Sales::Subsections::OtherHouseholdInformation, type: :model do
subject(:household_characteristics) { described_class.new(subsection_id, subsection_definition, section) } subject(:household_characteristics) { described_class.new(subsection_id, subsection_definition, section) }
let(:subsection_id) { nil } let(:subsection_id) { nil }
@ -27,7 +27,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do
end end
it "has the correct id" do it "has the correct id" do
expect(household_characteristics.id).to eq("household_needs") expect(household_characteristics.id).to eq("other_household_information")
end end
it "has the correct label" do it "has the correct label" do

Loading…
Cancel
Save