feat: Fixes release build failures and get's release dockerfile working.
This commit is contained in:
@@ -2,7 +2,8 @@ import Elementary
|
||||
import SharedModels
|
||||
import URLRouting
|
||||
|
||||
struct ToggleFormButton: HTML {
|
||||
// TODO: Remove.
|
||||
struct ToggleFormButton: HTML, Sendable {
|
||||
var content: some HTML<HTMLTag.a> {
|
||||
a(.href("javascript:void(0)"), .on(.click, "toggleContent('form')"), .class("btn-add")) {
|
||||
"+"
|
||||
@@ -12,20 +13,24 @@ struct ToggleFormButton: HTML {
|
||||
|
||||
enum Button {
|
||||
|
||||
@Sendable
|
||||
static func add() -> some HTML<HTMLTag.button> {
|
||||
button(.class("btn btn-add")) { "+" }
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func danger<C: HTML>(@HTMLBuilder body: () -> C) -> some HTML<HTMLTag.button> {
|
||||
button(.class("danger")) { body() }
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func close(id: String, resetURL: String? = nil) -> some HTML<HTMLTag.button> {
|
||||
button(.class("btn-close"), .on(.click, makeOnClick(id, resetURL))) {
|
||||
"x"
|
||||
}
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func close(id: IDKey, resetURL route: ViewRoute? = nil) -> some HTML<HTMLTag.button> {
|
||||
close(
|
||||
id: id.description,
|
||||
@@ -33,16 +38,19 @@ enum Button {
|
||||
)
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func update() -> some HTML<HTMLTag.button> {
|
||||
button(.class("btn-update")) { "Update" }
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func detail() -> some HTML<HTMLTag.button> {
|
||||
button(.class("btn-detail")) {
|
||||
"〉"
|
||||
}
|
||||
}
|
||||
|
||||
@Sendable
|
||||
private static func makeOnClick(_ id: String, _ resetURL: String?) -> String {
|
||||
let output = "toggleContent('\(id)');"
|
||||
if let resetURL {
|
||||
|
||||
@@ -49,7 +49,7 @@ struct Float<C: HTML, B: HTML>: HTML {
|
||||
}
|
||||
}
|
||||
|
||||
struct DefaultCloseButton: HTML {
|
||||
struct DefaultCloseButton: HTML, Sendable {
|
||||
let id: String
|
||||
let resetURL: String?
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import ElementaryHTMX
|
||||
import SharedModels
|
||||
import Vapor
|
||||
|
||||
struct EmployeeSelect: HTML {
|
||||
struct EmployeeSelect: HTML, Sendable {
|
||||
|
||||
let employees: [Employee]?
|
||||
let context: ViewRoute.SelectContext
|
||||
@@ -40,7 +40,7 @@ struct EmployeeSelect: HTML {
|
||||
|
||||
}
|
||||
|
||||
struct VendorBranchSelect: HTML {
|
||||
struct VendorBranchSelect: HTML, Sendable {
|
||||
let branches: [VendorBranch.Detail]?
|
||||
let context: ViewRoute.SelectContext
|
||||
|
||||
|
||||
Reference in New Issue
Block a user