feat: Updating id key for usage in views, for typesafe keys

This commit is contained in:
2025-01-19 20:07:32 -05:00
parent 81f0e03549
commit 2de85ed758
13 changed files with 203 additions and 119 deletions

View File

@@ -16,7 +16,7 @@ struct PurchaseOrderForm: HTML {
}
var content: some HTML {
Float(shouldDisplay: shouldShow, resetURL: "/purchase-orders") {
Float(shouldDisplay: shouldShow, resetURL: .purchaseOrder(.index)) {
if shouldShow {
if purchaseOrder != nil {
p {
@@ -28,9 +28,9 @@ struct PurchaseOrderForm: HTML {
}
form(
.hx.post(route: .purchaseOrder(.index)),
.hx.target(.purchaseOrders(.table)),
.hx.target(.id(.purchaseOrder(.table))),
.hx.swap(.afterBegin),
.customToggleFloatAfterRequest
.hx.on(.afterRequest, .ifSuccessful(.toggleContent(.float)))
) {
div(.class("row")) {
label(