feat: Adds multi-step form to generate equivalent lengths for a project.

This commit is contained in:
2026-01-07 11:56:04 -05:00
parent dbf7e3b1b4
commit f8bed40670
12 changed files with 450 additions and 92 deletions

View File

@@ -5,6 +5,7 @@ import Styleguide
struct EffectiveLengthsView: HTML, Sendable {
let projectID: Project.ID
let effectiveLengths: [EffectiveLength]
var body: some HTML {
@@ -12,20 +13,9 @@ struct EffectiveLengthsView: HTML, Sendable {
.class("m-4")
) {
Row {
h1(.class("text-2xl font-bold")) { "Effective Lengths" }
h1(.class("text-2xl font-bold")) { "Equivalent Lengths" }
PlusButton()
.attributes(
.hx.get(route: .effectiveLength(.form(dismiss: false))),
.hx.target("#effectiveLengthForm"),
.hx.swap(.outerHTML)
)
// button(
// .hx.get(route: .effectiveLength(.form(dismiss: false))),
// .hx.target("#effectiveLengthForm"),
// .hx.swap(.outerHTML)
// ) {
// Icon(.circlePlus)
// }
.attributes(.showModal(id: EffectiveLengthForm.id))
}
.attributes(.class("pb-6"))
@@ -38,7 +28,7 @@ struct EffectiveLengthsView: HTML, Sendable {
}
}
EffectiveLengthForm(dismiss: true)
EffectiveLengthForm(projectID: projectID, dismiss: true)
}
}