WIP: Begins effective length views.

This commit is contained in:
2026-01-01 15:35:55 -05:00
parent b116c3011b
commit 95d35f0392
6 changed files with 233 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ extension SiteRoute {
case project(ProjectRoute)
case room(RoomRoute)
case frictionRate(FrictionRateRoute)
case effectiveLength(EffectiveLengthRoute)
public static let router = OneOf {
Route(.case(Self.project)) {
@@ -21,6 +22,9 @@ extension SiteRoute {
Route(.case(Self.frictionRate)) {
SiteRoute.View.FrictionRateRoute.router
}
Route(.case(Self.effectiveLength)) {
SiteRoute.View.EffectiveLengthRoute.router
}
}
}
}
@@ -125,3 +129,29 @@ extension SiteRoute.View.FrictionRateRoute {
case componentPressureLoss
}
}
extension SiteRoute.View {
public enum EffectiveLengthRoute: Equatable, Sendable {
case form(dismiss: Bool = false)
case index
static let rootPath = "effective-lengths"
public static let router = OneOf {
Route(.case(Self.index)) {
Path { rootPath }
Method.get
}
Route(.case(Self.form(dismiss:))) {
Path {
rootPath
"create"
}
Method.get
Query {
Field("dismiss", default: false) { Bool.parser() }
}
}
}
}
}