epb_view_models 2.2.11 → 2.2.13
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/api/schemas/xml/CEPC-S-7.1/Reports/BaseDataTypes.xsd +300 -300
- data/api/schemas/xml/CEPC-S-7.1/Reports/CEPC-Reports.xsd +66 -66
- data/api/schemas/xml/CEPC-S-7.1/Reports/Input-Data.xsd +34 -34
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd +125 -125
- data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd.bak +123 -123
- data/api/schemas/xml/CEPC-S-7.1/Reports/Property.xsd +67 -67
- data/api/schemas/xml/CEPC-S-7.1/Reports/Report-Header.xsd +178 -178
- data/api/schemas/xml/CEPC-S-7.1/Reports/Reported-Data.xsd +406 -406
- data/api/schemas/xml/CEPC-S-7.1/Reports/UserManagement.xsd +174 -174
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/ExternalDefinitions.xsd +261 -261
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/AssessorManagement.xsd +213 -213
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-Certificate.xsd +400 -400
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-CollectedData.xsd +1051 -1051
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/Property.xsd +66 -66
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/RdSAP-Report.xsd +176 -176
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/ReportList.xsd +26 -26
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/EPC-Domains.xsd +858 -858
- data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/SAP-Domains.xsd +2684 -2684
- data/lib/epb_view_models.rb +1 -1
- data/lib/presenter/cs63/certificate_summary.rb +1 -0
- data/lib/view_model/cepc_s_71/cepc.rb +8 -0
- data/lib/view_model/cs63/common_schema.rb +4 -0
- data/lib/view_model/rd_sap_schema_s_190/common_schema.rb +31 -0
- data/lib/view_model/sap_schema_s_1900/common_schema.rb +23 -0
- metadata +1 -1
data/lib/epb_view_models.rb
CHANGED
|
@@ -17,6 +17,7 @@ module Presenter
|
|
|
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,
|
|
20
|
+
delegated_protocol_set_up: @view_model.delegated_protocol_set_up,
|
|
20
21
|
address: {
|
|
21
22
|
address_line1: @view_model.address_line1,
|
|
22
23
|
address_line2: @view_model.address_line2,
|
|
@@ -53,6 +53,10 @@ module ViewModel
|
|
|
53
53
|
xpath(%w[Registration-Date])
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
+
def date_of_completion
|
|
57
|
+
xpath(%w[Completion-Date])
|
|
58
|
+
end
|
|
59
|
+
|
|
56
60
|
def address_id
|
|
57
61
|
"LPRN-#{xpath(%w[UPRN])}"
|
|
58
62
|
end
|
|
@@ -528,6 +532,33 @@ module ViewModel
|
|
|
528
532
|
def has_cylinder_thermostat
|
|
529
533
|
xpath(%w[Cylinder-Thermostat])
|
|
530
534
|
end
|
|
535
|
+
|
|
536
|
+
def party_wall_construction
|
|
537
|
+
xpath(%w[SAP-Building-Part Party-Wall-Construction])
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
def party_walls_construction
|
|
541
|
+
@xml_doc
|
|
542
|
+
.search("SAP-Building-Part")
|
|
543
|
+
.map do |node|
|
|
544
|
+
xpath(%w[Party-Wall-Construction], node)
|
|
545
|
+
end
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
def walls_thickness
|
|
549
|
+
@xml_doc
|
|
550
|
+
.search("SAP-Building-Part")
|
|
551
|
+
.map do |node|
|
|
552
|
+
{
|
|
553
|
+
alternative_wall_thickness: node.at_xpath("SAP-Alternative-Wall/Wall-Thickness")&.content,
|
|
554
|
+
alternative_wall_thickness_measured: node.at_xpath("SAP-Alternative-Wall/Wall-Thickness-Measured")&.content,
|
|
555
|
+
alternative_wall_construction: node.at_xpath("SAP-Alternative-Wall/Wall-Construction")&.content,
|
|
556
|
+
wall_thickness: node.at_xpath("Wall-Thickness")&.content,
|
|
557
|
+
wall_construction: node.at_xpath("Wall-Construction")&.content,
|
|
558
|
+
wall_thickness_measured: node.at_xpath("Wall-Thickness-Measured")&.content,
|
|
559
|
+
}
|
|
560
|
+
end
|
|
561
|
+
end
|
|
531
562
|
end
|
|
532
563
|
end
|
|
533
564
|
end
|
|
@@ -595,6 +595,29 @@ module ViewModel
|
|
|
595
595
|
def electricity_smart_meter_present
|
|
596
596
|
Helper::ToBool.execute(xpath(%w[Electricity-Smart-Meter-Present]))
|
|
597
597
|
end
|
|
598
|
+
|
|
599
|
+
def date_of_completion
|
|
600
|
+
xpath(%w[Completion-Date])
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
def main_heating_types
|
|
604
|
+
@xml_doc
|
|
605
|
+
.search("SAP-Heating/Main-Heating-Details/Main-Heating")
|
|
606
|
+
.map do |node|
|
|
607
|
+
{
|
|
608
|
+
main_heating_code: xpath(%w[Main-Heating-Code]),
|
|
609
|
+
main_heating_index_number: xpath(%w[Main-Heating-Index-Number]),
|
|
610
|
+
}
|
|
611
|
+
end
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
def construction_years
|
|
615
|
+
@xml_doc
|
|
616
|
+
.search("SAP-Building-Part")
|
|
617
|
+
.map do |node|
|
|
618
|
+
xpath(%w[Construction-Year], node)
|
|
619
|
+
end
|
|
620
|
+
end
|
|
598
621
|
end
|
|
599
622
|
end
|
|
600
623
|
end
|