epb_view_models 2.2.4 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e03d792aa7f6ff2b47d3529c2557bd909b25e23ad5b5664a070230d1a713b2e6
4
- data.tar.gz: 79ffc8207ef134924f564e1172444a592dfa9037b265c369264b3e94b64ce595
3
+ metadata.gz: 6c096ef413da7f2a548ce97f5e7995b94da4812ebc8c91981f6e820103f5929a
4
+ data.tar.gz: 04b3987de68b99d818d36778e22847aaf36a239ed67500891f0aab4ba6478230
5
5
  SHA512:
6
- metadata.gz: '091f3695640add37cf4d5b25e208fb2d3acaac429e1983ff26681eb4510fd7952b8ef09d4341ab350edee3a4c39612aab543788a163185868d931ae82b3b23e4'
7
- data.tar.gz: 6a6f1a69c7ecdffbee104ce37a89d3c8150ebdbe052cd33acd8ddce4d97372f8b590901970236a8e88dafb9bd2bc5d9ea789c20685436fe12e02741837d4b3d7
6
+ metadata.gz: 9e0f4ab064576530a8cd4595f96850969d668743e62e16d6c50e15995da6acf00ed2b0a285bbfbc1e271d15f6b74c54e874d2714a41d1730e780276ca100b69d
7
+ data.tar.gz: 70a76f3d517b5020b7a723f39b46a1627506c7c435910a5aff6d7f7a3fc80a7cd4a97f9b7a63828a65b54e45bba78dced0157ebdb09fe114508410f14ee9fbdd
@@ -5,7 +5,7 @@ loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
5
5
  loader.setup
6
6
 
7
7
  module EpbViewModels
8
- VERSION = "2.2.4"
8
+ VERSION = "2.2.6"
9
9
  end
10
10
 
11
11
  # Monkey patching to avoid using ActiveRecord::Type::Boolean.new.cast
@@ -37,8 +37,10 @@ module Presenter
37
37
  },
38
38
  owner_commission_report: @view_model.owner_commission_report,
39
39
  delegated_person_commission_report: @view_model.delegated_person_commission_report,
40
- property_type_short_description: @view_model.property_type_short_description,
41
- property_type_long_description: @view_model.property_type_long_description,
40
+ property_type: {
41
+ property_type_long_description: @view_model.property_type_long_description,
42
+ property_type_short_description: @view_model.property_type_short_description,
43
+ },
42
44
  building_improvements: @view_model.building_improvements,
43
45
  operational_ratings: @view_model.operational_ratings,
44
46
  dec: @view_model.dec,
@@ -32,11 +32,11 @@ module Presenter
32
32
  assessor: {
33
33
  scheme_assessor_id: @view_model.scheme_assessor_id,
34
34
  name: @view_model.assessor_name,
35
- assessor_contact_address: @view_model.assessor_contact_address,
36
35
  company_name: @view_model.company_name,
37
36
  contact_details: {
38
37
  email: @view_model.assessor_email,
39
38
  telephone: @view_model.assessor_telephone,
39
+ address: @view_model.assessor_contact_address,
40
40
  },
41
41
  },
42
42
  current_carbon_emission:
@@ -29,11 +29,11 @@ module Presenter
29
29
  assessor: {
30
30
  scheme_assessor_id: @view_model.scheme_assessor_id,
31
31
  name: @view_model.assessor_name,
32
- assessor_contact_address: @view_model.assessor_contact_address,
33
32
  company_name: @view_model.company_name,
34
33
  contact_details: {
35
34
  email: @view_model.assessor_email,
36
35
  telephone: @view_model.assessor_telephone,
36
+ address: @view_model.assessor_contact_address,
37
37
  },
38
38
  },
39
39
  current_carbon_emission:
@@ -134,11 +134,11 @@ module ViewModel
134
134
  end
135
135
 
136
136
  def target_emission_savings
137
- xpath(%w[Target-Savings Target-Emission-Savings])
137
+ xpath(%w[Target-Savings Target-Emission-Savings])&.to_f
138
138
  end
139
139
 
140
140
  def target_energy_savings
141
- xpath(%w[Target-Savings Target-Energy-Savings])
141
+ xpath(%w[Target-Savings Target-Energy-Savings])&.to_f
142
142
  end
143
143
 
144
144
  def accept_prescriptive_improvements
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epb_view_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - MHCLG Energy Performance of Buildings