feat: Working on search for purchase orders.

This commit is contained in:
2025-01-17 17:04:41 -05:00
parent be0b5a6033
commit 531a385dba
46 changed files with 283 additions and 817 deletions

View File

@@ -25,11 +25,11 @@ struct PurchaseOrderForm: HTML {
}
form(
.hx.post("/purchase-orders"),
.hx.target("purchase-order-table"),
.hx.swap(.afterBegin.transition(true).swap("1s")),
.hx.target("#purchase-order-table"),
.hx.swap(.afterBegin),
.custom(
name: "hx-on::after-request",
value: "if (event.detail.successful) toggleContent('float'); window.location.href='/purchase-orders';"
value: "if(event.detail.successful) toggleContent('float')"
)
) {
div(.class("row")) {
@@ -139,7 +139,7 @@ struct PurchaseOrderForm: HTML {
let vendorBranches: [VendorBranch.Detail]
var content: some HTML<HTMLTag.select> {
select(.name("vendorBranchID"), .class("col-3")) {
select(.name("vendorBranchID"), .class("col-4")) {
for branch in vendorBranches {
option(.value(branch.id.uuidString)) { "\(branch.vendor.name) - \(branch.name)" }
}