feat: Refactoring route declarations.

This commit is contained in:
2025-01-19 10:52:15 -05:00
parent d27a19863a
commit 1c8748211c
20 changed files with 954 additions and 644 deletions

View File

@@ -14,7 +14,7 @@ struct EmployeeTable: HTML {
Button.add()
.attributes(
.style("padding: 0px 10px;"),
.hx.get(route: .employees(.create)),
.hx.get(route: .employee(.shared(.index))),
.hx.target(.float),
.hx.swap(.outerHTML.transition(true).swap("0.5s"))
)
@@ -39,7 +39,7 @@ struct EmployeeTable: HTML {
Button.detail()
.attributes(
.style("padding-left: 15px;"),
.hx.get(route: .employees(.id(employee.id))),
.hx.get(route: .employee(.shared(.get(id: employee.id)))),
.hx.target(.float),
.hx.pushURL(true),
.hx.swap(.outerHTML.transition(true).swap("0.5s"))