WIP: Working on friction rate worksheet views.

This commit is contained in:
2025-12-31 21:56:43 -05:00
parent 591875cf13
commit 24c87602e9
12 changed files with 326 additions and 11 deletions

View File

@@ -0,0 +1,45 @@
import Elementary
import ManualDCore
import Styleguide
struct EquipmentInfoView: HTML, Sendable {
let equipmentInfo: EquipmentInfo
var body: some HTML {
div(.class("space-y-4 border border-gray-200 rounded-lg shadow-lg p-4")) {
Row {
h1(.class("text-2xl font-bold")) { "Equipment Info" }
}
Row {
Label { "Static Pressure" }
span { "\(equipmentInfo.staticPressure)" }
}
.attributes(.class("border-b border-gray-200"))
Row {
Label { "Heating CFM" }
span { "\(equipmentInfo.heatingCFM)" }
}
.attributes(.class("border-b border-gray-200"))
Row {
Label { "Cooling CFM" }
span { "\(equipmentInfo.coolingCFM)" }
}
.attributes(.class("border-b border-gray-200"))
Row {
div {}
EditButton()
.attributes(
.hx.get(route: .frictionRate(.form(.equipmentInfo))),
.hx.target("#equipmentForm"),
.hx.swap(.outerHTML)
)
}
}
div(.id("equipmentForm")) {}
}
}