feat: Adds thermal balance point, still need to implement economic balance point.
This commit is contained in:
@@ -286,7 +286,10 @@ public extension SiteRoute {
|
||||
}
|
||||
|
||||
public enum HeatingBalancePoint: Equatable, Sendable {
|
||||
case index(mode: Routes.HeatingBalancePoint.Mode? = nil, heatLossMode: Routes.HeatingBalancePoint.HeatLoss.Mode? = nil)
|
||||
case index(
|
||||
mode: Routes.HeatingBalancePoint.Mode? = nil,
|
||||
heatLossMode: Routes.HeatingBalancePoint.HeatLoss.Mode? = nil
|
||||
)
|
||||
case heatLossFields(mode: Routes.HeatingBalancePoint.HeatLoss.Mode)
|
||||
case submit(Routes.HeatingBalancePoint.Request)
|
||||
|
||||
@@ -317,15 +320,16 @@ public extension SiteRoute {
|
||||
OneOf {
|
||||
FormData {
|
||||
Field("systemSize") { Double.parser() }
|
||||
Optionally { Field("capcityAt47") { Double.parser() } }
|
||||
Optionally { Field("capcityAt17") { Double.parser() } }
|
||||
Field("heatingDesignTemperature") { Double.parser() }
|
||||
Optionally { Field("capacityAt47") { Double.parser() } }
|
||||
Optionally { Field("capacityAt17") { Double.parser() } }
|
||||
Optionally { Field("heatingDesignTemperature") { Double.parser() } }
|
||||
OneOf {
|
||||
Field("knownHeatLoss") { Double.parser() }
|
||||
.map(.case(Routes.HeatingBalancePoint.HeatLoss.known))
|
||||
Field("simplifiedHeatLoss") { Double.parser() }
|
||||
.map(.case(Routes.HeatingBalancePoint.HeatLoss.estimated))
|
||||
}
|
||||
Optionally { Field("climateZone") { ClimateZone.parser() } }
|
||||
}
|
||||
.map(.memberwise(Routes.HeatingBalancePoint.Request.Thermal.init))
|
||||
.map(.case(Routes.HeatingBalancePoint.Request.thermal))
|
||||
|
||||
Reference in New Issue
Block a user