feat: Mostly working user view with elementary html.

This commit is contained in:
2025-01-14 22:55:34 -05:00
parent 8842957cf3
commit cf28e52fa2
13 changed files with 297 additions and 12 deletions

View File

@@ -7,11 +7,12 @@ import VaporElementary
func routes(_ app: Application) throws {
try app.register(collection: ApiController())
try app.register(collection: UserViewController())
// try app.register(collection: ViewController())
app.get("test") { _ in
HTMLResponse {
MainPage(displayNav: false) {
MainPage(displayNav: false, route: .purchaseOrders) {
div(.class("container")) {
h1 { "iT WORKS" }
}
@@ -21,17 +22,18 @@ func routes(_ app: Application) throws {
app.get("login") { _ in
HTMLResponse {
MainPage(displayNav: false) {
MainPage(displayNav: false, route: .login) {
UserForm(context: .login(next: nil))
}
}
}
app.get("users") { _ in
HTMLResponse {
MainPage(displayNav: false) {
UserTable()
}
}
}
// app.get("users") { _ in
// HTMLResponse {
// // UserIndex()
// MainPage(displayNav: false, route: .users) {
// UserTable()
// }
// }
// }
}