epb_view_models 2.2.9 → 2.2.10
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 +4 -4
- data/lib/epb_view_models.rb +1 -1
- data/lib/presenter/cepc/certificate_summary.rb +9 -37
- data/lib/presenter/cs63/certificate_summary.rb +1 -1
- data/lib/presenter/dec/certificate_summary.rb +15 -16
- data/lib/presenter/dec_rr/certificate_summary.rb +11 -10
- data/lib/view_model/cepc_s_71/cepc.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18f96c7089d68a8329ebc158cd9d7033670216c37a602224213f391229a98395
|
|
4
|
+
data.tar.gz: 961f3ffac930c5c55a7dab6fc99962e30d9ee6e12d3f63a04c99f638150690ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de82ce7474d3caf06366e4c4d1602c6c90fa0b1f9db38108dde2523b9cb60894a78efa4714bb5955f14130ea33f67f64ff477564df220029117e6d78cd03e727
|
|
7
|
+
data.tar.gz: c08523068af1017de65854660746d566103c5d5e4ed38c5a72ff8af92e1cd7123941d945e6cbb02b6dabcf6a6cbc66277e8c40e10d933873d485dac60763efb4
|
data/lib/epb_view_models.rb
CHANGED
|
@@ -57,9 +57,9 @@ module Presenter
|
|
|
57
57
|
{
|
|
58
58
|
type_of_assessment: TYPE_OF_ASSESSMENT,
|
|
59
59
|
assessment_id: @view_model.assessment_id,
|
|
60
|
-
date_of_expiry: @view_model.date_of_expiry,
|
|
61
60
|
report_type: @view_model.report_type,
|
|
62
61
|
date_of_assessment: @view_model.date_of_assessment,
|
|
62
|
+
date_of_expiry: @view_model.date_of_expiry,
|
|
63
63
|
date_of_registration: @view_model.date_of_registration,
|
|
64
64
|
address: {
|
|
65
65
|
address_line1: @view_model.address_line1,
|
|
@@ -90,9 +90,9 @@ module Presenter
|
|
|
90
90
|
floor_area: @view_model.floor_area,
|
|
91
91
|
},
|
|
92
92
|
current_energy_efficiency_rating: @view_model.energy_efficiency_rating,
|
|
93
|
-
potential_energy_rating: @view_model.potential_energy_rating,
|
|
94
93
|
current_energy_efficiency_band: @view_model.current_energy_efficiency_band,
|
|
95
|
-
|
|
94
|
+
potential_energy_efficiency_rating: @view_model.potential_energy_rating,
|
|
95
|
+
potential_energy_efficiency_band: @view_model.potential_energy_band,
|
|
96
96
|
new_build_benchmark_rating: @view_model.new_build_rating,
|
|
97
97
|
new_build_benchmark_band: @view_model.new_build_benchmark_band,
|
|
98
98
|
comparative_asset_rating: @view_model.comparative_asset_rating,
|
|
@@ -109,40 +109,12 @@ module Presenter
|
|
|
109
109
|
calculation_tool: @view_model.calculation_tool,
|
|
110
110
|
ter_2002: @view_model.ter_2002,
|
|
111
111
|
ter: @view_model.ter,
|
|
112
|
-
|
|
113
|
-
@view_model.short_payback_recommendations
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
cO2_Impact: recommendation[:cO2Impact],
|
|
119
|
-
}
|
|
120
|
-
end,
|
|
121
|
-
@view_model.medium_payback_recommendations.map do |recommendation|
|
|
122
|
-
{
|
|
123
|
-
payback_type: "medium",
|
|
124
|
-
recommendation_code: recommendation[:code],
|
|
125
|
-
recommendation: recommendation[:text],
|
|
126
|
-
cO2_Impact: recommendation[:cO2Impact],
|
|
127
|
-
}
|
|
128
|
-
end,
|
|
129
|
-
@view_model.long_payback_recommendations.map do |recommendation|
|
|
130
|
-
{
|
|
131
|
-
payback_type: "long",
|
|
132
|
-
recommendation_code: recommendation[:code],
|
|
133
|
-
recommendation: recommendation[:text],
|
|
134
|
-
cO2_Impact: recommendation[:cO2Impact],
|
|
135
|
-
}
|
|
136
|
-
end,
|
|
137
|
-
@view_model.other_recommendations.map do |recommendation|
|
|
138
|
-
{
|
|
139
|
-
payback_type: "other",
|
|
140
|
-
recommendation_code: recommendation[:code],
|
|
141
|
-
recommendation: recommendation[:text],
|
|
142
|
-
cO2_Impact: recommendation[:cO2Impact],
|
|
143
|
-
}
|
|
144
|
-
end,
|
|
145
|
-
].flatten,
|
|
112
|
+
short_payback_recommendations:
|
|
113
|
+
@view_model.short_payback_recommendations,
|
|
114
|
+
medium_payback_recommendations:
|
|
115
|
+
@view_model.medium_payback_recommendations,
|
|
116
|
+
long_payback_recommendations: @view_model.long_payback_recommendations,
|
|
117
|
+
other_payback_recommendations: @view_model.other_payback_recommendations,
|
|
146
118
|
}
|
|
147
119
|
end
|
|
148
120
|
end
|
|
@@ -12,8 +12,8 @@ module Presenter
|
|
|
12
12
|
type_of_assessment: TYPE_OF_ASSESSMENT,
|
|
13
13
|
assessment_id: @view_model.assessment_id,
|
|
14
14
|
epc_assessment_id: @view_model.epc_assessment_id,
|
|
15
|
-
sale_lease_date: @view_model.sale_lease_date,
|
|
16
15
|
report_type: @view_model.report_type,
|
|
16
|
+
sale_lease_date: @view_model.sale_lease_date,
|
|
17
17
|
date_of_assessment: @view_model.assessment_date,
|
|
18
18
|
plan_report_date: @view_model.plan_report_date,
|
|
19
19
|
delegated_protocol_date: @view_model.delegated_protocol_date,
|
|
@@ -10,12 +10,14 @@ module Presenter
|
|
|
10
10
|
|
|
11
11
|
def to_certificate_summary
|
|
12
12
|
{
|
|
13
|
+
type_of_assessment: TYPE_OF_ASSESSMENT,
|
|
14
|
+
schema_version: @schema_type.gsub(/[a-zA-Z-]/, ""),
|
|
13
15
|
assessment_id: @view_model.assessment_id,
|
|
16
|
+
report_type: @view_model.report_type,
|
|
14
17
|
date_of_assessment: @view_model.date_of_assessment,
|
|
15
18
|
date_of_expiry: @view_model.date_of_expiry,
|
|
16
19
|
date_of_registration: @view_model.date_of_registration,
|
|
17
20
|
address: {
|
|
18
|
-
address_id: @view_model.address_id,
|
|
19
21
|
address_line1: @view_model.address_line1,
|
|
20
22
|
address_line2: @view_model.address_line2,
|
|
21
23
|
address_line3: @view_model.address_line3,
|
|
@@ -23,9 +25,18 @@ module Presenter
|
|
|
23
25
|
town: @view_model.town,
|
|
24
26
|
postcode: @view_model.postcode,
|
|
25
27
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
assessor: {
|
|
29
|
+
scheme_assessor_id: @view_model.scheme_assessor_id,
|
|
30
|
+
name: @view_model.assessor_name,
|
|
31
|
+
contact_details: {
|
|
32
|
+
email: @view_model.assessor_email,
|
|
33
|
+
telephone: @view_model.assessor_telephone,
|
|
34
|
+
},
|
|
35
|
+
company_details: {
|
|
36
|
+
name: @view_model.company_name,
|
|
37
|
+
address: @view_model.company_address,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
29
40
|
current_assessment: {
|
|
30
41
|
date: @view_model.current_assessment_date,
|
|
31
42
|
energy_efficiency_rating: @view_model.energy_efficiency_rating,
|
|
@@ -66,18 +77,6 @@ module Presenter
|
|
|
66
77
|
renewables_fuel_thermal: @view_model.renewables_fuel_thermal,
|
|
67
78
|
renewables_electrical: @view_model.renewables_electrical,
|
|
68
79
|
},
|
|
69
|
-
assessor: {
|
|
70
|
-
scheme_assessor_id: @view_model.scheme_assessor_id,
|
|
71
|
-
name: @view_model.assessor_name,
|
|
72
|
-
company_details: {
|
|
73
|
-
name: @view_model.company_name,
|
|
74
|
-
address: @view_model.company_address,
|
|
75
|
-
},
|
|
76
|
-
contact_details: {
|
|
77
|
-
email: @view_model.assessor_email,
|
|
78
|
-
telephone: @view_model.assessor_telephone,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
80
|
administrative_information: {
|
|
82
81
|
issue_date: @view_model.date_of_issue,
|
|
83
82
|
calculation_tool: @view_model.calculation_tool,
|
|
@@ -11,10 +11,9 @@ module Presenter
|
|
|
11
11
|
assessment_id: @view_model.assessment_id,
|
|
12
12
|
report_type: @view_model.report_type,
|
|
13
13
|
date_of_assessment: @view_model.date_of_assessment,
|
|
14
|
-
date_of_registration: @view_model.date_of_registration,
|
|
15
14
|
date_of_expiry: @view_model.date_of_expiry,
|
|
15
|
+
date_of_registration: @view_model.date_of_registration,
|
|
16
16
|
address: {
|
|
17
|
-
address_id: @view_model.address_id,
|
|
18
17
|
address_line1: @view_model.address_line1,
|
|
19
18
|
address_line2: @view_model.address_line2,
|
|
20
19
|
address_line3: @view_model.address_line3,
|
|
@@ -25,21 +24,21 @@ module Presenter
|
|
|
25
24
|
assessor: {
|
|
26
25
|
scheme_assessor_id: @view_model.scheme_assessor_id,
|
|
27
26
|
name: @view_model.assessor_name,
|
|
28
|
-
company_details: {
|
|
29
|
-
name: @view_model.company_name,
|
|
30
|
-
address: @view_model.company_address,
|
|
31
|
-
},
|
|
32
27
|
contact_details: {
|
|
33
28
|
email: @view_model.assessor_email,
|
|
34
29
|
telephone: @view_model.assessor_telephone,
|
|
35
30
|
},
|
|
31
|
+
company_details: {
|
|
32
|
+
name: @view_model.company_name,
|
|
33
|
+
address: @view_model.company_address,
|
|
34
|
+
},
|
|
36
35
|
},
|
|
37
36
|
short_payback_recommendations:
|
|
38
37
|
@view_model.short_payback_recommendations,
|
|
39
38
|
medium_payback_recommendations:
|
|
40
39
|
@view_model.medium_payback_recommendations,
|
|
41
40
|
long_payback_recommendations: @view_model.long_payback_recommendations,
|
|
42
|
-
|
|
41
|
+
other_payback_recommendations: @view_model.other_recommendations,
|
|
43
42
|
technical_information: {
|
|
44
43
|
building_environment: @view_model.building_environment,
|
|
45
44
|
floor_area: @view_model.floor_area,
|
|
@@ -47,14 +46,16 @@ module Presenter
|
|
|
47
46
|
property_type: @view_model.property_type,
|
|
48
47
|
renewable_sources: @view_model.renewable_sources,
|
|
49
48
|
discounted_energy: @view_model.discounted_energy,
|
|
50
|
-
date_of_issue: @view_model.date_of_issue,
|
|
51
|
-
calculation_tool: @view_model.calculation_tool,
|
|
52
49
|
inspection_type: @view_model.inspection_type,
|
|
53
50
|
},
|
|
51
|
+
administrative_information: {
|
|
52
|
+
issue_date: @view_model.date_of_issue,
|
|
53
|
+
calculation_tool: @view_model.calculation_tool,
|
|
54
|
+
related_rrn: @view_model.related_rrn,
|
|
55
|
+
},
|
|
54
56
|
site_service_one: @view_model.site_service_one,
|
|
55
57
|
site_service_two: @view_model.site_service_two,
|
|
56
58
|
site_service_three: @view_model.site_service_three,
|
|
57
|
-
related_rrn: @view_model.related_rrn,
|
|
58
59
|
}
|
|
59
60
|
end
|
|
60
61
|
end
|
|
@@ -48,7 +48,7 @@ module ViewModel
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def floor_area
|
|
51
|
-
xpath(%w[Technical-Information Floor-Area])
|
|
51
|
+
xpath(%w[Technical-Information Floor-Area])&.to_i
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def main_heating_fuel
|
|
@@ -124,7 +124,7 @@ module ViewModel
|
|
|
124
124
|
recommendations("Long-Payback")
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
-
def
|
|
127
|
+
def other_payback_recommendations
|
|
128
128
|
recommendations("Other-Payback")
|
|
129
129
|
end
|
|
130
130
|
|