epb_view_models 2.2.10 → 2.2.11
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/Gemfile.lock +37 -36
- data/lib/epb_view_models.rb +1 -1
- data/lib/presenter/dec/certificate_summary.rb +1 -1
- data/lib/presenter/dec_rr/certificate_summary.rb +1 -1
- data/lib/view_model/cepc_s_71/cepc.rb +5 -5
- data/lib/view_model/cs63/common_schema.rb +16 -16
- data/lib/view_model/rd_sap_schema_170/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_171/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_180/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_190/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_200/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_210/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_2101/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_ni_173/common_schema.rb +9 -9
- data/lib/view_model/rd_sap_schema_ni_174/common_schema.rb +9 -9
- data/lib/view_model/rd_sap_schema_ni_180/common_schema.rb +9 -9
- data/lib/view_model/rd_sap_schema_ni_190/common_schema.rb +9 -9
- data/lib/view_model/rd_sap_schema_ni_200/common_schema.rb +9 -9
- data/lib/view_model/rd_sap_schema_ni_210/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_ni_2101/common_schema.rb +1 -1
- data/lib/view_model/rd_sap_schema_s_190/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_102/rdsap.rb +1 -1
- data/lib/view_model/sap_schema_110/rdsap.rb +1 -1
- data/lib/view_model/sap_schema_112/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_112/rdsap.rb +1 -1
- data/lib/view_model/sap_schema_112/sap.rb +1 -1
- data/lib/view_model/sap_schema_120/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_130/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_140/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_141/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_142/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_150/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_160/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_161/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_162/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_163/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_170/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_171/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_1800/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_1900/common_schema.rb +7 -7
- data/lib/view_model/sap_schema_1910/common_schema.rb +7 -7
- data/lib/view_model/sap_schema_1920/common_schema.rb +7 -7
- data/lib/view_model/sap_schema_ni_112/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_112/rdsap.rb +1 -1
- data/lib/view_model/sap_schema_ni_120/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_130/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_140/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_141/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_142/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_150/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_160/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_161/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_170/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_171/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_172/common_schema.rb +1 -1
- data/lib/view_model/sap_schema_ni_173/common_schema.rb +9 -9
- data/lib/view_model/sap_schema_ni_174/common_schema.rb +9 -9
- data/lib/view_model/sap_schema_ni_1800/common_schema.rb +9 -9
- data/lib/view_model/sap_schema_s_1900/common_schema.rb +7 -7
- 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: 41dc0de25de650cd2c1ea5bbbef683ead54956c7d9d75608afd2ba64af8da86e
|
|
4
|
+
data.tar.gz: 0c44d32596cdc1947cec3f45d751ecf50646df36873983bbb6ecff0ceaa9adb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e17fe42abc1d67c57509de21dfc80ed0a38382d1797b66c6107104f819d821c9a9bf3595885dacf2f5f59896f811d75c92e38867e8b02528133e1e77ef6fb48
|
|
7
|
+
data.tar.gz: f197135027cf11d64667f42d3779ee4bd2ce38736ce1ce4f5b2c30fae9259772134d01f6b8bf3fa5c00381ff9563e9b749366eb0c0343b1c8795ddc97ae1a1d5
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: https://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
activesupport (8.
|
|
4
|
+
activesupport (8.1.2)
|
|
5
5
|
base64
|
|
6
|
-
benchmark (>= 0.3)
|
|
7
6
|
bigdecimal
|
|
8
7
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
9
8
|
connection_pool (>= 2.2.5)
|
|
10
9
|
drb
|
|
11
10
|
i18n (>= 1.6, < 2)
|
|
11
|
+
json
|
|
12
12
|
logger (>= 1.4.2)
|
|
13
13
|
minitest (>= 5.1)
|
|
14
14
|
securerandom (>= 0.3)
|
|
@@ -16,48 +16,49 @@ GEM
|
|
|
16
16
|
uri (>= 0.13.1)
|
|
17
17
|
ast (2.4.3)
|
|
18
18
|
base64 (0.3.0)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
connection_pool (2.5.3)
|
|
19
|
+
bigdecimal (4.0.1)
|
|
20
|
+
concurrent-ruby (1.3.6)
|
|
21
|
+
connection_pool (3.0.2)
|
|
23
22
|
diff-lcs (1.6.2)
|
|
24
23
|
drb (2.2.3)
|
|
25
|
-
i18n (1.14.
|
|
24
|
+
i18n (1.14.8)
|
|
26
25
|
concurrent-ruby (~> 1.0)
|
|
27
|
-
json (2.
|
|
26
|
+
json (2.18.1)
|
|
28
27
|
language_server-protocol (3.17.0.5)
|
|
29
28
|
lint_roller (1.1.0)
|
|
30
29
|
logger (1.7.0)
|
|
31
30
|
mini_portile2 (2.8.9)
|
|
32
|
-
minitest (
|
|
33
|
-
|
|
31
|
+
minitest (6.0.2)
|
|
32
|
+
drb (~> 2.0)
|
|
33
|
+
prism (~> 1.5)
|
|
34
|
+
nokogiri (1.19.1)
|
|
34
35
|
mini_portile2 (~> 2.8.2)
|
|
35
36
|
racc (~> 1.4)
|
|
36
37
|
parallel (1.27.0)
|
|
37
|
-
parser (3.3.
|
|
38
|
+
parser (3.3.10.2)
|
|
38
39
|
ast (~> 2.4.1)
|
|
39
40
|
racc
|
|
40
|
-
prism (1.
|
|
41
|
+
prism (1.9.0)
|
|
41
42
|
racc (1.8.1)
|
|
42
|
-
rack (3.
|
|
43
|
+
rack (3.2.5)
|
|
43
44
|
rainbow (3.1.1)
|
|
44
45
|
rake (13.0.6)
|
|
45
|
-
regexp_parser (2.
|
|
46
|
-
rexml (3.4.
|
|
47
|
-
rspec (3.13.
|
|
46
|
+
regexp_parser (2.11.3)
|
|
47
|
+
rexml (3.4.4)
|
|
48
|
+
rspec (3.13.2)
|
|
48
49
|
rspec-core (~> 3.13.0)
|
|
49
50
|
rspec-expectations (~> 3.13.0)
|
|
50
51
|
rspec-mocks (~> 3.13.0)
|
|
51
|
-
rspec-core (3.13.
|
|
52
|
+
rspec-core (3.13.6)
|
|
52
53
|
rspec-support (~> 3.13.0)
|
|
53
54
|
rspec-expectations (3.13.5)
|
|
54
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
55
56
|
rspec-support (~> 3.13.0)
|
|
56
|
-
rspec-mocks (3.13.
|
|
57
|
+
rspec-mocks (3.13.7)
|
|
57
58
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
58
59
|
rspec-support (~> 3.13.0)
|
|
59
|
-
rspec-support (3.13.
|
|
60
|
-
rubocop (1.
|
|
60
|
+
rspec-support (3.13.7)
|
|
61
|
+
rubocop (1.82.1)
|
|
61
62
|
json (~> 2.3)
|
|
62
63
|
language_server-protocol (~> 3.17.0.2)
|
|
63
64
|
lint_roller (~> 1.1.0)
|
|
@@ -65,23 +66,23 @@ GEM
|
|
|
65
66
|
parser (>= 3.3.0.2)
|
|
66
67
|
rainbow (>= 2.2.2, < 4.0)
|
|
67
68
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
68
|
-
rubocop-ast (>= 1.
|
|
69
|
+
rubocop-ast (>= 1.48.0, < 2.0)
|
|
69
70
|
ruby-progressbar (~> 1.7)
|
|
70
71
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
71
|
-
rubocop-ast (1.
|
|
72
|
+
rubocop-ast (1.49.0)
|
|
72
73
|
parser (>= 3.3.7.2)
|
|
73
|
-
prism (~> 1.
|
|
74
|
+
prism (~> 1.7)
|
|
74
75
|
rubocop-capybara (2.22.1)
|
|
75
76
|
lint_roller (~> 1.1)
|
|
76
77
|
rubocop (~> 1.72, >= 1.72.1)
|
|
77
|
-
rubocop-govuk (5.
|
|
78
|
-
rubocop (= 1.
|
|
79
|
-
rubocop-ast (= 1.
|
|
78
|
+
rubocop-govuk (5.2.0)
|
|
79
|
+
rubocop (= 1.82.1)
|
|
80
|
+
rubocop-ast (= 1.49.0)
|
|
80
81
|
rubocop-capybara (= 2.22.1)
|
|
81
|
-
rubocop-rails (= 2.
|
|
82
|
+
rubocop-rails (= 2.34.3)
|
|
82
83
|
rubocop-rake (= 0.7.1)
|
|
83
|
-
rubocop-rspec (= 3.
|
|
84
|
-
rubocop-rails (2.
|
|
84
|
+
rubocop-rspec (= 3.9.0)
|
|
85
|
+
rubocop-rails (2.34.3)
|
|
85
86
|
activesupport (>= 4.2.0)
|
|
86
87
|
lint_roller (~> 1.1)
|
|
87
88
|
rack (>= 1.1)
|
|
@@ -90,18 +91,18 @@ GEM
|
|
|
90
91
|
rubocop-rake (0.7.1)
|
|
91
92
|
lint_roller (~> 1.1)
|
|
92
93
|
rubocop (>= 1.72.1)
|
|
93
|
-
rubocop-rspec (3.
|
|
94
|
+
rubocop-rspec (3.9.0)
|
|
94
95
|
lint_roller (~> 1.1)
|
|
95
|
-
rubocop (~> 1.
|
|
96
|
+
rubocop (~> 1.81)
|
|
96
97
|
ruby-progressbar (1.13.0)
|
|
97
98
|
securerandom (0.4.1)
|
|
98
99
|
tzinfo (2.0.6)
|
|
99
100
|
concurrent-ruby (~> 1.0)
|
|
100
|
-
unicode-display_width (3.
|
|
101
|
-
unicode-emoji (~> 4.
|
|
102
|
-
unicode-emoji (4.0
|
|
103
|
-
uri (1.
|
|
104
|
-
zeitwerk (2.7.
|
|
101
|
+
unicode-display_width (3.2.0)
|
|
102
|
+
unicode-emoji (~> 4.1)
|
|
103
|
+
unicode-emoji (4.2.0)
|
|
104
|
+
uri (1.1.1)
|
|
105
|
+
zeitwerk (2.7.5)
|
|
105
106
|
|
|
106
107
|
PLATFORMS
|
|
107
108
|
ruby
|
data/lib/epb_view_models.rb
CHANGED
|
@@ -81,8 +81,8 @@ module Presenter
|
|
|
81
81
|
issue_date: @view_model.date_of_issue,
|
|
82
82
|
calculation_tool: @view_model.calculation_tool,
|
|
83
83
|
related_party_disclosure: @view_model.dec_related_party_disclosure,
|
|
84
|
-
related_rrn: @view_model.related_rrn,
|
|
85
84
|
},
|
|
85
|
+
related_rrn: @view_model.related_rrn,
|
|
86
86
|
}
|
|
87
87
|
end
|
|
88
88
|
end
|
|
@@ -51,11 +51,11 @@ module Presenter
|
|
|
51
51
|
administrative_information: {
|
|
52
52
|
issue_date: @view_model.date_of_issue,
|
|
53
53
|
calculation_tool: @view_model.calculation_tool,
|
|
54
|
-
related_rrn: @view_model.related_rrn,
|
|
55
54
|
},
|
|
56
55
|
site_service_one: @view_model.site_service_one,
|
|
57
56
|
site_service_two: @view_model.site_service_two,
|
|
58
57
|
site_service_three: @view_model.site_service_three,
|
|
58
|
+
related_rrn: @view_model.related_rrn,
|
|
59
59
|
}
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -103,11 +103,11 @@ module ViewModel
|
|
|
103
103
|
@xml_doc
|
|
104
104
|
.search("Recommendations-Report RR-Recommendations/#{payback}")
|
|
105
105
|
.map do |node|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
{
|
|
107
|
+
code: node.at("Recommendation-Code").content,
|
|
108
|
+
text: node.at("Recommendation").content,
|
|
109
|
+
cO2Impact: node.at("CO2-Impact").content,
|
|
110
|
+
}
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
end
|
|
@@ -153,14 +153,14 @@ module ViewModel
|
|
|
153
153
|
@xml_doc
|
|
154
154
|
.search("Prescriptive-Improvements Prescriptive-Scenario")
|
|
155
155
|
.map do |node|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
156
|
+
{
|
|
157
|
+
measure_description_short:
|
|
158
|
+
xpath(%w[Measure-Description-Short], node),
|
|
159
|
+
measure_description_long:
|
|
160
|
+
xpath(%w[Measure-Description-Long], node),
|
|
161
|
+
measure_valid: xpath(%w[Measure-Valid], node),
|
|
162
|
+
measure_type: xpath(%w[Measure-Type], node),
|
|
163
|
+
}
|
|
164
164
|
end
|
|
165
165
|
end
|
|
166
166
|
|
|
@@ -168,14 +168,14 @@ module ViewModel
|
|
|
168
168
|
@xml_doc
|
|
169
169
|
.search("Alternative-Improvements Alternative-Scenario")
|
|
170
170
|
.map do |node|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
{
|
|
172
|
+
measure_description_short:
|
|
173
|
+
xpath(%w[Measure-Description-Short], node),
|
|
174
|
+
measure_description_long:
|
|
175
|
+
xpath(%w[Measure-Description-Long], node),
|
|
176
|
+
measure_valid: xpath(%w[Measure-Valid], node),
|
|
177
|
+
measure_type: xpath(%w[Measure-Type], node),
|
|
178
|
+
}
|
|
179
179
|
end
|
|
180
180
|
end
|
|
181
181
|
|
|
@@ -492,7 +492,7 @@ module ViewModel
|
|
|
492
492
|
|
|
493
493
|
# Identifies the Main Dwelling
|
|
494
494
|
if building_part_number&.content == "1"
|
|
495
|
-
return(
|
|
495
|
+
return (
|
|
496
496
|
sap_building_part.at_xpath(
|
|
497
497
|
"Construction-Age-Band | Construction-Year",
|
|
498
498
|
)&.content
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.3", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.3", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -492,7 +492,7 @@ module ViewModel
|
|
|
492
492
|
|
|
493
493
|
# Identifies the Main Dwelling
|
|
494
494
|
if building_part_number&.content == "1"
|
|
495
|
-
return(
|
|
495
|
+
return (
|
|
496
496
|
sap_building_part.at_xpath(
|
|
497
497
|
"Construction-Age-Band | Construction-Year",
|
|
498
498
|
)&.content
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.4", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-17.4", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -492,7 +492,7 @@ module ViewModel
|
|
|
492
492
|
|
|
493
493
|
# Identifies the Main Dwelling
|
|
494
494
|
if building_part_number&.content == "1"
|
|
495
|
-
return(
|
|
495
|
+
return (
|
|
496
496
|
sap_building_part.at_xpath(
|
|
497
497
|
"Construction-Age-Band | Construction-Year",
|
|
498
498
|
)&.content
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-18.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-18.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -492,7 +492,7 @@ module ViewModel
|
|
|
492
492
|
|
|
493
493
|
# Identifies the Main Dwelling
|
|
494
494
|
if building_part_number&.content == "1"
|
|
495
|
-
return(
|
|
495
|
+
return (
|
|
496
496
|
sap_building_part.at_xpath(
|
|
497
497
|
"Construction-Age-Band | Construction-Year",
|
|
498
498
|
)&.content
|
|
@@ -523,14 +523,14 @@ module ViewModel
|
|
|
523
523
|
@xml_doc
|
|
524
524
|
.search("Suggested-Improvements Improvement")
|
|
525
525
|
.map do |node|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
526
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
527
|
+
{
|
|
528
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
529
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
530
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-19.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
531
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-19.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
532
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
533
|
+
}
|
|
534
534
|
end
|
|
535
535
|
end
|
|
536
536
|
end
|
|
@@ -547,7 +547,7 @@ module ViewModel
|
|
|
547
547
|
|
|
548
548
|
# Identifies the Main Dwelling
|
|
549
549
|
if building_part_number&.content == "1"
|
|
550
|
-
return(
|
|
550
|
+
return (
|
|
551
551
|
sap_building_part.at_xpath(
|
|
552
552
|
"Construction-Age-Band | Construction-Year",
|
|
553
553
|
)&.content
|
|
@@ -578,14 +578,14 @@ module ViewModel
|
|
|
578
578
|
@xml_doc
|
|
579
579
|
.search("Suggested-Improvements Improvement")
|
|
580
580
|
.map do |node|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
581
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
582
|
+
{
|
|
583
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
584
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
585
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-20.0.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
586
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "RdSAP-Schema-NI-20.0.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
587
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
588
|
+
}
|
|
589
589
|
end
|
|
590
590
|
end
|
|
591
591
|
end
|
|
@@ -20,7 +20,7 @@ module ViewModel
|
|
|
20
20
|
sap_building_parts.each do |sap_building_part|
|
|
21
21
|
identifier = sap_building_part.at("Identifier")
|
|
22
22
|
if identifier&.content == "Main Dwelling"
|
|
23
|
-
return(
|
|
23
|
+
return (
|
|
24
24
|
sap_building_part.at_xpath(
|
|
25
25
|
"Construction-Age-Band | Construction-Year",
|
|
26
26
|
)&.content
|
|
@@ -16,7 +16,7 @@ module ViewModel
|
|
|
16
16
|
sap_building_parts.each do |sap_building_part|
|
|
17
17
|
identifier = sap_building_part.at("Identifier")
|
|
18
18
|
if identifier&.content == "Main Dwelling"
|
|
19
|
-
return(
|
|
19
|
+
return (
|
|
20
20
|
sap_building_part.at_xpath(
|
|
21
21
|
"Construction-Age-Band | Construction-Year",
|
|
22
22
|
)&.content
|
|
@@ -16,7 +16,7 @@ module ViewModel
|
|
|
16
16
|
sap_building_parts.each do |sap_building_part|
|
|
17
17
|
identifier = sap_building_part.at("Identifier")
|
|
18
18
|
if identifier&.content == "Main Dwelling"
|
|
19
|
-
return(
|
|
19
|
+
return (
|
|
20
20
|
sap_building_part.at_xpath(
|
|
21
21
|
"Construction-Age-Band | Construction-Year",
|
|
22
22
|
)&.content
|
|
@@ -214,7 +214,7 @@ module ViewModel
|
|
|
214
214
|
|
|
215
215
|
# Identifies the Main Dwelling
|
|
216
216
|
if building_part_number&.content == "1"
|
|
217
|
-
return(
|
|
217
|
+
return (
|
|
218
218
|
sap_building_part.at_xpath(
|
|
219
219
|
"Construction-Age-Band | Construction-Year",
|
|
220
220
|
)&.content
|
|
@@ -371,12 +371,12 @@ module ViewModel
|
|
|
371
371
|
@xml_doc
|
|
372
372
|
.search("Fixed-Lights/Fixed-Light")
|
|
373
373
|
.map do |part|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
374
|
+
{
|
|
375
|
+
lighting_efficacy:
|
|
376
|
+
xpath(%w[Lighting-Efficacy], part),
|
|
377
|
+
lighting_outlets:
|
|
378
|
+
xpath(%w[Lighting-Outlets], part),
|
|
379
|
+
}
|
|
380
380
|
end
|
|
381
381
|
end
|
|
382
382
|
|
|
@@ -214,7 +214,7 @@ module ViewModel
|
|
|
214
214
|
|
|
215
215
|
# Identifies the Main Dwelling
|
|
216
216
|
if building_part_number&.content == "1"
|
|
217
|
-
return(
|
|
217
|
+
return (
|
|
218
218
|
sap_building_part.at_xpath(
|
|
219
219
|
"Construction-Age-Band | Construction-Year",
|
|
220
220
|
)&.content
|
|
@@ -371,12 +371,12 @@ module ViewModel
|
|
|
371
371
|
@xml_doc
|
|
372
372
|
.search("Fixed-Lights/Fixed-Light")
|
|
373
373
|
.map do |part|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
374
|
+
{
|
|
375
|
+
lighting_efficacy:
|
|
376
|
+
xpath(%w[Lighting-Efficacy], part),
|
|
377
|
+
lighting_outlets:
|
|
378
|
+
xpath(%w[Lighting-Outlets], part),
|
|
379
|
+
}
|
|
380
380
|
end
|
|
381
381
|
end
|
|
382
382
|
|
|
@@ -214,7 +214,7 @@ module ViewModel
|
|
|
214
214
|
|
|
215
215
|
# Identifies the Main Dwelling
|
|
216
216
|
if building_part_number&.content == "1"
|
|
217
|
-
return(
|
|
217
|
+
return (
|
|
218
218
|
sap_building_part.at_xpath(
|
|
219
219
|
"Construction-Age-Band | Construction-Year",
|
|
220
220
|
)&.content
|
|
@@ -371,12 +371,12 @@ module ViewModel
|
|
|
371
371
|
@xml_doc
|
|
372
372
|
.search("Fixed-Lights/Fixed-Light")
|
|
373
373
|
.map do |part|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
374
|
+
{
|
|
375
|
+
lighting_efficacy:
|
|
376
|
+
xpath(%w[Lighting-Efficacy], part),
|
|
377
|
+
lighting_outlets:
|
|
378
|
+
xpath(%w[Lighting-Outlets], part),
|
|
379
|
+
}
|
|
380
380
|
end
|
|
381
381
|
end
|
|
382
382
|
|
|
@@ -7,7 +7,7 @@ module ViewModel
|
|
|
7
7
|
sap_building_parts.each do |sap_building_part|
|
|
8
8
|
identifier = sap_building_part.at("Identifier")
|
|
9
9
|
if identifier&.content == "Main Dwelling"
|
|
10
|
-
return(
|
|
10
|
+
return (
|
|
11
11
|
sap_building_part.at_xpath(
|
|
12
12
|
"Construction-Age-Band | Construction-Year",
|
|
13
13
|
)&.content
|
|
@@ -373,7 +373,7 @@ module ViewModel
|
|
|
373
373
|
|
|
374
374
|
# Identifies the Main Dwelling
|
|
375
375
|
if building_part_number&.content == "1"
|
|
376
|
-
return(
|
|
376
|
+
return (
|
|
377
377
|
sap_building_part.at_xpath(
|
|
378
378
|
"Construction-Age-Band | Construction-Year",
|
|
379
379
|
)&.content
|
|
@@ -454,14 +454,14 @@ module ViewModel
|
|
|
454
454
|
@xml_doc
|
|
455
455
|
.search("Suggested-Improvements Improvement")
|
|
456
456
|
.map do |node|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
457
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
458
|
+
{
|
|
459
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
460
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
461
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "SAP-Schema-NI-17.3", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
462
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "SAP-Schema-NI-17.3", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
463
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
464
|
+
}
|
|
465
465
|
end
|
|
466
466
|
end
|
|
467
467
|
end
|
|
@@ -373,7 +373,7 @@ module ViewModel
|
|
|
373
373
|
|
|
374
374
|
# Identifies the Main Dwelling
|
|
375
375
|
if building_part_number&.content == "1"
|
|
376
|
-
return(
|
|
376
|
+
return (
|
|
377
377
|
sap_building_part.at_xpath(
|
|
378
378
|
"Construction-Age-Band | Construction-Year",
|
|
379
379
|
)&.content
|
|
@@ -454,14 +454,14 @@ module ViewModel
|
|
|
454
454
|
@xml_doc
|
|
455
455
|
.search("Suggested-Improvements Improvement")
|
|
456
456
|
.map do |node|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
457
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
458
|
+
{
|
|
459
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
460
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
461
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "SAP-Schema-NI-17.4", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
462
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "SAP-Schema-NI-17.4", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
463
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
464
|
+
}
|
|
465
465
|
end
|
|
466
466
|
end
|
|
467
467
|
end
|
|
@@ -463,7 +463,7 @@ module ViewModel
|
|
|
463
463
|
|
|
464
464
|
# Identifies the Main Dwelling
|
|
465
465
|
if building_part_number&.content == "1"
|
|
466
|
-
return(
|
|
466
|
+
return (
|
|
467
467
|
sap_building_part.at_xpath(
|
|
468
468
|
"Construction-Age-Band | Construction-Year",
|
|
469
469
|
)&.content
|
|
@@ -510,14 +510,14 @@ module ViewModel
|
|
|
510
510
|
@xml_doc
|
|
511
511
|
.search("Suggested-Improvements Improvement")
|
|
512
512
|
.map do |node|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
513
|
+
improvement_code = xpath(%w[Improvement-Details Improvement-Number], node)
|
|
514
|
+
{
|
|
515
|
+
sequence: xpath(%w[Sequence], node).to_i,
|
|
516
|
+
improvement_code: xpath(%w[Improvement-Details Improvement-Number], node),
|
|
517
|
+
improvement_summary: improvement_code ? accessor.fetch_details(schema_version: "SAP-Schema-NI-18.0.0", improvement_number: improvement_code).summary : xpath(%w[Improvement-Summary], node),
|
|
518
|
+
improvement_description: improvement_code ? accessor.fetch_details(schema_version: "SAP-Schema-NI-18.0.0", improvement_number: improvement_code).description : xpath(%w[Improvement-Description], node),
|
|
519
|
+
indicative_cost: xpath(%w[Indicative-Cost], node),
|
|
520
|
+
}
|
|
521
521
|
end
|
|
522
522
|
end
|
|
523
523
|
end
|
|
@@ -214,7 +214,7 @@ module ViewModel
|
|
|
214
214
|
|
|
215
215
|
# Identifies the Main Dwelling
|
|
216
216
|
if building_part_number&.content == "1"
|
|
217
|
-
return(
|
|
217
|
+
return (
|
|
218
218
|
sap_building_part.at_xpath(
|
|
219
219
|
"Construction-Age-Band | Construction-Year",
|
|
220
220
|
)&.content
|
|
@@ -371,12 +371,12 @@ module ViewModel
|
|
|
371
371
|
@xml_doc
|
|
372
372
|
.search("Fixed-Lights/Fixed-Light")
|
|
373
373
|
.map do |part|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
374
|
+
{
|
|
375
|
+
lighting_efficacy:
|
|
376
|
+
xpath(%w[Lighting-Efficacy], part),
|
|
377
|
+
lighting_outlets:
|
|
378
|
+
xpath(%w[Lighting-Outlets], part),
|
|
379
|
+
}
|
|
380
380
|
end
|
|
381
381
|
end
|
|
382
382
|
|