epb_view_models 2.0.10 → 2.0.12
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 +1 -1
- data/Gemfile.lock +47 -34
- data/api/schemas/data/orchestrate.json +4 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/ExternalDefinitions.xml +1663 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/ExternalDefinitions.xsd +267 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/Templates/AssessorManagement.xsd +212 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/Templates/EPC-Certificate.xsd +398 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/Templates/EPC-CollectedData.xsd +1453 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/Templates/Property.xsd +67 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/Templates/RdSAP-Report.xsd +179 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/UDT/EPC-Domains.xsd +920 -0
- data/api/schemas/xml/RdSAP-Schema-NI-21.0.0/RdSAP/UDT/SAP-Domains.xsd +3557 -0
- data/lib/epb_view_models.rb +1 -1
- data/lib/helper/xml_enums_to_output.rb +5 -0
- data/lib/presenter/rd_sap/certificate_summary.rb +5 -4
- data/lib/presenter/rd_sap/domestic_digest.rb +1 -1
- data/lib/presenter/sap/certificate_summary.rb +5 -4
- data/lib/presenter/sap/domestic_digest.rb +1 -1
- data/lib/presenter/xml/parser.rb +1 -1
- data/lib/view_model/factory.rb +1 -0
- data/lib/view_model/rd_sap_schema_ni_210/common_schema.rb +575 -0
- data/lib/view_model/rd_sap_wrapper.rb +2 -0
- metadata +12 -2
data/lib/epb_view_models.rb
CHANGED
@@ -136,6 +136,7 @@ module Helper
|
|
136
136
|
"K-SAP-NI" => "Northern Ireland: 2007 onwards",
|
137
137
|
"K-12.0" => "Post-2006",
|
138
138
|
"L" => "Northern Ireland: 2014 onwards",
|
139
|
+
"M" => "Northern Ireland: 2022 onwards",
|
139
140
|
"0" => "Not applicable",
|
140
141
|
"NR" => "Not recorded",
|
141
142
|
}.freeze
|
@@ -347,6 +348,7 @@ module Helper
|
|
347
348
|
|
348
349
|
def self.transaction_type(value, report_type = "2", schema_type = "")
|
349
350
|
types_of_ni = %i[
|
351
|
+
RdSAP-Schema-NI-21.0.0
|
350
352
|
RdSAP-Schema-NI-20.0.0
|
351
353
|
RdSAP-Schema-NI-19.0
|
352
354
|
RdSAP-Schema-NI-18.0
|
@@ -446,6 +448,7 @@ module Helper
|
|
446
448
|
]
|
447
449
|
|
448
450
|
rdsap_schemas_ni = %i[
|
451
|
+
RdSAP-Schema-NI-21.0.0
|
449
452
|
RdSAP-Schema-NI-20.0.0
|
450
453
|
RdSAP-Schema-NI-19.0
|
451
454
|
RdSAP-Schema-NI-18.0
|
@@ -575,6 +578,7 @@ module Helper
|
|
575
578
|
RdSAP-Schema-18.0
|
576
579
|
RdSAP-Schema-17.1
|
577
580
|
RdSAP-Schema-17.0
|
581
|
+
RdSAP-Schema-NI-21.0.0
|
578
582
|
RdSAP-Schema-NI-20.0.0
|
579
583
|
RdSAP-Schema-NI-19.0
|
580
584
|
RdSAP-Schema-NI-18.0
|
@@ -673,6 +677,7 @@ module Helper
|
|
673
677
|
def self.schemas_post_20
|
674
678
|
%i[
|
675
679
|
RdSAP-Schema-21.0.0
|
680
|
+
RdSAP-Schema-NI-21.0.0
|
676
681
|
]
|
677
682
|
end
|
678
683
|
|
@@ -47,7 +47,7 @@ module Presenter
|
|
47
47
|
current_space_heating_demand:
|
48
48
|
@view_model.current_space_heating_demand&.to_i,
|
49
49
|
current_water_heating_demand:
|
50
|
-
@view_model.current_water_heating_demand&.to_i
|
50
|
+
@view_model.current_water_heating_demand&.to_i,
|
51
51
|
},
|
52
52
|
heating_cost_current: @view_model.heating_cost_current,
|
53
53
|
heating_cost_potential: @view_model.heating_cost_potential,
|
@@ -79,12 +79,13 @@ module Presenter
|
|
79
79
|
@view_model.related_party_disclosure_text,
|
80
80
|
total_floor_area: convert_to_big_decimal(@view_model.total_floor_area),
|
81
81
|
status: @view_model.status,
|
82
|
-
|
83
|
-
|
82
|
+
environmental_impact_current: @view_model.environmental_impact_current,
|
83
|
+
environmental_impact_potential:
|
84
|
+
@view_model.environmental_impact_potential,
|
85
|
+
primary_energy_use: @view_model.respond_to?(:primary_energy_use) ? @view_model.primary_energy_use : nil,
|
84
86
|
addendum: @view_model.addendum,
|
85
87
|
gas_smart_meter_present: @view_model.respond_to?(:gas_smart_meter_present) ? @view_model.gas_smart_meter_present : nil,
|
86
88
|
electricity_smart_meter_present: @view_model.respond_to?(:electricity_smart_meter_present) ? @view_model.electricity_smart_meter_present : nil,
|
87
|
-
country_code: @view_model.country_code,
|
88
89
|
}
|
89
90
|
end
|
90
91
|
|
@@ -46,7 +46,7 @@ module Presenter
|
|
46
46
|
improvement
|
47
47
|
end,
|
48
48
|
photo_supply: @view_model.respond_to?(:photovoltaic_roof_area_percent) && !@view_model.photovoltaic_roof_area_percent.nil? ? @view_model.photovoltaic_roof_area_percent.to_i : nil,
|
49
|
-
main_heating_controls: @view_model.all_main_heating_controls_descriptions
|
49
|
+
main_heating_controls: @view_model.all_main_heating_controls_descriptions,
|
50
50
|
}
|
51
51
|
end
|
52
52
|
end
|
@@ -44,7 +44,7 @@ module Presenter
|
|
44
44
|
current_space_heating_demand:
|
45
45
|
@view_model.current_space_heating_demand&.to_i,
|
46
46
|
current_water_heating_demand:
|
47
|
-
@view_model.current_water_heating_demand&.to_i
|
47
|
+
@view_model.current_water_heating_demand&.to_i,
|
48
48
|
},
|
49
49
|
heating_cost_current: @view_model.heating_cost_current,
|
50
50
|
heating_cost_potential: @view_model.heating_cost_potential,
|
@@ -76,12 +76,13 @@ module Presenter
|
|
76
76
|
@view_model.related_party_disclosure_text,
|
77
77
|
total_floor_area: convert_to_big_decimal(@view_model.total_floor_area),
|
78
78
|
status: @view_model.status,
|
79
|
-
|
80
|
-
|
79
|
+
environmental_impact_current: @view_model.environmental_impact_current,
|
80
|
+
environmental_impact_potential:
|
81
|
+
@view_model.environmental_impact_potential,
|
82
|
+
primary_energy_use: @view_model.respond_to?(:primary_energy_use) ? @view_model.primary_energy_use : nil,
|
81
83
|
addendum: @view_model.addendum,
|
82
84
|
gas_smart_meter_present: @view_model.respond_to?(:gas_smart_meter_present) ? @view_model.gas_smart_meter_present : nil,
|
83
85
|
electricity_smart_meter_present: @view_model.respond_to?(:electricity_smart_meter_present) ? @view_model.electricity_smart_meter_present : nil,
|
84
|
-
country_code: @view_model.country_code,
|
85
86
|
}
|
86
87
|
end
|
87
88
|
|
@@ -43,7 +43,7 @@ module Presenter
|
|
43
43
|
improvement
|
44
44
|
end,
|
45
45
|
photo_supply: @view_model.respond_to?(:photovoltaic_roof_area_percent) && !@view_model.photovoltaic_roof_area_percent.nil? ? @view_model.photovoltaic_roof_area_percent.to_i : nil,
|
46
|
-
main_heating_controls: @view_model.all_main_heating_controls_descriptions
|
46
|
+
main_heating_controls: @view_model.all_main_heating_controls_descriptions,
|
47
47
|
}
|
48
48
|
end
|
49
49
|
end
|
data/lib/presenter/xml/parser.rb
CHANGED