diff --git a/lib/presenter/rd_sap/domestic_digest.rb b/lib/presenter/rd_sap/domestic_digest.rb index e21612a..fe9480b 100644 --- a/lib/presenter/rd_sap/domestic_digest.rb +++ b/lib/presenter/rd_sap/domestic_digest.rb @@ -46,6 +46,7 @@ def to_domestic_digest improvement end, photo_supply: @view_model.respond_to?(:photovoltaic_roof_area_percent) ? @view_model.photovoltaic_roof_area_percent : nil, + main_heating_controls: @view_model.all_main_heating_controls_descriptions } end end diff --git a/lib/presenter/sap/domestic_digest.rb b/lib/presenter/sap/domestic_digest.rb index d94e407..bc30eb9 100644 --- a/lib/presenter/sap/domestic_digest.rb +++ b/lib/presenter/sap/domestic_digest.rb @@ -43,6 +43,7 @@ def to_domestic_digest improvement end, photo_supply: @view_model.respond_to?(:photovoltaic_roof_area_percent) ? @view_model.photovoltaic_roof_area_percent : nil, + main_heating_controls: @view_model.all_main_heating_controls_descriptions } end end diff --git a/spec/view_model/rd_sap_wrapper_spec.rb b/spec/view_model/rd_sap_wrapper_spec.rb index e0a9fb5..1ff18f7 100644 --- a/spec/view_model/rd_sap_wrapper_spec.rb +++ b/spec/view_model/rd_sap_wrapper_spec.rb @@ -917,7 +917,8 @@ indicative_cost: "1000", sequence: 3, typical_saving: "99" }], - photo_supply: "0" + photo_supply: "0", + main_heating_controls: ["Programmer, room thermostat and TRVs", "Time and temperature zone control"] } end diff --git a/spec/view_model/sap_wrapper_spec.rb b/spec/view_model/sap_wrapper_spec.rb index 1ea1f9c..84b9e33 100644 --- a/spec/view_model/sap_wrapper_spec.rb +++ b/spec/view_model/sap_wrapper_spec.rb @@ -3017,12 +3017,14 @@ typical_saving: "88", }, ], + main_heating_controls: ["Programmer, room thermostat and TRVs"] }, } is_18 = { different_fields: { main_heating_category: "heat pump with warm air distribution", + main_heating_controls: %w[Thermostat Thermostat] }, } @@ -3471,6 +3473,7 @@ typical_saving: "99", }, ], + main_heating_controls: ["Thermostat"] }, } @@ -3585,7 +3588,8 @@ typical_saving: "99", }, ], - photo_supply: "0" + photo_supply: "0", + main_heating_controls: ["Thermostat"] }, } @@ -3703,6 +3707,7 @@ typical_saving: "99", }, ], + main_heating_controls: ["Thermostat"] }, } @@ -3817,7 +3822,8 @@ typical_saving: "99", }, ], - photo_supply: "0" + photo_supply: "0", + main_heating_controls: ["Thermostat"] }, } @@ -3937,6 +3943,7 @@ typical_saving: "99", }, ], + main_heating_controls: ["Thermostat"] }, } @@ -4053,7 +4060,8 @@ typical_saving: "99", }, ], - photo_supply: "0" + photo_supply: "0", + main_heating_controls: ["Thermostat"] }, } @@ -4173,6 +4181,7 @@ typical_saving: "99", }, ], + main_heating_controls: ["Thermostat"] }, } @@ -4290,7 +4299,8 @@ typical_saving: "99", }, ], - photo_supply: "0" + photo_supply: "0", + main_heating_controls: ["Thermostat"] }, } @@ -4473,7 +4483,8 @@ typical_saving: "99", }, ], - photo_supply: nil + photo_supply: nil, + main_heating_controls: ["Thermostat", "Thermostat"] } end