feat: Initial view controller dependency and snapshot tests.

This commit is contained in:
2025-01-23 10:57:20 -05:00
parent c74433c2eb
commit 5695d0e13c
49 changed files with 2802 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
import Elementary
import ElementaryHTMX
import SharedModels
struct VendorDetail: HTML {
let vendor: Vendor
var content: some HTML {
Float(shouldDisplay: true) {
VendorForm(.formOnly(vendor))
h2(.style("margin-left: 20px; font-size: 1.5em;"), .class("label")) { "Branches" }
VendorBranchForm(vendorID: vendor.id)
VendorBranchList(vendorID: vendor.id, branches: nil)
} closeButton: {
Button.close(id: "float")
.attributes(
.hx.get(route: .vendor(.index)),
.hx.pushURL(true),
.hx.target(.body),
.hx.swap(.outerHTML)
)
}
}
}