feat: Begins a generic htmx form context and template, integrates user form, begins views for vendor and purchase orders.
This commit is contained in:
20
Sources/App/Controllers/VendorViewController.swift
Normal file
20
Sources/App/Controllers/VendorViewController.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
import Fluent
|
||||
import Vapor
|
||||
|
||||
struct VendorViewController: RouteCollection {
|
||||
private let api = ApiController()
|
||||
|
||||
func boot(routes: any RoutesBuilder) throws {
|
||||
// Do something.
|
||||
}
|
||||
}
|
||||
|
||||
struct VendorFormCTX: Content {
|
||||
let vendor: Vendor?
|
||||
let buttonLabel: String
|
||||
|
||||
init(vendor: Vendor? = nil, buttonLabel: String = "Create") {
|
||||
self.vendor = vendor
|
||||
self.buttonLabel = buttonLabel
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user