bigger changes

This commit is contained in:
2025-12-09 16:16:45 -07:00
parent 8382af2547
commit 95e80bf03d
90 changed files with 1900 additions and 1652 deletions

View File

@@ -7,21 +7,21 @@ tmp_dir = "tmp"
bin = "./tmp/main"
cmd = "go build -o ./tmp/main ."
delay = 1000
exclude_dir = ["tmp", "vendor", "testdata", "node_modules"]
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_regex = ["_test.go", "_templ.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
include_ext = ["go", "tpl", "tmpl", "html", "templ"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
poll = false
poll_interval = 0
post_cmd = []
pre_cmd = ["task templ", "task tailwind"]
pre_cmd = []
rerun = false
rerun_delay = 500
send_interrupt = false
@@ -40,7 +40,7 @@ tmp_dir = "tmp"
time = false
[misc]
clean_on_exit = true
clean_on_exit = false
[proxy]
app_port = 0

View File

@@ -1,5 +1,5 @@
{
"componentsDir": "views/components",
"componentsDir": "ui/components",
"utilsDir": "internal/utils",
"moduleName": "flexsupport",
"jsDir": "assets/js",

View File

@@ -8,21 +8,17 @@ tasks:
templ:
desc: Run templ with integrated server and hot reload
cmds:
- go tool templ generate --watch --proxy="http://localhost:8080" --open-browser=false
- go tool templ generate
tailwind:
desc: Watch Tailwind CSS changes
cmds:
- "{{.TAILWIND_CMD}} -i ./static/assets/css/input.css -o ./static/assets/css/output.min.css -m -w"
go:
- "{{.TAILWIND_CMD}} -i ./static/assets/css/input.css -o ./static/assets/css/output.min.css -m"
dev:
desc: Run go server
cmds:
- air --build.cmd "go build -o tmp/bin/main" --build.bin "tmp/bin/main" --build.delay "100" --build.exclude_dir "node_modules,tmpo" --build.include_ext "go" --build.stop_on_error "false" --misc.clean_on_exit true
- air .
sync_assets:
desc: Sync assets to static folder
cmds:
- air --build.cmd "go tool templ generate --notify-proxy" --build.bin "true" --build.delay "100" --build.exclude_dir "" --build.include_dir "assets" --build.include_ext "js,css" --build.stop_on_error "false"
dev:
gen:
desc: Start development server with hot reload
cmds:
- concurrently --names "templ,tailwind,go_server,go_assets" --prefix "[{name}]" --prefix-colors "blue,magenta,green,cyan" "task templ" "task tailwind" "task go" "task sync_assets"
- concurrently --names "templ,tailwind," --prefix "[{name}]" --prefix-colors "blue,magenta" "task templ" "task tailwind"

37
app.go
View File

@@ -1,18 +1,41 @@
package main
import (
"context"
"fmt"
"flexsupport/internal/handlers"
"flexsupport/internal/router"
"io"
"log/slog"
"net/http"
"strings"
cfg "flexsupport/internal/config"
"flexsupport/internal/handlers"
"flexsupport/internal/lib/logger"
"flexsupport/internal/router"
)
func App() error {
var log *slog.Logger
func App(ctx context.Context, stdout io.Writer, getenv func(string, string) string) error {
config := cfg.New(getenv)
local := config.Environment != cfg.PROD
ctx, cancel := context.WithCancel(ctx)
defer cancel()
logLevel := config.LogLevel
if logLevel == "" {
logLevel = "debug"
}
logOptions := logger.LogOptions(strings.TrimSpace(strings.ToLower(logLevel)), config.VerboseLogging, local)
switch local {
case true:
log = slog.New(slog.NewTextHandler(stdout, logOptions))
default:
log = slog.New(slog.NewJSONHandler(stdout, logOptions))
}
h := handlers.NewHandler()
r := router.NewRouter(h)
r := router.NewRouter(h, log)
fmt.Println("Starting server on :8080")
return http.ListenAndServe(":8080", r)
}

1
go.mod
View File

@@ -7,6 +7,7 @@ require (
github.com/a-h/templ v0.3.960
github.com/bold-commerce/go-shopify/v4 v4.7.0
github.com/go-chi/chi/v5 v5.0.11
github.com/joho/godotenv v1.5.1
)
require (

2
go.sum
View File

@@ -26,6 +26,8 @@ github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASu
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc=
github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=

29
internal/config/config.go Normal file
View File

@@ -0,0 +1,29 @@
package config
type Env string
func (e Env) String() string {
return string(e)
}
const (
PROD Env = "production"
DEV Env = "development"
)
type Config struct {
LogLevel string `mapstructure:"LOG_LEVEL"`
VerboseLogging bool `mapstructure:"VERBOSE_LOGGING"`
Environment Env `mapstructure:"ENVIRONMENT"`
Domain string `mapstructure:"DOMAIN"`
}
func New(getenv func(string, string) string) *Config {
cfg := &Config{
LogLevel: getenv("LOG_LEVEL", "debug"),
VerboseLogging: getenv("VERBOSE_LOGGING", "false") == "true",
Environment: Env(getenv("ENVIRONMENT", "development")),
Domain: getenv("DOMAIN", "http://localhost:8080"),
}
return cfg
}

View File

@@ -4,13 +4,14 @@ import (
"fmt"
"log"
"net/http"
"strconv"
// "strconv"
"strings"
"time"
"flexsupport/internal/models"
"flexsupport/views/layouts"
"flexsupport/views/pages"
// "flexsupport/ui/layouts"
// "flexsupport/ui/pages"
"github.com/go-chi/chi/v5"
)
@@ -23,40 +24,40 @@ func NewHandler() *Handler {
return &Handler{}
}
// Dashboard renders the main dashboard view
func (h *Handler) Dashboard(w http.ResponseWriter, r *http.Request) {
// TODO: Fetch real data from database
fmt.Println("Rendering dashboard")
page := pages.Dashboard(getMockTickets())
err := layouts.BaseLayout(page).Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
// // Dashboard renders the main dashboard view
// func (h *Handler) Dashboard(w http.ResponseWriter, r *http.Request) {
// // TODO: Fetch real data from database
// fmt.Println("Rendering dashboard")
// page := pages.Dashboard(getMockTickets())
// err := layouts.BaseLayout(page).Render(r.Context(), w)
// if err != nil {
// http.Error(w, err.Error(), http.StatusInternalServerError)
// return
// }
// }
// ListTickets handles the ticket listing page
func (h *Handler) ListTickets(w http.ResponseWriter, r *http.Request) {
// TODO: Implement filtering based on query parameters
status := r.URL.Query().Get("status")
search := r.URL.Query().Get("search")
// // ListTickets handles the ticket listing page
// func (h *Handler) ListTickets(w http.ResponseWriter, r *http.Request) {
// // TODO: Implement filtering based on query parameters
// status := r.URL.Query().Get("status")
// search := r.URL.Query().Get("search")
// TODO: Fetch real data from database
tickets := getMockTickets()
// // TODO: Fetch real data from database
// tickets := getMockTickets()
if status != "" {
tickets = filterTicketsByStatus(tickets, status)
}
if search != "" {
tickets = filterTicketsBySearch(tickets, search)
}
// if status != "" {
// tickets = filterTicketsByStatus(tickets, status)
// }
// if search != "" {
// tickets = filterTicketsBySearch(tickets, search)
// }
err := pages.TicketRows(tickets).Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
// err := pages.TicketRows(tickets).Render(r.Context(), w)
// if err != nil {
// http.Error(w, err.Error(), http.StatusInternalServerError)
// return
// }
// }
func filterTicketsByStatus(tickets []models.Ticket, status string) []models.Ticket {
result := make([]models.Ticket, 0)
@@ -82,16 +83,6 @@ func filterTicketsBySearch(tickets []models.Ticket, search string) []models.Tick
return result
}
// NewTicketForm renders the new ticket form
func (h *Handler) NewTicketForm(w http.ResponseWriter, r *http.Request) {
page := pages.TicketForm(models.Ticket{})
err := layouts.BaseLayout(page).Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
// CreateTicket handles ticket creation
func (h *Handler) CreateTicket(w http.ResponseWriter, r *http.Request) {
// TODO: Parse form data
@@ -108,46 +99,46 @@ func (h *Handler) CreateTicket(w http.ResponseWriter, r *http.Request) {
}
// ViewTicket renders the ticket detail view
func (h *Handler) ViewTicket(w http.ResponseWriter, r *http.Request) {
idStr := chi.URLParam(r, "id")
id, err := strconv.Atoi(idStr)
if err != nil {
http.Error(w, "Invalid ticket ID", http.StatusBadRequest)
return
}
// func (h *Handler) ViewTicket(w http.ResponseWriter, r *http.Request) {
// idStr := chi.URLParam(r, "id")
// id, err := strconv.Atoi(idStr)
// if err != nil {
// http.Error(w, "Invalid ticket ID", http.StatusBadRequest)
// return
// }
// TODO: Fetch from database
ticket := getMockTicket(id)
// // TODO: Fetch from database
// ticket := getMockTicket(id)
page := pages.TicketPage(ticket)
err = layouts.BaseLayout(page).Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
return
}
// page := pages.TicketPage(ticket)
// err = layouts.BaseLayout(page).Render(r.Context(), w)
// if err != nil {
// http.Error(w, err.Error(), http.StatusInternalServerError)
// return
// }
// return
// }
// EditTicketForm renders the edit ticket form
func (h *Handler) EditTicketForm(w http.ResponseWriter, r *http.Request) {
idStr := chi.URLParam(r, "id")
id, err := strconv.Atoi(idStr)
if err != nil {
http.Error(w, "Invalid ticket ID", http.StatusBadRequest)
return
}
// func (h *Handler) EditTicketForm(w http.ResponseWriter, r *http.Request) {
// idStr := chi.URLParam(r, "id")
// id, err := strconv.Atoi(idStr)
// if err != nil {
// http.Error(w, "Invalid ticket ID", http.StatusBadRequest)
// return
// }
// TODO: Fetch from database
ticket := getMockTicket(id)
// // TODO: Fetch from database
// ticket := getMockTicket(id)
page := pages.TicketForm(ticket)
err = layouts.BaseLayout(page).Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
return
}
// page := pages.TicketForm(ticket)
// err = layouts.BaseLayout(page).Render(r.Context(), w)
// if err != nil {
// http.Error(w, err.Error(), http.StatusInternalServerError)
// return
// }
// return
// }
// UpdateTicket handles ticket updates
func (h *Handler) UpdateTicket(w http.ResponseWriter, r *http.Request) {
@@ -263,7 +254,7 @@ func getMockTickets() []models.Ticket {
ItemModel: "iPhone 13 Pro",
IssueDescription: "Cracked screen, needs replacement",
AssignedTo: "Mike Tech",
DueDate: timePtr(time.Now().Add(48 * time.Hour)),
DueDate: time.Now().Add(48 * time.Hour),
},
{
ID: 1002,
@@ -295,7 +286,7 @@ func getMockTicket(id int) models.Ticket {
IssueDescription: "Screen is completely shattered after being dropped. Touch functionality still works but glass is unsafe.",
EstimatedCost: 150.00,
AssignedTo: "Mike Tech",
DueDate: &dueDate,
DueDate: dueDate,
CreatedAt: time.Now().Add(-24 * time.Hour),
UpdatedAt: time.Now(),
CreatedBy: "Front Desk",

View File

@@ -0,0 +1,41 @@
package layout
import (
// "flexsupport/ui/components/calendar"
// "flexsupport/ui/components/collapsible"
// "flexsupport/ui/components/copybutton"
// "flexsupport/ui/components/datepicker"
// "flexsupport/ui/components/dialog"
// "flexsupport/ui/components/dropdown"
"flexsupport/ui/components/input"
"flexsupport/ui/components/label"
// "flexsupport/ui/components/popover"
// "flexsupport/ui/components/selectbox"
// "flexsupport/ui/components/textarea"
// "flexsupport/ui/components/toast"
// "flexsupport/internal/middleware"
"flexsupport/ui/modules"
)
templ BaseLayout(contents templ.Component) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/assets/css/output.min.css"/>
<script src="/assets/js/htmx.min.js"></script>
<script src="/assets/js/response-targets.js"></script>
<script defer src="/assets/js/alpine.min.js"></script>
@input.Script()
@label.Script()
<title>Flex Support</title>
</head>
<body class="h-full" hx-ext="response-targets">
@modules.Navbar("dickhead")
<main class="container">
@contents
</main>
</body>
</html>
}

View File

@@ -0,0 +1,85 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.960
package layout
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import (
// "flexsupport/ui/components/calendar"
// "flexsupport/ui/components/collapsible"
// "flexsupport/ui/components/copybutton"
// "flexsupport/ui/components/datepicker"
// "flexsupport/ui/components/dialog"
// "flexsupport/ui/components/dropdown"
"flexsupport/ui/components/input"
"flexsupport/ui/components/label"
// "flexsupport/ui/components/popover"
// "flexsupport/ui/components/selectbox"
// "flexsupport/ui/components/textarea"
// "flexsupport/ui/components/toast"
// "flexsupport/internal/middleware"
"flexsupport/ui/modules"
)
func BaseLayout(contents templ.Component) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><link rel=\"stylesheet\" href=\"/assets/css/output.min.css\"><script src=\"/assets/js/htmx.min.js\"></script><script src=\"/assets/js/response-targets.js\"></script><script defer src=\"/assets/js/alpine.min.js\"></script>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = input.Script().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = label.Script().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<title>Flex Support</title></head><body class=\"h-full\" hx-ext=\"response-targets\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = modules.Navbar("dickhead").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<main class=\"container\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = contents.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</main></body></html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var _ = templruntime.GeneratedTemplate

11
internal/layout/layout.go Normal file
View File

@@ -0,0 +1,11 @@
package layout
import (
"net/http"
"github.com/a-h/templ"
)
func Handler(content templ.Component, options ...func(*templ.ComponentHandler)) http.Handler {
return templ.Handler(BaseLayout(content), options...)
}

View File

@@ -28,7 +28,7 @@ func logging(logger *slog.Logger, next http.Handler) http.Handler {
next.ServeHTTP(wrapped, r)
duration := time.Since(start)
logger.Info(
logger.Debug(
"handled request",
slog.String("method", r.Method),
slog.String("path", r.URL.Path),

View File

@@ -4,11 +4,8 @@ import (
"context"
"crypto/rand"
"encoding/hex"
"fmt"
"log"
"net/http"
"github.com/a-h/templ"
)
type key string
@@ -39,27 +36,22 @@ func CSPMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Create a new Nonces struct for every request when here.
// move to outside the handler to use the same nonces in all responses
nonceSet := Nonces{
Htmx: generateRandomString(16),
ResponseTargets: generateRandomString(16),
Tw: generateRandomString(16),
Alpine: generateRandomString(16),
HtmxCSSHash: "sha256-pgn1TCGZX6O77zDvy0oTODMOxemn0oj0LeCnQTRj7Kg=",
}
// nonceSet := Nonces{
// Htmx: generateRandomString(16),
// ResponseTargets: generateRandomString(16),
// Tw: generateRandomString(16),
// Alpine: generateRandomString(16),
// HtmxCSSHash: "sha256-pgn1TCGZX6O77zDvy0oTODMOxemn0oj0LeCnQTRj7Kg=",
// }
// set nonces in context
ctx := context.WithValue(r.Context(), NonceKey, nonceSet)
ctx = templ.WithNonce(ctx, nonceSet.ResponseTargets)
// ctx := context.WithValue(r.Context(), NonceKey, nonceSet)
// ctx = templ.WithNonce(ctx, nonceSet.ResponseTargets)
// insert the nonces into the content security policy header
cspHeader := fmt.Sprintf("default-src 'self'; script-src 'nonce-%s' 'nonce-%s' 'nonce-%s' ; style-src 'nonce-%s' '%s';",
nonceSet.Htmx,
nonceSet.ResponseTargets,
nonceSet.Alpine,
nonceSet.Tw,
nonceSet.HtmxCSSHash)
cspHeader := "default-src 'self'; script-src 'self' 'unsafe-inline' ; style-src 'self' 'unsafe-inline';"
w.Header().Set("Content-Security-Policy", cspHeader)
next.ServeHTTP(w, r.WithContext(ctx))
next.ServeHTTP(w, r)
})
}

View File

@@ -30,56 +30,56 @@ const (
)
type ItemType string
const (
Boot ItemType = "boot"
Shoe ItemType = "shoe"
Bag ItemType = "bag"
Boot ItemType = "boot"
Shoe ItemType = "shoe"
Bag ItemType = "bag"
Other ItemType = "other"
)
// Ticket represents a repair ticket in the system
type Ticket struct {
ID int64 `json:"id"`
Status Status `json:"status"`
Priority Priority `json:"priority"` // low, normal, high, urgent
ExternalTag string `json:"external_tag"`
ID int64 `db:"id" json:"id"`
Status Status `db:"status" json:"status"`
Priority Priority `db:"priority" json:"priority"` // low, normal, high, urgent
ExternalTag string `db:"external_tag" json:"external_tag"`
// Customer information
CustomerName string `json:"customer_name"`
CustomerPhone string `json:"customer_phone"`
CustomerEmail string `json:"customer_email"`
CustomerName string `db:"customer_name" json:"customer_name"`
CustomerPhone string `db:"customer_phone" json:"customer_phone"`
CustomerEmail string `db:"customer_email" json:"customer_email"`
// Item information
ItemType ItemType `json:"item_type"`
ItemBrand string `json:"item_brand"`
ItemModel string `json:"item_model"`
SerialNumber string `json:"serial_number"`
ItemType ItemType `db:"item_type" json:"item_type"`
ItemBrand string `db:"item_brand" json:"item_brand"`
ItemModel string `db:"item_model" json:"item_model"`
SerialNumber string `db:"serial_number" json:"serial_number"`
// Repair details
IssueDescription string `json:"issue_description"`
InternalNotes string `json:"internal_notes"`
EstimatedCost float64 `json:"estimated_cost"`
IssueDescription string `db:"issue_description" json:"issue_description"`
InternalNotes string `db:"internal_notes" json:"internal_notes"`
EstimatedCost float64 `db:"estimated_cost" json:"estimated_cost"`
// Assignment and scheduling
AssignedTo string `json:"assigned_to"`
DueDate *time.Time `json:"due_date"`
AssignedTo string `db:"assigned_to" json:"assigned_to"`
DueDate time.Time `db:"due_date" json:"due_date"`
// Metadata
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CreatedBy string `json:"created_by"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
CreatedBy string `db:"created_by" json:"created_by"`
// Related data (loaded via joins)
Parts []Part `json:"parts,omitempty"`
Notes []WorkNote `json:"notes,omitempty"`
TotalPartsCost float64 `json:"total_parts_cost"`
Parts []Part `db:"-" json:"parts,omitempty"`
Notes []WorkNote `db:"-" json:"notes,omitempty"`
TotalPartsCost float64 `db:"-" json:"total_parts_cost"`
}
// Part represents a replacement part or material used in a repair
type Part struct {
ID int64 `json:"id"`
TicketID int64 `json:"ticket_id"`
ID int64 `json:"id"`
TicketID int64 `json:"ticket_id"`
Name string `json:"name"`
Quantity int `json:"quantity"`
Cost float64 `json:"cost"`
@@ -89,8 +89,8 @@ type Part struct {
// WorkNote represents a work log entry or note on a ticket
type WorkNote struct {
ID int64 `json:"id"`
TicketID int64 `json:"ticket_id"`
ID int64 `json:"id"`
TicketID int64 `json:"ticket_id"`
Content string `json:"content"`
Author string `json:"author"`
Timestamp time.Time `json:"timestamp"`
@@ -98,7 +98,7 @@ type WorkNote struct {
// Customer represents customer information (for future use)
type Customer struct {
ID int64 `json:"id"`
ID int64 `json:"id"`
Name string `json:"name"`
Phone string `json:"phone"`
Email string `json:"email"`
@@ -108,7 +108,7 @@ type Customer struct {
// Technician represents a repair technician user
type Technician struct {
ID int64 `json:"id"`
ID int64 `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
ActiveJobs int `json:"active_jobs"`
@@ -166,8 +166,5 @@ func (t *Ticket) TotalCost() float64 {
// IsOverdue checks if the ticket is past its due date
func (t *Ticket) IsOverdue() bool {
if t.DueDate == nil {
return false
}
return time.Now().After(*t.DueDate) && t.Status != "completed"
return time.Now().After(t.DueDate) && t.Status != "completed"
}

View File

@@ -1,6 +1,7 @@
package router
import (
"log/slog"
"net/http"
"flexsupport/internal/handlers"
@@ -8,6 +9,8 @@ import (
"flexsupport/static"
// "net/http"
"flexsupport/internal/routes/dashboard"
// "flexsupport/internal/routes/tickets"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
@@ -15,10 +18,11 @@ import (
var AppDev string = "development"
func NewRouter(h *handlers.Handler) *chi.Mux {
func NewRouter(h *handlers.Handler, log *slog.Logger) *chi.Mux {
r := chi.NewMux()
// Dashboard
dbHandler := dashboard.NewHandler(log)
r.Handle("/assets/*",
disableCacheInDevMode(
http.StripPrefix("/assets/",
@@ -30,17 +34,18 @@ func NewRouter(h *handlers.Handler) *chi.Mux {
r.Use(
middleware.Logger,
middleware.Recoverer,
mw.CSPMiddleware,
// mw.CSPMiddleware,
mw.Logging(log),
mw.TextHTMLMiddleware,
)
r.Get("/", h.Dashboard)
r.Get("/", dbHandler.Get)
r.Route("/tickets", func(r chi.Router) {
r.Get("/", h.ListTickets)
r.Get("/new", h.NewTicketForm)
// r.Get("/", h.ListTickets)
// r.Get("/new", h.NewTicketForm)
r.Post("/", h.CreateTicket)
r.Get("/search", h.SearchTickets)
r.Get("/{id}", h.ViewTicket)
r.Get("/{id}/edit", h.EditTicketForm)
// r.Get("/{id}", h.ViewTicket)
// r.Get("/{id}/edit", h.EditTicketForm)
r.Post("/{id}", h.UpdateTicket)
// Ticket actions

View File

@@ -1,9 +1,9 @@
package pages
package dashboard
import (
"flexsupport/internal/models"
"flexsupport/views/components/card"
"flexsupport/internal/utils"
"flexsupport/ui/components/card"
"fmt"
)
@@ -50,7 +50,7 @@ templ Dashboard(tickets []models.Ticket) {
@card.Card() {
@card.Content() {
<div class="flex items-center">
<div class="flex-shrink-0">
<div class="shrink-0">
<div class="rounded-md bg-yellow-500 p-3">
<svg class="h-6 w-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
@@ -140,23 +140,26 @@ templ Dashboard(tickets []models.Ticket) {
@card.Card() {
@card.Content() {
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<span class="htmx-indicator">
<img src="/assets/icons/loader.svg" class="size-4 animate-spin" alt="Loading..."/> Loading...
</span>
<div class="flex-1">
<input
type="text"
type="search"
name="search"
placeholder="Search tickets..."
class="shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border-gray-300 rounded-md"
hx-get="/tickets/search"
hx-get="/"
hx-trigger="keyup changed delay:300ms"
hx-target="#ticket-list"
hx-swap="innerHTML"
hx-indicator=".htmx-indicator"
/>
</div>
<div class="flex gap-2">
<select
name="status"
class="block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md"
hx-get="/tickets"
hx-get="/"
hx-trigger="change"
hx-target="#ticket-list"
hx-swap="innerHTML"
@@ -186,10 +189,6 @@ templ Dashboard(tickets []models.Ticket) {
templ TicketsTable(tickets []models.Ticket) {
<div
class="bg-white shadow rounded-lg overflow-hidden"
hx-get="/tickets"
hx-trigger="load, every 30s"
hx-target="#ticket-list"
hx-swap="innerHTML"
>
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
@@ -218,54 +217,58 @@ templ TicketsTable(tickets []models.Ticket) {
</tr>
</thead>
<!-- <tbody id="ticket-list" hx-get="/tickets" hx-trigger="load, every 30s" hx-select="#ticket-list" hx-swap="innerHTML" class="bg-white divide-y divide-gray-200"> -->
<tbody class="bg-white divide-y divide-gray-200" id="ticket-list">
@TicketRows(tickets)
</tbody>
@templ.Fragment("ticket-list") {
<tbody
class="bg-white divide-y divide-gray-200"
id="ticket-list"
hx-get="/?status={{ .status }}&search={{ .search }}&template=ticket-list"
hx-trigger="load, every 30s"
hx-target="#ticket-list"
hx-swap="outerHTML"
>
for _, ticket := range tickets {
{{ ticketUrl := fmt.Sprintf("/tickets/%d", ticket.ID) }}
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
<a href={ ticketUrl } class="text-blue-600 hover:text-blue-900">{ ticket.ID }</a>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">{ ticket.CustomerName }</div>
<div class="text-sm text-gray-500">{ ticket.CustomerEmail }</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
{ ticket.ItemType }
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span
class={ utils.TwMerge("px-2 inline-flex text-xs leading-5 font-semibold rounded-full", ticket.StatusClass()) }
>
{ ticket.StatusDisplay() }
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
if ticket.AssignedTo != "" {
{ ticket.AssignedTo }
} else {
<span class="text-gray-400">Unassigned</span>
}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
{ ticket.DueDate.Format("2006-01-02") }
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2">
<a href={ fmt.Sprintf("/tickets/%d/edit", ticket.ID) } class="text-blue-600 hover:text-blue-900">Edit</a>
<a href={ ticketUrl } class="text-gray-600 hover:text-gray-900">View</a>
</td>
</tr>
}
</tbody>
}
</table>
</div>
}
templ TicketRows(tickets []models.Ticket) {
for _, ticket := range tickets {
{{ ticketUrl := fmt.Sprintf("/tickets/%d", ticket.ID) }}
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
<a href={ ticketUrl } class="text-blue-600 hover:text-blue-900">{ ticket.ID }</a>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">{ ticket.CustomerName }</div>
<div class="text-sm text-gray-500">{ ticket.CustomerEmail }</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
{ ticket.ItemType }
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span
class={ utils.TwMerge("px-2 inline-flex text-xs leading-5 font-semibold rounded-full",
ticket.StatusClass(),
) }
>
{ ticket.StatusDisplay() }
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
if ticket.AssignedTo != "" {
{ ticket.AssignedTo }
} else {
<span class="text-gray-400">Unassigned</span>
}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
if ticket.DueDate != nil {
{ ticket.DueDate.Format("2006-01-02") }
} else {
<span class="text-gray-400">Not set</span>
}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2">
<a href={ fmt.Sprintf("/tickets/%d/edit", ticket.ID) } class="text-blue-600 hover:text-blue-900">Edit</a>
<a href={ ticketUrl } class="text-gray-600 hover:text-gray-900">View</a>
</td>
</tr>
}
}
// templ TicketRows(tickets []models.Ticket) {
// }
// }

View File

@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.960
package pages
package dashboard
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -11,7 +11,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/models"
"flexsupport/internal/utils"
"flexsupport/views/components/card"
"flexsupport/ui/components/card"
"fmt"
)
@@ -104,7 +104,7 @@ func Dashboard(tickets []models.Ticket) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<div class=\"flex items-center\"><div class=\"flex-shrink-0\"><div class=\"rounded-md bg-yellow-500 p-3\"><svg class=\"h-6 w-6 text-white\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"></path></svg></div></div><div class=\"ml-5 w-0 flex-1\"><dl><dt class=\"text-sm font-medium text-gray-500 truncate\">In Progress</dt><dd class=\"text-2xl font-semibold text-gray-900\" hx-get=\"/api/stats/inprogress\" hx-trigger=\"load, every 30s\" hx-target=\"#inprogress-tickets\"><div id=\"inprogress-tickets\" readonly></div></dd></dl></div></div>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<div class=\"flex items-center\"><div class=\"shrink-0\"><div class=\"rounded-md bg-yellow-500 p-3\"><svg class=\"h-6 w-6 text-white\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"></path></svg></div></div><div class=\"ml-5 w-0 flex-1\"><dl><dt class=\"text-sm font-medium text-gray-500 truncate\">In Progress</dt><dd class=\"text-2xl font-semibold text-gray-900\" hx-get=\"/api/stats/inprogress\" hx-trigger=\"load, every 30s\" hx-target=\"#inprogress-tickets\"><div id=\"inprogress-tickets\" readonly></div></dd></dl></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -228,7 +228,7 @@ func Dashboard(tickets []models.Ticket) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<div class=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4\"><div class=\"flex-1\"><input type=\"text\" name=\"search\" placeholder=\"Search tickets...\" class=\"shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border-gray-300 rounded-md\" hx-get=\"/tickets/search\" hx-trigger=\"keyup changed delay:300ms\" hx-target=\"#ticket-list\" hx-swap=\"innerHTML\"></div><div class=\"flex gap-2\"><select name=\"status\" class=\"block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md\" hx-get=\"/tickets\" hx-trigger=\"change\" hx-target=\"#ticket-list\" hx-swap=\"innerHTML\" hx-include=\"[name='search']\"><option value=\"\">All Statuses</option> <option value=\"new\">New</option> <option value=\"in_progress\">In Progress</option> <option value=\"waiting_parts\">Waiting for Parts</option> <option value=\"ready\">Ready for Pickup</option> <option value=\"completed\">Completed</option></select> <a href=\"/tickets/new\" class=\"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">New Ticket</a></div></div>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<div class=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4\"><span class=\"htmx-indicator\"><img src=\"/assets/icons/loader.svg\" class=\"size-4 animate-spin\" alt=\"Loading...\"> Loading...</span><div class=\"flex-1\"><input type=\"search\" name=\"search\" placeholder=\"Search tickets...\" class=\"shadow-sm focus:ring-blue-500 focus:border-blue-500 block w-full sm:text-sm border-gray-300 rounded-md\" hx-get=\"/\" hx-trigger=\"keyup changed delay:300ms\" hx-target=\"#ticket-list\" hx-indicator=\".htmx-indicator\"></div><div class=\"flex gap-2\"><select name=\"status\" class=\"block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md\" hx-get=\"/\" hx-trigger=\"change\" hx-target=\"#ticket-list\" hx-swap=\"innerHTML\" hx-include=\"[name='search']\"><option value=\"\">All Statuses</option> <option value=\"new\">New</option> <option value=\"in_progress\">In Progress</option> <option value=\"waiting_parts\">Waiting for Parts</option> <option value=\"ready\">Ready for Pickup</option> <option value=\"completed\">Completed</option></select> <a href=\"/tickets/new\" class=\"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">New Ticket</a></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -277,220 +277,212 @@ func TicketsTable(tickets []models.Ticket) templ.Component {
templ_7745c5c3_Var12 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<div class=\"bg-white shadow rounded-lg overflow-hidden\" hx-get=\"/tickets\" hx-trigger=\"load, every 30s\" hx-target=\"#ticket-list\" hx-swap=\"innerHTML\"><table class=\"min-w-full divide-y divide-gray-200\"><thead class=\"bg-gray-50\"><tr><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Ticket #</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Customer</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Item</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Status</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Assigned To</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Due Date</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Actions</th></tr></thead><!-- <tbody id=\"ticket-list\" hx-get=\"/tickets\" hx-trigger=\"load, every 30s\" hx-select=\"#ticket-list\" hx-swap=\"innerHTML\" class=\"bg-white divide-y divide-gray-200\"> --><tbody class=\"bg-white divide-y divide-gray-200\" id=\"ticket-list\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<div class=\"bg-white shadow rounded-lg overflow-hidden\"><table class=\"min-w-full divide-y divide-gray-200\"><thead class=\"bg-gray-50\"><tr><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Ticket #</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Customer</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Item</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Status</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Assigned To</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Due Date</th><th scope=\"col\" class=\"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider\">Actions</th></tr></thead><!-- <tbody id=\"ticket-list\" hx-get=\"/tickets\" hx-trigger=\"load, every 30s\" hx-select=\"#ticket-list\" hx-swap=\"innerHTML\" class=\"bg-white divide-y divide-gray-200\"> -->")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = TicketRows(tickets).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</tbody></table></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
func TicketRows(tickets []models.Ticket) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var13 := templ.GetChildren(ctx)
if templ_7745c5c3_Var13 == nil {
templ_7745c5c3_Var13 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
for _, ticket := range tickets {
ticketUrl := fmt.Sprintf("/tickets/%d", ticket.ID)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<tr class=\"hover:bg-gray-50\"><td class=\"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900\"><a href=\"")
templ_7745c5c3_Var13 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<tbody class=\"bg-white divide-y divide-gray-200\" id=\"ticket-list\" hx-get=\"/?status={{ .status }}&search={{ .search }}&template=ticket-list\" hx-trigger=\"load, every 30s\" hx-target=\"#ticket-list\" hx-swap=\"outerHTML\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 templ.SafeURL
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinURLErrs(ticketUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 233, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" class=\"text-blue-600 hover:text-blue-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 233, Col: 79}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</a></td><td class=\"px-6 py-4 whitespace-nowrap\"><div class=\"text-sm font-medium text-gray-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 236, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</div><div class=\"text-sm text-gray-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerEmail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 237, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</div></td><td class=\"px-6 py-4 whitespace-nowrap\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 240, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</td><td class=\"px-6 py-4 whitespace-nowrap\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 = []any{utils.TwMerge("px-2 inline-flex text-xs leading-5 font-semibold rounded-full",
ticket.StatusClass(),
)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var19...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<span class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var19).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.StatusDisplay())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 248, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</span></td><td class=\"px-6 py-4 whitespace-nowrap text-sm text-gray-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if ticket.AssignedTo != "" {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.AssignedTo)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 253, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
for _, ticket := range tickets {
ticketUrl := fmt.Sprintf("/tickets/%d", ticket.ID)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<tr class=\"hover:bg-gray-50\"><td class=\"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900\"><a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<span class=\"text-gray-400\">Unassigned</span>")
var templ_7745c5c3_Var14 templ.SafeURL
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinURLErrs(ticketUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 233, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" class=\"text-blue-600 hover:text-blue-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 233, Col: 83}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</a></td><td class=\"px-6 py-4 whitespace-nowrap\"><div class=\"text-sm font-medium text-gray-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 236, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</div><div class=\"text-sm text-gray-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerEmail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 237, Col: 65}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</div></td><td class=\"px-6 py-4 whitespace-nowrap\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 240, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</td><td class=\"px-6 py-4 whitespace-nowrap\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 = []any{utils.TwMerge("px-2 inline-flex text-xs leading-5 font-semibold rounded-full", ticket.StatusClass())}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var19...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<span class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var19).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.StatusDisplay())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 246, Col: 33}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</span></td><td class=\"px-6 py-4 whitespace-nowrap text-sm text-gray-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if ticket.AssignedTo != "" {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.AssignedTo)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 251, Col: 28}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<span class=\"text-gray-400\">Unassigned</span>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</td><td class=\"px-6 py-4 whitespace-nowrap text-sm text-gray-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</td><td class=\"px-6 py-4 whitespace-nowrap text-sm text-gray-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if ticket.DueDate != nil {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.DueDate.Format("2006-01-02"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 260, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 257, Col: 45}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<span class=\"text-gray-400\">Not set</span>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</td><td class=\"px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2\"><a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var24 templ.SafeURL
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinURLErrs(fmt.Sprintf("/tickets/%d/edit", ticket.ID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 260, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" class=\"text-blue-600 hover:text-blue-900\">Edit</a> <a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var25 templ.SafeURL
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(ticketUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/dashboard/dashboard.templ`, Line: 261, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" class=\"text-gray-600 hover:text-gray-900\">View</a></td></tr>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</td><td class=\"px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2\"><a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var24 templ.SafeURL
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinURLErrs(fmt.Sprintf("/tickets/%d/edit", ticket.ID))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 266, Col: 56}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" class=\"text-blue-600 hover:text-blue-900\">Edit</a> <a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var25 templ.SafeURL
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(ticketUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/dashboard.templ`, Line: 267, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" class=\"text-gray-600 hover:text-gray-900\">View</a></td></tr>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "</tbody>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
templ_7745c5c3_Err = templ.Fragment("ticket-list").Render(templ.WithChildren(ctx, templ_7745c5c3_Var13), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</table></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
// templ TicketRows(tickets []models.Ticket) {
// }
// }
var _ = templruntime.GeneratedTemplate

View File

@@ -0,0 +1,107 @@
package dashboard
import (
"log/slog"
"net/http"
"strings"
"time"
"flexsupport/internal/layout"
"flexsupport/internal/models"
"github.com/a-h/templ"
)
type Handler struct {
log *slog.Logger
}
func NewHandler(log *slog.Logger) *Handler {
return &Handler{
log: log,
}
}
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
h.Get(w, r)
default:
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
}
}
func (h *Handler) Get(w http.ResponseWriter, r *http.Request) {
status := r.URL.Query().Get("status")
search := r.URL.Query().Get("search")
template := r.URL.Query().Get("template")
// TODO: Fetch real data from database
tickets := getMockTickets()
if status != "" {
tickets = filterTicketsByStatus(tickets, status)
}
if search != "" {
tickets = filterTicketsBySearch(tickets, search)
}
var opts []func(*templ.ComponentHandler)
if template != "" {
opts = append(opts, templ.WithFragments(template))
}
v := layout.Handler(Dashboard(tickets), opts...)
v.ServeHTTP(w, r)
}
func getMockTickets() []models.Ticket {
return []models.Ticket{
{
ID: 1001,
Status: "new",
Priority: "high",
CustomerName: "John Doe",
CustomerPhone: "(555) 123-4567",
ItemType: "Smartphone",
ItemModel: "iPhone 13 Pro",
IssueDescription: "Cracked screen, needs replacement",
AssignedTo: "Mike Tech",
DueDate: time.Now().Add(48 * time.Hour),
},
{
ID: 1002,
Status: "in_progress",
Priority: "normal",
CustomerName: "Jane Smith",
CustomerPhone: "(555) 987-6543",
ItemType: "Laptop",
ItemModel: "MacBook Pro 2020",
IssueDescription: "Battery not charging",
AssignedTo: "Sarah Tech",
},
}
}
func filterTicketsByStatus(tickets []models.Ticket, status string) []models.Ticket {
result := make([]models.Ticket, 0)
if status != "" {
for _, ticket := range tickets {
if ticket.Status.String() == status {
result = append(result, ticket)
}
}
}
return result
}
func filterTicketsBySearch(tickets []models.Ticket, search string) []models.Ticket {
result := make([]models.Ticket, 0)
if search != "" {
for _, ticket := range tickets {
if strings.Contains(ticket.CustomerName, search) || strings.Contains(ticket.IssueDescription, search) {
result = append(result, ticket)
}
}
}
return result
}

View File

@@ -1,13 +1,12 @@
package pages
package tickets
import (
"flexsupport/internal/models"
"flexsupport/views/components/button"
"flexsupport/views/components/card"
"flexsupport/views/components/input"
"flexsupport/views/components/label"
"flexsupport/views/components/selectbox"
"flexsupport/ui/components/button"
"flexsupport/ui/components/card"
"flexsupport/ui/components/input"
"flexsupport/ui/components/label"
)
var ItemTypes = []models.ItemType{
@@ -17,6 +16,8 @@ var ItemTypes = []models.ItemType{
models.Other,
}
type TicketFormParams struct{}
templ TicketForm(ticket models.Ticket) {
<div class="px-4 py-6 sm:px-0">
<!-- Page Header -->
@@ -44,19 +45,14 @@ templ TicketForm(ticket models.Ticket) {
Customer Name <span class="text-red-500">*</span>
}
@input.Input(input.Props{
ID: "customer_name",
Type: input.TypeText,
Placeholder: "John Doe",
Attributes: templ.Attributes{
"required": true,
"hx-trigger": "keyup delay:500ms",
"hx-post="
},
})
type="text" name="customer_name" id="customer_name" required value={ ticket.CustomerName }
class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300
rounded-md"
placeholder="John Doe" />
ID: "customer_name",
Type: input.TypeText,
Placeholder: "John Doe",
Attributes: templ.Attributes{
"required": true,
},
Value: ticket.CustomerName,
})
</div>
<div>
<label for="customer_phone" class="block text-sm font-medium text-gray-700">
@@ -93,7 +89,7 @@ templ TicketForm(ticket models.Ticket) {
<div class="px-4 py-5 sm:p-6">
<h3 class="text-lg font-medium text-gray-900 mb-4">Item Information</h3>
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
<div>
<div x-data="{ itemType: '{ ticket.ItemType }' }">
<label for="item_type" class="block text-sm font-medium text-gray-700">
Item Type <span class="text-red-500">*</span>
</label>
@@ -101,6 +97,7 @@ templ TicketForm(ticket models.Ticket) {
name="item_type"
id="item_type"
required
x-model="itemType"
class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md"
>
<option value="">Select item type</option>
@@ -108,6 +105,18 @@ templ TicketForm(ticket models.Ticket) {
<option value={ itemType } selected={ ticket.ItemType == itemType }>{ itemType }</option>
}
</select>
<div x-show="itemType === 'Other'" x-transition>
<label for="other_details" class="block text-sm font-medium text-gray-700">
Please describe the item
</label>
<input
type="text"
name="other_details"
id="other_details"
class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
placeholder="Please describe the item"
/>
</div>
</div>
<div>
<label for="item_brand" class="block text-sm font-medium text-gray-700">
@@ -196,17 +205,11 @@ templ TicketForm(ticket models.Ticket) {
<label for="due_date" class="block text-sm font-medium text-gray-700">
Due Date
</label>
{{
dueDate := ""
if ticket.DueDate != nil {
dueDate = ticket.DueDate.Format("2006-01-02")
}
}}
<input
type="date"
name="due_date"
id="due_date"
value={ dueDate }
value={ ticket.DueDate.Format("2006-01-02") }
class="mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
/>
</div>

View File

@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.960
package pages
package tickets
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -11,11 +11,10 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/models"
"flexsupport/views/components/button"
"flexsupport/views/components/card"
"flexsupport/views/components/input"
"flexsupport/views/components/label"
"flexsupport/views/components/selectbox"
"flexsupport/ui/components/button"
"flexsupport/ui/components/card"
"flexsupport/ui/components/input"
"flexsupport/ui/components/label"
)
var ItemTypes = []models.ItemType{
@@ -25,6 +24,8 @@ var ItemTypes = []models.ItemType{
models.Other,
}
type TicketFormParams struct{}
func TicketForm(ticket models.Ticket) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
@@ -58,261 +59,17 @@ func TicketForm(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(postUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 34, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 34, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" hx-target=\"#form-container\" hx-swap=\"outerHTML\" class=\"space-y-6\"><!-- Customer Information --><div class=\"bg-white shadow rounded-lg\"><div class=\"px-4 py-5 sm:p-6\"><h3 class=\"text-lg font-medium text-gray-900 mb-4\">Customer Information</h3><div class=\"grid grid-cols-1 gap-6 sm:grid-cols-2\"><div class=\"col-span-2\"><label for=\"customer_name\" class=\"block text-sm font-medium text-gray-700\">Customer Name <span class=\"text-red-500\">*</span></label> <input type=\"text\" name=\"customer_name\" id=\"customer_name\" required value=\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" hx-swap=\"outerHTML\" hx-target=\"this\" id=\"ticket-form\" class=\"space-y-6\"><!-- Customer Information -->")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 49, Col: 37}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"John Doe\"></div><div><label for=\"customer_phone\" class=\"block text-sm font-medium text-gray-700\">Phone Number <span class=\"text-red-500\">*</span></label> <input type=\"tel\" name=\"customer_phone\" id=\"customer_phone\" required value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerPhone)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 63, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"(555) 123-4567\"></div><div><label for=\"customer_email\" class=\"block text-sm font-medium text-gray-700\">Email Address</label> <input type=\"email\" name=\"customer_email\" id=\"customer_email\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerEmail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 76, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"john@example.com\"></div></div></div></div><!-- Item Information --><div class=\"bg-white shadow rounded-lg\"><div class=\"px-4 py-5 sm:p-6\"><h3 class=\"text-lg font-medium text-gray-900 mb-4\">Item Information</h3><div class=\"grid grid-cols-1 gap-6 sm:grid-cols-2\"><div><label for=\"item_type\" class=\"block text-sm font-medium text-gray-700\">Item Type <span class=\"text-red-500\">*</span></label> <select name=\"item_type\" id=\"item_type\" required class=\"mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md\"><option value=\"\">Select item type</option> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, itemType := range ItemTypes {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<option value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(itemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 101, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemType == itemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 101, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(itemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 101, Col: 89}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</option>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</select></div><div><label for=\"item_brand\" class=\"block text-sm font-medium text-gray-700\">Brand</label> <input type=\"text\" name=\"item_brand\" id=\"item_brand\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemBrand)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 113, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Keen, Danner, etc.\"></div><div><label for=\"item_model\" class=\"block text-sm font-medium text-gray-700\">Model</label> <input type=\"text\" name=\"item_model\" id=\"item_model\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemModel)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 126, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"\"></div></div></div></div><!-- Repair Details --><div class=\"bg-white shadow rounded-lg\"><div class=\"px-4 py-5 sm:p-6\"><h3 class=\"text-lg font-medium text-gray-900 mb-4\">Repair Details</h3><div class=\"space-y-6\"><div><label for=\"issue_description\" class=\"block text-sm font-medium text-gray-700\">Issue Description <span class=\"text-red-500\">*</span></label> <textarea name=\"issue_description\" id=\"issue_description\" required rows=\"4\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Describe the problem in detail...\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.IssueDescription)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 150, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</textarea></div><div class=\"grid grid-cols-1 gap-6 sm:grid-cols-2\"><div><label for=\"priority\" class=\"block text-sm font-medium text-gray-700\">Priority</label> <select name=\"priority\" id=\"priority\" class=\"mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md\"><option value=\"low\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "low")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 162, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\">Low</option> <option value=\"normal\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "normal")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 163, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">Normal</option> <option value=\"high\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "high")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 164, Col: 68}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\">High</option> <option value=\"urgent\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "urgent")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 165, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">Urgent</option></select></div><div><label for=\"estimated_cost\" class=\"block text-sm font-medium text-gray-700\">Estimated Cost</label><div class=\"mt-1 relative rounded-md shadow-sm\"><div class=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\"><span class=\"text-gray-500 sm:text-sm\">$</span></div><input type=\"number\" name=\"estimated_cost\" id=\"estimated_cost\" step=\"0.01\" min=\"0\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.EstimatedCost)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 182, Col: 40}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" class=\"focus:ring-blue-500 focus:border-blue-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md\" placeholder=\"0.00\"></div></div><div><label for=\"due_date\" class=\"block text-sm font-medium text-gray-700\">Due Date</label>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
dueDate := ""
if ticket.DueDate != nil {
dueDate = ticket.DueDate.Format("2006-01-02")
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<input type=\"date\" name=\"due_date\" id=\"due_date\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(dueDate)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 202, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"></div></div><div><label for=\"internal_notes\" class=\"block text-sm font-medium text-gray-700\">Internal Notes</label> <textarea name=\"internal_notes\" id=\"internal_notes\" rows=\"3\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Notes visible only to staff...\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.InternalNotes)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 217, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</textarea></div></div></div></div><!-- Form Actions --><div class=\"flex justify-end space-x-3\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
backUrl := "/"
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 templ.SafeURL
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinURLErrs(backUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-form.templ`, Line: 226, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" class=\"inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">Cancel</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var20 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
@@ -324,7 +81,315 @@ func TicketForm(ticket models.Ticket) templ.Component {
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "Create Ticket")
templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<h3 class=\"text-lg font-medium text-gray-900 mb-4\">Customer Information</h3><div class=\"grid grid-cols-1 gap-6 sm:grid-cols-2\"><div class=\"col-span-2\" hx-target=\"this\" hx-swap=\"outerHTML\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var5 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "Customer Name <span class=\"text-red-500\">*</span>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
templ_7745c5c3_Err = label.Label(label.Props{
For: "customer_name",
Class: "block text-sm font-medium text-gray-700",
}).Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = input.Input(input.Props{
ID: "customer_name",
Type: input.TypeText,
Placeholder: "John Doe",
Attributes: templ.Attributes{
"required": true,
},
Value: ticket.CustomerName,
}).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</div><div><label for=\"customer_phone\" class=\"block text-sm font-medium text-gray-700\">Phone Number <span class=\"text-red-500\">*</span></label> <input type=\"tel\" name=\"customer_phone\" id=\"customer_phone\" required value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerPhone)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 66, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"(555) 123-4567\"></div><div><label for=\"customer_email\" class=\"block text-sm font-medium text-gray-700\">Email Address</label> <input type=\"email\" name=\"customer_email\" id=\"customer_email\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerEmail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 79, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"john@example.com\"></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
templ_7745c5c3_Err = card.Content().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
templ_7745c5c3_Err = card.Card().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<!-- Item Information --><div class=\"bg-white shadow rounded-lg\"><div class=\"px-4 py-5 sm:p-6\"><h3 class=\"text-lg font-medium text-gray-900 mb-4\">Item Information</h3><div class=\"grid grid-cols-1 gap-6 sm:grid-cols-2\"><div x-data=\"{ itemType: '{ ticket.ItemType }' }\"><label for=\"item_type\" class=\"block text-sm font-medium text-gray-700\">Item Type <span class=\"text-red-500\">*</span></label> <select name=\"item_type\" id=\"item_type\" required x-model=\"itemType\" class=\"mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md\"><option value=\"\">Select item type</option> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, itemType := range ItemTypes {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<option value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(itemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 105, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemType == itemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 105, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(itemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 105, Col: 89}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</option>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</select><div x-show=\"itemType === 'Other'\" x-transition><label for=\"other_details\" class=\"block text-sm font-medium text-gray-700\">Please describe the item</label> <input type=\"text\" name=\"other_details\" id=\"other_details\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Please describe the item\"></div></div><div><label for=\"item_brand\" class=\"block text-sm font-medium text-gray-700\">Brand</label> <input type=\"text\" name=\"item_brand\" id=\"item_brand\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemBrand)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 129, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Keen, Danner, etc.\"></div><div><label for=\"item_model\" class=\"block text-sm font-medium text-gray-700\">Model</label> <input type=\"text\" name=\"item_model\" id=\"item_model\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemModel)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 142, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"\"></div></div></div></div><!-- Repair Details --><div class=\"bg-white shadow rounded-lg\"><div class=\"px-4 py-5 sm:p-6\"><h3 class=\"text-lg font-medium text-gray-900 mb-4\">Repair Details</h3><div class=\"space-y-6\"><div><label for=\"issue_description\" class=\"block text-sm font-medium text-gray-700\">Issue Description <span class=\"text-red-500\">*</span></label> <textarea name=\"issue_description\" id=\"issue_description\" required rows=\"4\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Describe the problem in detail...\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.IssueDescription)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 166, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</textarea></div><div class=\"grid grid-cols-1 gap-6 sm:grid-cols-2\"><div><label for=\"priority\" class=\"block text-sm font-medium text-gray-700\">Priority</label> <select name=\"priority\" id=\"priority\" class=\"mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md\"><option value=\"low\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "low")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 178, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">Low</option> <option value=\"normal\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "normal")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 179, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">Normal</option> <option value=\"high\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "high")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 180, Col: 68}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\">High</option> <option value=\"urgent\" selected=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority == "urgent")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 181, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\">Urgent</option></select></div><div><label for=\"estimated_cost\" class=\"block text-sm font-medium text-gray-700\">Estimated Cost</label><div class=\"mt-1 relative rounded-md shadow-sm\"><div class=\"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none\"><span class=\"text-gray-500 sm:text-sm\">$</span></div><input type=\"number\" name=\"estimated_cost\" id=\"estimated_cost\" step=\"0.01\" min=\"0\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.EstimatedCost)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 198, Col: 40}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" class=\"focus:ring-blue-500 focus:border-blue-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md\" placeholder=\"0.00\"></div></div><div><label for=\"due_date\" class=\"block text-sm font-medium text-gray-700\">Due Date</label> <input type=\"date\" name=\"due_date\" id=\"due_date\" value=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.DueDate.Format("2006-01-02"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 212, Col: 54}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"></div></div><div><label for=\"internal_notes\" class=\"block text-sm font-medium text-gray-700\">Internal Notes</label> <textarea name=\"internal_notes\" id=\"internal_notes\" rows=\"3\" class=\"mt-1 focus:ring-blue-500 focus:border-blue-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\" placeholder=\"Notes visible only to staff...\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.InternalNotes)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 227, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</textarea></div></div></div></div><!-- Form Actions --><div class=\"flex justify-end space-x-3\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
backUrl := "/"
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var21 templ.SafeURL
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinURLErrs(backUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-form.templ`, Line: 236, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" class=\"inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">Cancel</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Var22 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "Create Ticket")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -332,11 +397,11 @@ func TicketForm(ticket models.Ticket) templ.Component {
})
templ_7745c5c3_Err = button.Button(button.Props{
Type: "submit",
}).Render(templ.WithChildren(ctx, templ_7745c5c3_Var20), templ_7745c5c3_Buffer)
}).Render(templ.WithChildren(ctx, templ_7745c5c3_Var22), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</div></form></div><!-- Sidebar with helpful info --><div class=\"lg:col-span-1\"><div class=\"bg-blue-50 border border-blue-200 rounded-lg p-4\"><h4 class=\"text-sm font-medium text-blue-900 mb-2\">Quick Tips</h4><ul class=\"text-sm text-blue-700 space-y-2\"><li>• Document any existing damage</li><li>• Set realistic due dates</li><li>• Take photos if necessary</li></ul></div><!-- if ticket != nil { --><!-- \t<div class=\"mt-6 bg-white shadow rounded-lg p-4\"> --><!-- \t\t<h4 class=\"text-sm font-medium text-gray-900 mb-3\">Ticket History</h4> --><!-- \t\t<div class=\"space-y-3\"> --><!-- \t\t\t<div class=\"text-xs\"> --><!-- \t\t\t\t<span class=\"text-gray-500\">Created:</span> --><!-- \t\t\t\t<span class=\"text-gray-900\">{ ticket.CreatedAt.Format(\"2006-01-02 15:04:05\") }</span> --><!-- \t\t\t</div> --><!-- \t\t\t<div class=\"text-xs\"> --><!-- \t\t\t\t<span class=\"text-gray-500\">Last Updated:</span> --><!-- \t\t\t\t<span class=\"text-gray-900\">{ ticket.UpdatedAt.Format(\"2006-01-02 15:04:05\") }</span> --><!-- \t\t\t</div> --><!-- \t\t\t<div class=\"text-xs\"> --><!-- \t\t\t\t<span class=\"text-gray-500\">Created By:</span> --><!-- \t\t\t\t<span class=\"text-gray-900\">{ ticket.CreatedBy }</span> --><!-- \t\t\t</div> --><!-- \t\t</div> --><!-- \t</div> --><!-- } --></div></div></div>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</div></form></div><!-- Sidebar with helpful info --><div class=\"lg:col-span-1\"><div class=\"bg-blue-50 border border-blue-200 rounded-lg p-4\"><h4 class=\"text-sm font-medium text-blue-900 mb-2\">Quick Tips</h4><ul class=\"text-sm text-blue-700 space-y-2\"><li>• Document any existing damage</li><li>• Set realistic due dates</li><li>• Take photos if necessary</li></ul></div><!-- if ticket != nil { --><!-- \t<div class=\"mt-6 bg-white shadow rounded-lg p-4\"> --><!-- \t\t<h4 class=\"text-sm font-medium text-gray-900 mb-3\">Ticket History</h4> --><!-- \t\t<div class=\"space-y-3\"> --><!-- \t\t\t<div class=\"text-xs\"> --><!-- \t\t\t\t<span class=\"text-gray-500\">Created:</span> --><!-- \t\t\t\t<span class=\"text-gray-900\">{ ticket.CreatedAt.Format(\"2006-01-02 15:04:05\") }</span> --><!-- \t\t\t</div> --><!-- \t\t\t<div class=\"text-xs\"> --><!-- \t\t\t\t<span class=\"text-gray-500\">Last Updated:</span> --><!-- \t\t\t\t<span class=\"text-gray-900\">{ ticket.UpdatedAt.Format(\"2006-01-02 15:04:05\") }</span> --><!-- \t\t\t</div> --><!-- \t\t\t<div class=\"text-xs\"> --><!-- \t\t\t\t<span class=\"text-gray-500\">Created By:</span> --><!-- \t\t\t\t<span class=\"text-gray-900\">{ ticket.CreatedBy }</span> --><!-- \t\t\t</div> --><!-- \t\t</div> --><!-- \t</div> --><!-- } --></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -0,0 +1,371 @@
package tickets
import (
"flexsupport/internal/models"
"flexsupport/ui/components/card"
"flexsupport/internal/utils"
"fmt"
)
templ TicketPage(ticket models.Ticket) {
<div class="px-4 py-6 sm:px-0">
<!-- Page Header -->
<div class="mb-6 flex justify-between items-start">
<div>
<div class="flex items-center gap-3">
<h2 class="text-2xl font-bold text-gray-900">Ticket { ticket.ExternalTag }</h2>
<span
class={
utils.TwMerge(
"px-3 py-1 inline-flex text-sm leading-5 font-semibold rounded-full",
ticket.StatusClass(),
),
}
>
{ ticket.StatusDisplay() }
</span>
</div>
<p class="mt-1 text-sm text-gray-600">{ ticket.ItemType } - { ticket.ItemBrand } { ticket.ItemModel }</p>
</div>
<a href="/" class="text-sm text-gray-600 hover:text-gray-900">← Back to queue</a>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Main Content -->
<div class="lg:col-span-2 space-y-6">
<!-- Quick Status Update -->
@card.Card() {
@card.Content() {
<h3 class="text-lg font-medium text-gray-900 mb-4">Quick Actions</h3>
{{ statusUrl := fmt.Sprintf("/tickets/%d/status", ticket.ID) }}
<div class="flex flex-wrap gap-2">
<button
hx-post={ statusUrl }
hx-vals='{"status": "in_progress"}'
hx-target="#status-badge"
hx-swap="outerHTML"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
>
<svg class="h-4 w-4 mr-1.5 text-yellow-500" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"></path>
</svg>
Start Work
</button>
<button
hx-post={ statusUrl }
hx-vals='{"status": "waiting_parts"}'
hx-target="#status-badge"
hx-swap="outerHTML"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
>
<svg class="h-4 w-4 mr-1.5 text-orange-500" fill="currentColor" viewBox="0 0 20 20">
<path d="M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"></path>
</svg>
Waiting for Parts
</button>
<button
hx-post={ statusUrl }
hx-vals='{"status": "ready"}'
hx-target="#status-badge"
hx-swap="outerHTML"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
>
<svg class="h-4 w-4 mr-1.5 text-blue-500" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
</svg>
Ready for Pickup
</button>
<button
hx-post={ statusUrl }
hx-vals='{"status": "completed"}'
hx-target="#status-badge"
hx-swap="outerHTML"
hx-confirm="Are you sure you want to mark this ticket as completed?"
class="inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
<svg class="h-4 w-4 mr-1.5" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
Mark Completed
</button>
</div>
}
}
<!-- Issue Details -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-lg font-medium text-gray-900 mb-4">Issue Description</h3>
<p class="text-gray-700 whitespace-pre-line">{ ticket.IssueDescription }</p>
}
}
<!-- Parts & Materials -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-gray-900">Parts & Materials</h3>
<button
@click="$refs.addPartForm.classList.toggle('hidden')"
class="text-sm text-blue-600 hover:text-blue-900"
>
+ Add Part
</button>
</div>
<!-- Add Part Form (hidden by default) -->
{{ partsLink := fmt.Sprintf("/tickets/%d/parts", ticket.ID) }}
<div x-ref="addPartForm" class="hidden mb-4 p-4 bg-gray-50 rounded-md">
<form
hx-post={ partsLink }
hx-target="#parts-list"
hx-swap="beforeend"
hx-on::after-request="$refs.addPartForm.classList.add('hidden'); this.reset()"
>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-4">
<div class="sm:col-span-2">
<input
type="text"
name="part_name"
placeholder="Part name"
required
class="block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
/>
</div>
<div>
<input
type="number"
name="quantity"
placeholder="Qty"
min="1"
value="1"
required
class="block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
/>
</div>
<div>
<div class="relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500 sm:text-sm">$</span>
</div>
<input
type="number"
name="cost"
placeholder="Cost"
step="0.01"
min="0"
required
class="block w-full pl-7 pr-2 sm:text-sm border-gray-300 rounded-md"
/>
</div>
</div>
</div>
<div class="mt-2 flex justify-end gap-2">
<button
type="button"
@click="$refs.addPartForm.classList.add('hidden')"
class="text-sm text-gray-600 hover:text-gray-900"
>
Cancel
</button>
<button
type="submit"
class="inline-flex items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700"
>
Add Part
</button>
</div>
</form>
</div>
<!-- Parts List -->
<div id="parts-list" class="space-y-2">
if len(ticket.Parts) > 0 {
for _, part := range ticket.Parts {
<div class="flex items-center justify-between p-3 bg-gray-50 rounded-md">
<div class="flex-1">
<span class="text-sm font-medium text-gray-900">{ part.Name }</span>
<span class="text-sm text-gray-500 ml-2">× { part.Quantity }</span>
</div>
<div class="flex items-center gap-3">
<span class="text-sm font-medium text-gray-900">${ part.Cost }</span>
<button
hx-delete="/tickets/{{$.Ticket.ID}}/parts/{{.ID}}"
hx-target="closest div"
hx-swap="outerHTML swap:1s"
class="text-red-600 hover:text-red-900"
>
<svg class="h-4 w-4" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd"></path>
</svg>
</button>
</div>
</div>
}
} else {
<p class="text-sm text-gray-500 text-center py-4">No parts added yet</p>
}
</div>
if len(ticket.Parts) > 0 {
<div class="mt-4 pt-4 border-t border-gray-200">
<div class="flex justify-between text-sm">
<span class="font-medium text-gray-900">Total Parts Cost:</span>
<span class="font-bold text-gray-900">${ ticket.TotalPartsCost }</span>
</div>
</div>
}
}
}
<!-- Work Log / Notes -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-lg font-medium text-gray-900 mb-4">Work Log</h3>
{{ notesLink := fmt.Sprintf("/tickets/%d/notes", ticket.ID) }}
<!-- Add Note Form -->
<form
hx-post={ notesLink }
hx-target="#notes-list"
hx-swap="afterbegin"
hx-on::after-request="this.reset()"
class="mb-4"
>
<textarea
name="note"
rows="3"
placeholder="Add a work note..."
required
class="block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
></textarea>
<div class="mt-2 flex justify-end">
<button
type="submit"
class="inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700"
>
Add Note
</button>
</div>
</form>
<!-- Notes List -->
<div id="notes-list" class="space-y-3">
if len(ticket.Notes) > 0 {
for _, note := range ticket.Notes {
<div class="p-3 bg-gray-50 rounded-md">
<div class="flex justify-between items-start mb-1">
<span class="text-sm font-medium text-gray-900">{ note.Author }</span>
<span class="text-xs text-gray-500">{ note.Timestamp.String() }</span>
</div>
<p class="text-sm text-gray-700 whitespace-pre-line">{ note.Content }</p>
</div>
}
} else {
<p class="text-sm text-gray-500 text-center py-4">No work notes yet</p>
}
</div>
}
}
</div>
<!-- Sidebar -->
<div class="lg:col-span-1 space-y-6">
<!-- Customer Info -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-sm font-medium text-gray-900 mb-3">Customer Information</h3>
<dl class="space-y-3">
<div>
<dt class="text-xs text-gray-500">Name</dt>
<dd class="text-sm font-medium text-gray-900">{ ticket.CustomerName }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Phone</dt>
<dd class="text-sm text-gray-900">
{{ telLink := fmt.Sprintf("tel:%s", ticket.CustomerPhone) }}
<a href={ telLink } class="text-blue-600 hover:text-blue-900">
{ ticket.CustomerPhone }
</a>
</dd>
</div>
if ticket.CustomerEmail != "" {
<div>
<dt class="text-xs text-gray-500">Email</dt>
<dd class="text-sm text-gray-900">
{{ emailLink := fmt.Sprintf("mailto:%s", ticket.CustomerEmail) }}
<a href={ emailLink } class="text-blue-600 hover:text-blue-900">
{ ticket.CustomerEmail }
</a>
</dd>
</div>
}
</dl>
}
}
<!-- Device Details -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-sm font-medium text-gray-900 mb-3">Device Details</h3>
<dl class="space-y-3">
<div>
<dt class="text-xs text-gray-500">Type</dt>
<dd class="text-sm text-gray-900">{ ticket.ItemType }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Brand/Model</dt>
<dd class="text-sm text-gray-900">{ ticket.ItemBrand } { ticket.ItemModel }</dd>
</div>
</dl>
}
}
<!-- Ticket Metadata -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-sm font-medium text-gray-900 mb-3">Ticket Details</h3>
<dl class="space-y-3">
<div>
<dt class="text-xs text-gray-500">Priority</dt>
<dd class="text-sm text-gray-900 capitalize">{ ticket.Priority }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Created</dt>
<dd class="text-sm text-gray-900">{ ticket.CreatedAt.String() }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Due Date</dt>
{{
overDueClass := ""
if ticket.IsOverdue() {
overDueClass = "text-red-600 font-semibold"
}
}}
<dd
class={ utils.TwMerge(
"text-sm text-gray-900",
overDueClass,
) }
>
{ ticket.DueDate.String() }
</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Estimated Cost</dt>
{{ estimatedCost := fmt.Sprintf("$%.2f", ticket.EstimatedCost) }}
<dd class="text-sm text-gray-900">${ estimatedCost }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Total Cost</dt>
{{ totalCost := fmt.Sprintf("$%.2f", ticket.TotalCost) }}
<dd class="text-lg font-bold text-gray-900">${ totalCost }</dd>
</div>
</dl>
}
}
<!-- Actions -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
{{ ticketEditLink := fmt.Sprintf("/tickets/%d/edit", ticket.ID) }}
<a
href={ ticketEditLink }
class="w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
>
Edit Ticket
</a>
}
}
</div>
</div>
</div>
}

View File

@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.960
package pages
package tickets
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/models"
"flexsupport/views/components/card"
"flexsupport/ui/components/card"
"flexsupport/internal/utils"
"fmt"
@@ -44,7 +44,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ExternalTag)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 18, Col: 78}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 17, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -70,7 +70,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var3).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -83,7 +83,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.StatusDisplay())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 27, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 26, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -96,7 +96,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 30, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 29, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -109,7 +109,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemBrand)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 30, Col: 83}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 29, Col: 82}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -122,7 +122,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemModel)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 30, Col: 104}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 29, Col: 103}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -168,7 +168,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(statusUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 44, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 43, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -181,7 +181,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(statusUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 56, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 55, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -194,7 +194,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(statusUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 68, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 67, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -207,7 +207,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(statusUrl)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 80, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 79, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -264,7 +264,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.IssueDescription)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 99, Col: 77}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 98, Col: 76}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -326,7 +326,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(partsLink)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 118, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 117, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -345,7 +345,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(part.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 184, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 183, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -358,7 +358,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(part.Quantity)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 185, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 184, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -371,7 +371,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(part.Cost)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 188, Col: 72}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 187, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -400,7 +400,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.TotalPartsCost)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 210, Col: 72}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 209, Col: 71}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -463,7 +463,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(notesLink)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 223, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 222, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {
@@ -482,7 +482,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(note.Author)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 251, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 250, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
if templ_7745c5c3_Err != nil {
@@ -495,7 +495,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(note.Timestamp.String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 252, Col: 73}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 251, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
if templ_7745c5c3_Err != nil {
@@ -508,7 +508,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(note.Content)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 254, Col: 78}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 253, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -576,7 +576,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 273, Col: 76}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 272, Col: 75}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
if templ_7745c5c3_Err != nil {
@@ -594,7 +594,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var34 templ.SafeURL
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinURLErrs(telLink)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 279, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 278, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
if templ_7745c5c3_Err != nil {
@@ -607,7 +607,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var35 string
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerPhone)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 280, Col: 33}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 279, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
if templ_7745c5c3_Err != nil {
@@ -630,7 +630,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var36 templ.SafeURL
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinURLErrs(emailLink)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 289, Col: 30}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 288, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
if templ_7745c5c3_Err != nil {
@@ -643,7 +643,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CustomerEmail)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 290, Col: 34}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 289, Col: 33}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
if templ_7745c5c3_Err != nil {
@@ -705,7 +705,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var40 string
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemType)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 305, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 304, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
if templ_7745c5c3_Err != nil {
@@ -718,7 +718,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var41 string
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemBrand)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 309, Col: 61}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 308, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
if templ_7745c5c3_Err != nil {
@@ -731,7 +731,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var42 string
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.ItemModel)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 309, Col: 82}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 308, Col: 81}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
if templ_7745c5c3_Err != nil {
@@ -788,7 +788,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var45 string
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.Priority)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 321, Col: 71}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 320, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
if templ_7745c5c3_Err != nil {
@@ -801,101 +801,91 @@ func TicketPage(ticket models.Ticket) templ.Component {
var templ_7745c5c3_Var46 string
templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.CreatedAt.String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 325, Col: 70}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 324, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</dd></div>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</dd></div><div><dt class=\"text-xs text-gray-500\">Due Date</dt>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if ticket.DueDate != nil {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<div><dt class=\"text-xs text-gray-500\">Due Date</dt>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
overDueClass := ""
if ticket.IsOverdue() {
overDueClass = "text-red-600 font-semibold"
}
var templ_7745c5c3_Var47 = []any{utils.TwMerge(
"text-sm text-gray-900",
overDueClass,
)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var47...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "<dd class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var48 string
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var47).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.DueDate.String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 342, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</dd></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
overDueClass := ""
if ticket.IsOverdue() {
overDueClass = "text-red-600 font-semibold"
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "<div><dt class=\"text-xs text-gray-500\">Estimated Cost</dt>")
var templ_7745c5c3_Var47 = []any{utils.TwMerge(
"text-sm text-gray-900",
overDueClass,
)}
templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var47...)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<dd class=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var48 string
templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var47).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var49 string
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(ticket.DueDate.String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 340, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "</dd></div><div><dt class=\"text-xs text-gray-500\">Estimated Cost</dt>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
estimatedCost := fmt.Sprintf("$%.2f", ticket.EstimatedCost)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<dd class=\"text-sm text-gray-900\">$")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "<dd class=\"text-sm text-gray-900\">$")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var50 string
templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(estimatedCost)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 349, Col: 59}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 346, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</dd></div><div><dt class=\"text-xs text-gray-500\">Total Cost</dt>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</dd></div><div><dt class=\"text-xs text-gray-500\">Total Cost</dt>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
totalCost := fmt.Sprintf("$%.2f", ticket.TotalCost)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "<dd class=\"text-lg font-bold text-gray-900\">$")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<dd class=\"text-lg font-bold text-gray-900\">$")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var51 string
templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(totalCost)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 354, Col: 65}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 351, Col: 64}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</dd></div></dl>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</dd></div></dl>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -911,7 +901,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<!-- Actions -->")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "<!-- Actions -->")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -940,20 +930,20 @@ func TicketPage(ticket models.Ticket) templ.Component {
}
ctx = templ.InitializeContext(ctx)
ticketEditLink := fmt.Sprintf("/tickets/%d/edit", ticket.ID)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<a href=\"")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<a href=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var54 templ.SafeURL
templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinURLErrs(ticketEditLink)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/pages/ticket-page.templ`, Line: 364, Col: 29}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/routes/tickets/ticket-page.templ`, Line: 361, Col: 28}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\" class=\"w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50\">Edit Ticket</a>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\" class=\"w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50\">Edit Ticket</a>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -969,7 +959,7 @@ func TicketPage(ticket models.Ticket) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</div></div></div>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -0,0 +1,22 @@
package tickets
import (
"log/slog"
"net/http"
"flexsupport/internal/layout"
"flexsupport/internal/models"
)
type Handler struct {
log *slog.Logger
}
func (h *Handler) NewTicketForm(w http.ResponseWriter, r *http.Request) {
page := TicketForm(models.Ticket{})
err := layout.BaseLayout(page).Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}

39
main.go
View File

@@ -1,5 +1,40 @@
package main
func main() {
if err := App(); err != nil {panic(err)};
import (
"context"
"fmt"
"os"
"os/exec"
"github.com/joho/godotenv"
)
var Environment = "development"
func init() {
os.Setenv("env", Environment)
if Environment == "development" {
// exec.Command("bunx", "tailwindcss", "-i", "./static/assets/css/input.css", "-o", "./static/assets/css/output.min.css", "-m").Run()
// exec.Command("go", "tool", "templ", "generate")
exec.Command("task", "gen").Run()
err := godotenv.Load(".env")
if err != nil {
panic(err)
}
}
}
func main() {
ctx := context.Background()
if err := App(ctx, os.Stdout, getEnv); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
os.Exit(1)
}
}
func getEnv(key, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}
return fallback
}

View File

@@ -124,4 +124,14 @@
.container {
@apply px-4 xl:px-6 mx-auto max-w-screen-2xl;
}
.lucide-icon {
width: 24px;
height: 24px;
stroke: currentColor;
fill: none;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
<svg
xmlns="http://www.w3.org/2000/svg"
class="lucide-icon"
>
<path d="M21 12a9 9 0 1 1-6.219-8.56"/>
</svg>

After

Width:  |  Height:  |  Size: 119 B

9
static/assets/js/alpine.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@ package accordion
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type Props struct {

View File

@@ -14,7 +14,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type Props struct {
@@ -86,7 +86,7 @@ func Accordion(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 41, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 41, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -104,7 +104,7 @@ func Accordion(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -181,7 +181,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 61, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 61, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -199,7 +199,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var6).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -280,7 +280,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 84, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 84, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -298,7 +298,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var10).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -381,7 +381,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 114, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 114, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -399,7 +399,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var14).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/accordion/accordion.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/accordion/accordion.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {

View File

@@ -89,7 +89,7 @@ func Alert(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/alert/alert.templ`, Line: 40, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/alert/alert.templ`, Line: 40, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -107,7 +107,7 @@ func Alert(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/alert/alert.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/alert/alert.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -183,7 +183,7 @@ func Title(props ...TitleProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/alert/alert.templ`, Line: 66, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/alert/alert.templ`, Line: 66, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -201,7 +201,7 @@ func Title(props ...TitleProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var6).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/alert/alert.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/alert/alert.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -277,7 +277,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/alert/alert.templ`, Line: 88, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/alert/alert.templ`, Line: 88, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -295,7 +295,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var10).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/alert/alert.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/alert/alert.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {

View File

@@ -78,7 +78,7 @@ func AspectRatio(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/aspectratio/aspectratio.templ`, Line: 31, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/aspectratio/aspectratio.templ`, Line: 31, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -96,7 +96,7 @@ func AspectRatio(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/aspectratio/aspectratio.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/aspectratio/aspectratio.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {

View File

@@ -80,7 +80,7 @@ func Badge(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/badge/badge.templ`, Line: 30, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/badge/badge.templ`, Line: 30, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -98,7 +98,7 @@ func Badge(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/badge/badge.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/badge/badge.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {

View File

@@ -4,7 +4,7 @@ package breadcrumb
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type Props struct {

View File

@@ -14,7 +14,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type Props struct {
@@ -96,7 +96,7 @@ func Breadcrumb(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 50, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 50, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -114,7 +114,7 @@ func Breadcrumb(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -190,7 +190,7 @@ func List(props ...ListProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 72, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 72, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -208,7 +208,7 @@ func List(props ...ListProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var6).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -284,7 +284,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 93, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 93, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -302,7 +302,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var10).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -378,7 +378,7 @@ func Link(props ...LinkProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 114, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 114, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -397,7 +397,7 @@ func Link(props ...LinkProps) templ.Component {
var templ_7745c5c3_Var16 templ.SafeURL
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Href))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 117, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 117, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -415,7 +415,7 @@ func Link(props ...LinkProps) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var14).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -491,7 +491,7 @@ func Separator(props ...SeparatorProps) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 138, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 138, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -509,7 +509,7 @@ func Separator(props ...SeparatorProps) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var19).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -592,7 +592,7 @@ func Page(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 163, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 163, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -610,7 +610,7 @@ func Page(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var23).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/breadcrumb/breadcrumb.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {

View File

@@ -114,7 +114,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 61, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 61, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -132,7 +132,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var4 templ.SafeURL
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Href))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 63, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 63, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -150,7 +150,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 65, Col: 21}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 65, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -168,7 +168,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -223,7 +223,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 87, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 87, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -241,7 +241,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var7).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -259,7 +259,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.Type))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 103, Col: 25}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 103, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -278,7 +278,7 @@ func Button(props ...Props) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(p.Form)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/button/button.templ`, Line: 106, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/button/button.templ`, Line: 106, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {

View File

@@ -4,7 +4,7 @@ package calendar
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
"strconv"
"time"
)

View File

@@ -14,7 +14,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
"strconv"
"time"
)
@@ -146,7 +146,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -159,7 +159,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-wrapper")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 109, Col: 46}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 109, Col: 46}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -177,7 +177,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 113, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 113, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -190,7 +190,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(initialSelectedISO)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 114, Col: 30}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 114, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -203,7 +203,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-hidden")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 115, Col: 25}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 115, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -221,7 +221,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 120, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 120, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -234,7 +234,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.LocaleTag))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 122, Col: 53}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 122, Col: 53}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -247,7 +247,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(initialMonth))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 123, Col: 63}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 123, Col: 63}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -260,7 +260,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(initialYear))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 124, Col: 61}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 124, Col: 61}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -273,7 +273,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(initialSelectedISO)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 125, Col: 55}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 125, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -286,7 +286,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(int(initialStartOfWeek))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 126, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 126, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -307,7 +307,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-month-select")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 141, Col: 34}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 141, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -325,7 +325,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 147, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 147, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -348,7 +348,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(i))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 147, Col: 121}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 147, Col: 121}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -361,7 +361,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(monthNames[i])
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 148, Col: 24}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 148, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -379,7 +379,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-month-value")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 153, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 153, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -392,7 +392,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(monthNames[currentMonth])
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 153, Col: 68}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 153, Col: 68}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -413,7 +413,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-year-select")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 160, Col: 33}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 160, Col: 33}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -431,7 +431,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(year))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 166, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 166, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -454,7 +454,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(year))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 167, Col: 29}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 167, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -472,7 +472,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-year-value")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 172, Col: 38}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 172, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -485,7 +485,7 @@ func Calendar(props ...Props) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(currentYear))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 172, Col: 68}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 172, Col: 68}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -543,7 +543,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 194, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 194, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -556,7 +556,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/calendar.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/calendar/calendar.templ`, Line: 194, Col: 104}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/calendar/calendar.templ`, Line: 194, Col: 104}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {

View File

@@ -96,7 +96,7 @@ func Card(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 50, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 50, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -114,7 +114,7 @@ func Card(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -190,7 +190,7 @@ func Header(props ...HeaderProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 71, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 71, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -208,7 +208,7 @@ func Header(props ...HeaderProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var6).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -284,7 +284,7 @@ func Title(props ...TitleProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 92, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 92, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -302,7 +302,7 @@ func Title(props ...TitleProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var10).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -378,7 +378,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 113, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 113, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -396,7 +396,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var14).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -472,7 +472,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 134, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 134, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -490,7 +490,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var18).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -566,7 +566,7 @@ func Footer(props ...FooterProps) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 155, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 155, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -584,7 +584,7 @@ func Footer(props ...FooterProps) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var22).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/card/card.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/card/card.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {

View File

@@ -4,7 +4,7 @@ package checkbox
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type Props struct {

View File

@@ -14,7 +14,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type Props struct {
@@ -96,7 +96,7 @@ func Checkbox(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/checkbox/checkbox.templ`, Line: 32, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/checkbox/checkbox.templ`, Line: 32, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -115,7 +115,7 @@ func Checkbox(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/checkbox/checkbox.templ`, Line: 35, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/checkbox/checkbox.templ`, Line: 35, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -134,7 +134,7 @@ func Checkbox(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.Value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/checkbox/checkbox.templ`, Line: 38, Col: 19}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/checkbox/checkbox.templ`, Line: 38, Col: 19}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -158,7 +158,7 @@ func Checkbox(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.Form)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/checkbox/checkbox.templ`, Line: 43, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/checkbox/checkbox.templ`, Line: 43, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -176,7 +176,7 @@ func Checkbox(props ...Props) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/checkbox/checkbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/checkbox/checkbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {

View File

@@ -73,7 +73,7 @@ func Collapsible(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 35, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 35, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -86,7 +86,7 @@ func Collapsible(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -99,7 +99,7 @@ func Collapsible(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(utils.IfElse(p.Open, "open", "closed"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 38, Col: 69}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 38, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -171,7 +171,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 52, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 52, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -189,7 +189,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var7).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -264,7 +264,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 69, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 69, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -282,7 +282,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var11).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -340,7 +340,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 85, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 85, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -353,7 +353,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/collapsible.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/collapsible/collapsible.templ`, Line: 85, Col: 107}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/collapsible/collapsible.templ`, Line: 85, Col: 107}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {

View File

@@ -4,8 +4,8 @@ package copybutton
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
)
type Props struct {

View File

@@ -14,8 +14,8 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
)
type Props struct {
@@ -57,7 +57,7 @@ func CopyButton(props Props) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.TargetID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/copybutton/copybutton.templ`, Line: 25, Col: 29}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/copybutton/copybutton.templ`, Line: 25, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -148,7 +148,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/copybutton/copybutton.templ`, Line: 47, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/copybutton/copybutton.templ`, Line: 47, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -161,7 +161,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/copybutton.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/copybutton/copybutton.templ`, Line: 47, Col: 106}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/copybutton/copybutton.templ`, Line: 47, Col: 106}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {

View File

@@ -4,11 +4,11 @@ package datepicker
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/calendar"
"flexsupport/views/components/card"
"flexsupport/views/components/icon"
"flexsupport/views/components/popover"
"flexsupport/ui/components/button"
"flexsupport/ui/components/calendar"
"flexsupport/ui/components/card"
"flexsupport/ui/components/icon"
"flexsupport/ui/components/popover"
"time"
)

View File

@@ -14,11 +14,11 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/calendar"
"flexsupport/views/components/card"
"flexsupport/views/components/icon"
"flexsupport/views/components/popover"
"flexsupport/ui/components/button"
"flexsupport/ui/components/calendar"
"flexsupport/ui/components/card"
"flexsupport/ui/components/icon"
"flexsupport/ui/components/popover"
"time"
)
@@ -114,7 +114,7 @@ func DatePicker(props ...Props) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 85, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 85, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -127,7 +127,7 @@ func DatePicker(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(initialSelectedISO)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 86, Col: 29}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 86, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -145,7 +145,7 @@ func DatePicker(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.Form)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 88, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 88, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -163,7 +163,7 @@ func DatePicker(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID + "-hidden")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 90, Col: 24}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 90, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -210,7 +210,7 @@ func DatePicker(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var8).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -223,7 +223,7 @@ func DatePicker(props ...Props) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(p.Placeholder)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 124, Col: 21}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 124, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -393,7 +393,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 157, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 157, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -406,7 +406,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/datepicker.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/datepicker/datepicker.templ`, Line: 157, Col: 106}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/datepicker/datepicker.templ`, Line: 157, Col: 106}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {

View File

@@ -5,7 +5,7 @@ package dialog
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type contextKey string

View File

@@ -15,7 +15,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/icon"
"flexsupport/ui/components/icon"
)
type contextKey string
@@ -129,7 +129,7 @@ func Dialog(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 87, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 87, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -147,7 +147,7 @@ func Dialog(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(instanceID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 90, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 90, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -176,7 +176,7 @@ func Dialog(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -254,7 +254,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 118, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 118, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -272,7 +272,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(instanceID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 120, Col: 38}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 120, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -285,7 +285,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(instanceID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 121, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 121, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -298,7 +298,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var7).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -388,7 +388,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var13).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -401,7 +401,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(instanceID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 161, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 161, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -462,7 +462,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var16).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -475,7 +475,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(instanceID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 198, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 198, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -547,7 +547,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var19).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -560,7 +560,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(instanceID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 234, Col: 38}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 234, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -629,7 +629,7 @@ func Close(props ...CloseProps) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 252, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 252, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -648,7 +648,7 @@ func Close(props ...CloseProps) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(p.For)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 255, Col: 32}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 255, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -671,7 +671,7 @@ func Close(props ...CloseProps) templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var23).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -743,7 +743,7 @@ func Header(props ...HeaderProps) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 273, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 273, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
if templ_7745c5c3_Err != nil {
@@ -761,7 +761,7 @@ func Header(props ...HeaderProps) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var28).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -833,7 +833,7 @@ func Footer(props ...FooterProps) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 289, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 289, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
if templ_7745c5c3_Err != nil {
@@ -851,7 +851,7 @@ func Footer(props ...FooterProps) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var32).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
if templ_7745c5c3_Err != nil {
@@ -923,7 +923,7 @@ func Title(props ...TitleProps) templ.Component {
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 305, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 305, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
if templ_7745c5c3_Err != nil {
@@ -941,7 +941,7 @@ func Title(props ...TitleProps) templ.Component {
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var36).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
if templ_7745c5c3_Err != nil {
@@ -1013,7 +1013,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var41 string
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 321, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 321, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
if templ_7745c5c3_Err != nil {
@@ -1031,7 +1031,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var42 string
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var40).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
if templ_7745c5c3_Err != nil {
@@ -1089,7 +1089,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var44 string
templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 331, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 331, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
if templ_7745c5c3_Err != nil {
@@ -1102,7 +1102,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var45 string
templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/dialog.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dialog/dialog.templ`, Line: 331, Col: 102}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dialog/dialog.templ`, Line: 331, Col: 102}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
if templ_7745c5c3_Err != nil {

View File

@@ -5,7 +5,7 @@ package dropdown
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/popover"
"flexsupport/ui/components/popover"
)
type Placement = popover.Placement

View File

@@ -15,7 +15,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/popover"
"flexsupport/ui/components/popover"
)
type Placement = popover.Placement
@@ -328,7 +328,7 @@ func Group(props ...GroupProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 185, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 185, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -346,7 +346,7 @@ func Group(props ...GroupProps) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var7).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -418,7 +418,7 @@ func Label(props ...LabelProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 202, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 202, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -436,7 +436,7 @@ func Label(props ...LabelProps) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var11).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -513,7 +513,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 221, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 221, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -531,7 +531,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var17 templ.SafeURL
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Href))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 223, Col: 32}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 223, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -550,7 +550,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(p.Target)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 226, Col: 21}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 226, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -568,7 +568,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var15).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -619,7 +619,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 247, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 247, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -632,7 +632,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var20).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -717,7 +717,7 @@ func Separator(props ...SeparatorProps) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 276, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 276, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -735,7 +735,7 @@ func Separator(props ...SeparatorProps) templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var24).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -799,7 +799,7 @@ func Shortcut(props ...ShortcutProps) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 291, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 291, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
if templ_7745c5c3_Err != nil {
@@ -817,7 +817,7 @@ func Shortcut(props ...ShortcutProps) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var28).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -894,7 +894,7 @@ func Sub(props ...SubProps) templ.Component {
var templ_7745c5c3_Var33 string
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 314, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 314, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
if templ_7745c5c3_Err != nil {
@@ -912,7 +912,7 @@ func Sub(props ...SubProps) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var32).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
if templ_7745c5c3_Err != nil {
@@ -1000,7 +1000,7 @@ func SubTrigger(props ...SubTriggerProps) templ.Component {
var templ_7745c5c3_Var38 string
templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var37).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
if templ_7745c5c3_Err != nil {
@@ -1134,7 +1134,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var42 string
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 390, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 390, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
if templ_7745c5c3_Err != nil {
@@ -1147,7 +1147,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var43 string
templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/dropdown.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/dropdown/dropdown.templ`, Line: 390, Col: 104}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/dropdown/dropdown.templ`, Line: 390, Col: 104}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
if templ_7745c5c3_Err != nil {

View File

@@ -4,7 +4,7 @@ package form
import (
"flexsupport/internal/utils"
"flexsupport/views/components/label"
"flexsupport/ui/components/label"
)
type MessageVariant string

View File

@@ -14,7 +14,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/label"
"flexsupport/ui/components/label"
)
type MessageVariant string
@@ -93,7 +93,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 51, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 51, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -111,7 +111,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -183,7 +183,7 @@ func ItemFlex(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 67, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 67, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -201,7 +201,7 @@ func ItemFlex(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var6).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -329,7 +329,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 98, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 98, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -347,7 +347,7 @@ func Description(props ...DescriptionProps) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var12).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -424,7 +424,7 @@ func Message(props ...MessageProps) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 114, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 114, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -442,7 +442,7 @@ func Message(props ...MessageProps) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var16).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/form/form.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/form/form.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {

View File

@@ -4,8 +4,8 @@ package input
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
)
type Type string

View File

@@ -14,8 +14,8 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
)
type Type string
@@ -121,7 +121,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 59, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 59, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -134,7 +134,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.Type))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 60, Col: 24}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 60, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -152,7 +152,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 62, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 62, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -171,7 +171,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.Placeholder)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 65, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 65, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -190,7 +190,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.Value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 68, Col: 19}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 68, Col: 19}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -209,7 +209,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.FileAccept)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 71, Col: 25}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 71, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -228,7 +228,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.Form)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 74, Col: 17}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 74, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -264,7 +264,7 @@ func Input(props ...Props) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -367,7 +367,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 129, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 129, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -380,7 +380,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/input.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/input/input.templ`, Line: 129, Col: 101}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/input/input.templ`, Line: 129, Col: 101}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {

View File

@@ -69,7 +69,7 @@ func Label(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/label/label.templ`, Line: 22, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/label/label.templ`, Line: 22, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -88,7 +88,7 @@ func Label(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.For)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/label/label.templ`, Line: 25, Col: 14}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/label/label.templ`, Line: 25, Col: 14}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -106,7 +106,7 @@ func Label(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/label/label.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/label/label.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -164,7 +164,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/label/label.templ`, Line: 42, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/label/label.templ`, Line: 42, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -177,7 +177,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/label.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/label/label.templ`, Line: 42, Col: 101}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/label/label.templ`, Line: 42, Col: 101}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {

View File

@@ -4,8 +4,8 @@ package pagination
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
)
type Props struct {

View File

@@ -14,8 +14,8 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
)
type Props struct {
@@ -105,7 +105,7 @@ func Pagination(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/pagination/pagination.templ`, Line: 63, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/pagination/pagination.templ`, Line: 63, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -123,7 +123,7 @@ func Pagination(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/pagination/pagination.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/pagination/pagination.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -190,7 +190,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/pagination/pagination.templ`, Line: 81, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/pagination/pagination.templ`, Line: 81, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -262,7 +262,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/pagination/pagination.templ`, Line: 97, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/pagination/pagination.templ`, Line: 97, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -436,7 +436,7 @@ func Previous(props ...PreviousProps) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(p.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/pagination/pagination.templ`, Line: 150, Col: 18}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/pagination/pagination.templ`, Line: 150, Col: 18}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -509,7 +509,7 @@ func Next(props ...NextProps) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(p.Label)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/pagination/pagination.templ`, Line: 169, Col: 18}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/pagination/pagination.templ`, Line: 169, Col: 18}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {

View File

@@ -109,7 +109,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 67, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 67, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -127,7 +127,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -145,7 +145,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.For)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 71, Col: 35}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 71, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -163,7 +163,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.TriggerType))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 74, Col: 47}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 74, Col: 47}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -243,7 +243,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 97, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 97, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -256,7 +256,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 98, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 98, Col: 28}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -269,7 +269,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.Placement))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 100, Col: 50}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 100, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -282,7 +282,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(p.Offset))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 101, Col: 50}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 101, Col: 50}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -295,7 +295,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatBool(p.DisableClickAway))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 102, Col: 77}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 102, Col: 77}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -308,7 +308,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatBool(p.DisableESC))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 103, Col: 65}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 103, Col: 65}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -321,7 +321,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatBool(p.ShowArrow))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 104, Col: 63}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 104, Col: 63}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -334,7 +334,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(p.HoverDelay))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 105, Col: 59}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 105, Col: 59}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -347,7 +347,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(p.HoverOutDelay))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 106, Col: 66}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 106, Col: 66}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -360,7 +360,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatBool(p.Exclusive))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 107, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 107, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
@@ -383,7 +383,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var8).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -451,7 +451,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 134, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 134, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -464,7 +464,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/popover.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/popover/popover.templ`, Line: 134, Col: 103}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/popover/popover.templ`, Line: 134, Col: 103}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {

View File

@@ -5,10 +5,10 @@ package selectbox
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/views/components/input"
"flexsupport/views/components/popover"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
"flexsupport/ui/components/input"
"flexsupport/ui/components/popover"
"fmt"
"strconv"
)

View File

@@ -15,10 +15,10 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/views/components/input"
"flexsupport/views/components/popover"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
"flexsupport/ui/components/input"
"flexsupport/ui/components/popover"
"fmt"
"strconv"
)
@@ -127,7 +127,7 @@ func SelectBox(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(wrapperID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 91, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 91, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -140,7 +140,7 @@ func SelectBox(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -238,7 +238,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 154, Col: 18}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 154, Col: 18}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -257,7 +257,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.Form)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 157, Col: 18}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 157, Col: 18}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -389,7 +389,7 @@ func Value(props ...ValueProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 179, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 179, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -407,7 +407,7 @@ func Value(props ...ValueProps) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var11).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -425,7 +425,7 @@ func Value(props ...ValueProps) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(p.Placeholder)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 183, Col: 49}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 183, Col: 49}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -448,7 +448,7 @@ func Value(props ...ValueProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.Placeholder)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 188, Col: 18}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 188, Col: 18}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -620,7 +620,7 @@ func Group(props ...GroupProps) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 255, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 255, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -638,7 +638,7 @@ func Group(props ...GroupProps) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var19).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -710,7 +710,7 @@ func Label(props ...LabelProps) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 272, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 272, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -728,7 +728,7 @@ func Label(props ...LabelProps) templ.Component {
var templ_7745c5c3_Var25 string
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var23).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
if templ_7745c5c3_Err != nil {
@@ -808,7 +808,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 288, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 288, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
if templ_7745c5c3_Err != nil {
@@ -826,7 +826,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var29 string
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var27).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
if templ_7745c5c3_Err != nil {
@@ -839,7 +839,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var30 string
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(p.Value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 301, Col: 36}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 301, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
if templ_7745c5c3_Err != nil {
@@ -852,7 +852,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatBool(p.Selected))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 302, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 302, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
if templ_7745c5c3_Err != nil {
@@ -865,7 +865,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatBool(p.Disabled))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 303, Col: 62}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 303, Col: 62}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
if templ_7745c5c3_Err != nil {
@@ -907,7 +907,7 @@ func Item(props ...ItemProps) templ.Component {
var templ_7745c5c3_Var34 string
templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var33).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
if templ_7745c5c3_Err != nil {
@@ -957,7 +957,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var36 string
templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 324, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 324, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
if templ_7745c5c3_Err != nil {
@@ -970,7 +970,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var37 string
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/selectbox.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/selectbox/selectbox.templ`, Line: 324, Col: 105}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/selectbox/selectbox.templ`, Line: 324, Col: 105}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
if templ_7745c5c3_Err != nil {

View File

@@ -81,7 +81,7 @@ func Separator(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/separator/separator.templ`, Line: 39, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/separator/separator.templ`, Line: 39, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -99,7 +99,7 @@ func Separator(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/separator/separator.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/separator/separator.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -133,7 +133,7 @@ func Separator(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var5).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/separator/separator.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/separator/separator.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -169,7 +169,7 @@ func Separator(props ...Props) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/separator/separator.templ`, Line: 64, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/separator/separator.templ`, Line: 64, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -187,7 +187,7 @@ func Separator(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var7).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/separator/separator.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/separator/separator.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -221,7 +221,7 @@ func Separator(props ...Props) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var10).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/separator/separator.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/separator/separator.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {

View File

@@ -5,7 +5,7 @@ package sheet
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/dialog"
"flexsupport/ui/components/dialog"
)
type contextKey string

View File

@@ -15,7 +15,7 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"context"
"flexsupport/internal/utils"
"flexsupport/views/components/dialog"
"flexsupport/ui/components/dialog"
)
type contextKey string

View File

@@ -66,7 +66,7 @@ func Skeleton(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/skeleton/skeleton.templ`, Line: 20, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/skeleton/skeleton.templ`, Line: 20, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -84,7 +84,7 @@ func Skeleton(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/skeleton/skeleton.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/skeleton/skeleton.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {

View File

@@ -109,7 +109,7 @@ func Table(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 64, Col: 13}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 64, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -127,7 +127,7 @@ func Table(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -199,7 +199,7 @@ func Header(props ...HeaderProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 81, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 81, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -217,7 +217,7 @@ func Header(props ...HeaderProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var6).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -289,7 +289,7 @@ func Body(props ...BodyProps) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 97, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 97, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -307,7 +307,7 @@ func Body(props ...BodyProps) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var10).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -379,7 +379,7 @@ func Footer(props ...FooterProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 113, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 113, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -397,7 +397,7 @@ func Footer(props ...FooterProps) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var14).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -474,7 +474,7 @@ func Row(props ...RowProps) templ.Component {
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 129, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 129, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
if templ_7745c5c3_Err != nil {
@@ -492,7 +492,7 @@ func Row(props ...RowProps) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var18).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -575,7 +575,7 @@ func Head(props ...HeadProps) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 154, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 154, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -593,7 +593,7 @@ func Head(props ...HeadProps) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var22).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -670,7 +670,7 @@ func Cell(props ...CellProps) templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 176, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 176, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {
@@ -688,7 +688,7 @@ func Cell(props ...CellProps) templ.Component {
var templ_7745c5c3_Var28 string
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var26).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
if templ_7745c5c3_Err != nil {
@@ -760,7 +760,7 @@ func Caption(props ...CaptionProps) templ.Component {
var templ_7745c5c3_Var31 string
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 198, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 198, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
if templ_7745c5c3_Err != nil {
@@ -778,7 +778,7 @@ func Caption(props ...CaptionProps) templ.Component {
var templ_7745c5c3_Var32 string
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var30).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/table/table.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/table/table.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
if templ_7745c5c3_Err != nil {

View File

@@ -93,7 +93,7 @@ func Tabs(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 51, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 51, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -111,7 +111,7 @@ func Tabs(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -124,7 +124,7 @@ func Tabs(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(tabsID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 55, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 55, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -202,7 +202,7 @@ func List(props ...ListProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 71, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 71, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -220,7 +220,7 @@ func List(props ...ListProps) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var7).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -233,7 +233,7 @@ func List(props ...ListProps) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(tabsID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 80, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 80, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -319,7 +319,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 101, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 101, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -337,7 +337,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var12).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
@@ -350,7 +350,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(tabsID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 111, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 111, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
@@ -363,7 +363,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(p.Value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 112, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 112, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -376,7 +376,7 @@ func Trigger(props ...TriggerProps) templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(utils.IfElse(p.IsActive, "active", "inactive"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 113, Col: 70}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 113, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
@@ -463,7 +463,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var20 string
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 135, Col: 12}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 135, Col: 12}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
if templ_7745c5c3_Err != nil {
@@ -481,7 +481,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var21 string
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var19).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
if templ_7745c5c3_Err != nil {
@@ -494,7 +494,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var22 string
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(tabsID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 145, Col: 27}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 145, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
if templ_7745c5c3_Err != nil {
@@ -507,7 +507,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var23 string
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(p.Value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 146, Col: 31}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 146, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
if templ_7745c5c3_Err != nil {
@@ -520,7 +520,7 @@ func Content(props ...ContentProps) templ.Component {
var templ_7745c5c3_Var24 string
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(utils.IfElse(p.IsActive, "active", "inactive"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 147, Col: 70}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 147, Col: 70}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
if templ_7745c5c3_Err != nil {
@@ -585,7 +585,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var26 string
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 162, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 162, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
if templ_7745c5c3_Err != nil {
@@ -598,7 +598,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var27 string
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/tabs.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/tabs/tabs.templ`, Line: 162, Col: 100}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/tabs/tabs.templ`, Line: 162, Col: 100}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
if templ_7745c5c3_Err != nil {

View File

@@ -93,7 +93,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 34, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 34, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -111,7 +111,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 37, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 37, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -130,7 +130,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.Form)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 40, Col: 16}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 40, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -149,7 +149,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.Placeholder)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 43, Col: 30}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 43, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -168,7 +168,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(p.Rows))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 46, Col: 30}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 46, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -210,7 +210,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -231,7 +231,7 @@ func Textarea(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(p.Value)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 80, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 80, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -273,7 +273,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 84, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 84, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -286,7 +286,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/textarea.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/textarea/textarea.templ`, Line: 84, Col: 104}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/textarea/textarea.templ`, Line: 84, Col: 104}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {

View File

@@ -4,8 +4,8 @@ package toast
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
"strconv"
)

View File

@@ -14,8 +14,8 @@ import templruntime "github.com/a-h/templ/runtime"
import (
"flexsupport/internal/utils"
"flexsupport/views/components/button"
"flexsupport/views/components/icon"
"flexsupport/ui/components/button"
"flexsupport/ui/components/icon"
"strconv"
)
@@ -118,7 +118,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 65, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 65, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -131,7 +131,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(p.Duration))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 67, Col: 52}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 67, Col: 52}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -144,7 +144,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.Position))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 68, Col: 36}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 68, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -157,7 +157,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.Variant))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 69, Col: 34}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 69, Col: 34}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -170,7 +170,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -213,7 +213,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var8).String())
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 1, Col: 0}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 1, Col: 0}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
@@ -226,7 +226,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(string(p.Variant))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 103, Col: 38}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 103, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -239,7 +239,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(p.Duration))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 104, Col: 46}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 104, Col: 46}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
@@ -286,7 +286,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 124, Col: 56}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 124, Col: 56}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -305,7 +305,7 @@ func Toast(props ...Props) templ.Component {
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(p.Description)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 127, Col: 55}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 127, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
@@ -391,7 +391,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 152, Col: 42}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 152, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
@@ -404,7 +404,7 @@ func Script() templ.Component {
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("/assets/js/toast.min.js?v=" + utils.ScriptVersion)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/components/toast/toast.templ`, Line: 152, Col: 101}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/components/toast/toast.templ`, Line: 152, Col: 101}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {

View File

@@ -36,7 +36,7 @@ func Navbar(userName string) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(userName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/modules/navbar.templ`, Line: 27, Col: 51}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/modules/navbar.templ`, Line: 27, Col: 51}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {

View File

@@ -1,39 +0,0 @@
package layouts
import (
// "flexsupport/views/components/calendar"
// "flexsupport/views/components/collapsible"
// "flexsupport/views/components/copybutton"
// "flexsupport/views/components/datepicker"
// "flexsupport/views/components/dialog"
// "flexsupport/views/components/dropdown"
// "flexsupport/views/components/input"
// "flexsupport/views/components/label"
// "flexsupport/views/components/popover"
// "flexsupport/views/components/selectbox"
// "flexsupport/views/components/textarea"
// "flexsupport/views/components/toast"
"flexsupport/internal/middleware"
"flexsupport/views/modules"
)
templ BaseLayout(contents templ.Component) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/assets/css/output.min.css" nonce={ middleware.GetTwNonce(ctx) }/>
<script nonce={ middleware.GetHtmxNonce(ctx) } src="/assets/js/htmx.min.js"></script>
<script nonce={ middleware.GetResponseTargetsNonce(ctx) } src="/assets/js/response-targets.js"></script>
<script nonce={ middleware.GetAlpineNonce(ctx) } defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
<title>Flex Support</title>
</head>
<body class="h-full" hx-ext="response-targets">
@modules.Navbar("dickhead")
<main class="container">
@contents
</main>
</body>
</html>
}

View File

@@ -1,125 +0,0 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.960
package layouts
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import (
// "flexsupport/views/components/calendar"
// "flexsupport/views/components/collapsible"
// "flexsupport/views/components/copybutton"
// "flexsupport/views/components/datepicker"
// "flexsupport/views/components/dialog"
// "flexsupport/views/components/dropdown"
// "flexsupport/views/components/input"
// "flexsupport/views/components/label"
// "flexsupport/views/components/popover"
// "flexsupport/views/components/selectbox"
// "flexsupport/views/components/textarea"
// "flexsupport/views/components/toast"
"flexsupport/internal/middleware"
"flexsupport/views/modules"
)
func BaseLayout(contents templ.Component) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><link rel=\"stylesheet\" href=\"/assets/css/output.min.css\" nonce=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(middleware.GetTwNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/layouts/base.templ`, Line: 26, Col: 94}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\"><script nonce=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(middleware.GetHtmxNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/layouts/base.templ`, Line: 27, Col: 47}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" src=\"/assets/js/htmx.min.js\"></script><script nonce=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(middleware.GetResponseTargetsNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/layouts/base.templ`, Line: 28, Col: 58}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" src=\"/assets/js/response-targets.js\"></script><script nonce=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(middleware.GetAlpineNonce(ctx))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/layouts/base.templ`, Line: 29, Col: 49}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" defer src=\"https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js\"></script><title>Flex Support</title></head><body class=\"h-full\" hx-ext=\"response-targets\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = modules.Navbar("dickhead").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<main class=\"container\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = contents.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</main></body></html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var _ = templruntime.GeneratedTemplate

View File

@@ -1,374 +0,0 @@
package pages
import (
"flexsupport/internal/models"
"flexsupport/views/components/card"
"flexsupport/internal/utils"
"fmt"
)
templ TicketPage(ticket models.Ticket) {
<div class="px-4 py-6 sm:px-0">
<!-- Page Header -->
<div class="mb-6 flex justify-between items-start">
<div>
<div class="flex items-center gap-3">
<h2 class="text-2xl font-bold text-gray-900">Ticket { ticket.ExternalTag }</h2>
<span
class={
utils.TwMerge(
"px-3 py-1 inline-flex text-sm leading-5 font-semibold rounded-full",
ticket.StatusClass(),
),
}
>
{ ticket.StatusDisplay() }
</span>
</div>
<p class="mt-1 text-sm text-gray-600">{ ticket.ItemType } - { ticket.ItemBrand } { ticket.ItemModel }</p>
</div>
<a href="/" class="text-sm text-gray-600 hover:text-gray-900">← Back to queue</a>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Main Content -->
<div class="lg:col-span-2 space-y-6">
<!-- Quick Status Update -->
@card.Card() {
@card.Content() {
<h3 class="text-lg font-medium text-gray-900 mb-4">Quick Actions</h3>
{{ statusUrl := fmt.Sprintf("/tickets/%d/status", ticket.ID) }}
<div class="flex flex-wrap gap-2">
<button
hx-post={ statusUrl }
hx-vals='{"status": "in_progress"}'
hx-target="#status-badge"
hx-swap="outerHTML"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
>
<svg class="h-4 w-4 mr-1.5 text-yellow-500" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"></path>
</svg>
Start Work
</button>
<button
hx-post={ statusUrl }
hx-vals='{"status": "waiting_parts"}'
hx-target="#status-badge"
hx-swap="outerHTML"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
>
<svg class="h-4 w-4 mr-1.5 text-orange-500" fill="currentColor" viewBox="0 0 20 20">
<path d="M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"></path>
</svg>
Waiting for Parts
</button>
<button
hx-post={ statusUrl }
hx-vals='{"status": "ready"}'
hx-target="#status-badge"
hx-swap="outerHTML"
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
>
<svg class="h-4 w-4 mr-1.5 text-blue-500" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
</svg>
Ready for Pickup
</button>
<button
hx-post={ statusUrl }
hx-vals='{"status": "completed"}'
hx-target="#status-badge"
hx-swap="outerHTML"
hx-confirm="Are you sure you want to mark this ticket as completed?"
class="inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
>
<svg class="h-4 w-4 mr-1.5" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
Mark Completed
</button>
</div>
}
}
<!-- Issue Details -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-lg font-medium text-gray-900 mb-4">Issue Description</h3>
<p class="text-gray-700 whitespace-pre-line">{ ticket.IssueDescription }</p>
}
}
<!-- Parts & Materials -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-medium text-gray-900">Parts & Materials</h3>
<button
@click="$refs.addPartForm.classList.toggle('hidden')"
class="text-sm text-blue-600 hover:text-blue-900"
>
+ Add Part
</button>
</div>
<!-- Add Part Form (hidden by default) -->
{{ partsLink := fmt.Sprintf("/tickets/%d/parts", ticket.ID) }}
<div x-ref="addPartForm" class="hidden mb-4 p-4 bg-gray-50 rounded-md">
<form
hx-post={ partsLink }
hx-target="#parts-list"
hx-swap="beforeend"
hx-on::after-request="$refs.addPartForm.classList.add('hidden'); this.reset()"
>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-4">
<div class="sm:col-span-2">
<input
type="text"
name="part_name"
placeholder="Part name"
required
class="block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
/>
</div>
<div>
<input
type="number"
name="quantity"
placeholder="Qty"
min="1"
value="1"
required
class="block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
/>
</div>
<div>
<div class="relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500 sm:text-sm">$</span>
</div>
<input
type="number"
name="cost"
placeholder="Cost"
step="0.01"
min="0"
required
class="block w-full pl-7 pr-2 sm:text-sm border-gray-300 rounded-md"
/>
</div>
</div>
</div>
<div class="mt-2 flex justify-end gap-2">
<button
type="button"
@click="$refs.addPartForm.classList.add('hidden')"
class="text-sm text-gray-600 hover:text-gray-900"
>
Cancel
</button>
<button
type="submit"
class="inline-flex items-center px-3 py-1.5 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700"
>
Add Part
</button>
</div>
</form>
</div>
<!-- Parts List -->
<div id="parts-list" class="space-y-2">
if len(ticket.Parts) > 0 {
for _, part := range ticket.Parts {
<div class="flex items-center justify-between p-3 bg-gray-50 rounded-md">
<div class="flex-1">
<span class="text-sm font-medium text-gray-900">{ part.Name }</span>
<span class="text-sm text-gray-500 ml-2">× { part.Quantity }</span>
</div>
<div class="flex items-center gap-3">
<span class="text-sm font-medium text-gray-900">${ part.Cost }</span>
<button
hx-delete="/tickets/{{$.Ticket.ID}}/parts/{{.ID}}"
hx-target="closest div"
hx-swap="outerHTML swap:1s"
class="text-red-600 hover:text-red-900"
>
<svg class="h-4 w-4" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd"></path>
</svg>
</button>
</div>
</div>
}
} else {
<p class="text-sm text-gray-500 text-center py-4">No parts added yet</p>
}
</div>
if len(ticket.Parts) > 0 {
<div class="mt-4 pt-4 border-t border-gray-200">
<div class="flex justify-between text-sm">
<span class="font-medium text-gray-900">Total Parts Cost:</span>
<span class="font-bold text-gray-900">${ ticket.TotalPartsCost }</span>
</div>
</div>
}
}
}
<!-- Work Log / Notes -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-lg font-medium text-gray-900 mb-4">Work Log</h3>
{{ notesLink := fmt.Sprintf("/tickets/%d/notes", ticket.ID) }}
<!-- Add Note Form -->
<form
hx-post={ notesLink }
hx-target="#notes-list"
hx-swap="afterbegin"
hx-on::after-request="this.reset()"
class="mb-4"
>
<textarea
name="note"
rows="3"
placeholder="Add a work note..."
required
class="block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
></textarea>
<div class="mt-2 flex justify-end">
<button
type="submit"
class="inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700"
>
Add Note
</button>
</div>
</form>
<!-- Notes List -->
<div id="notes-list" class="space-y-3">
if len(ticket.Notes) > 0 {
for _, note := range ticket.Notes {
<div class="p-3 bg-gray-50 rounded-md">
<div class="flex justify-between items-start mb-1">
<span class="text-sm font-medium text-gray-900">{ note.Author }</span>
<span class="text-xs text-gray-500">{ note.Timestamp.String() }</span>
</div>
<p class="text-sm text-gray-700 whitespace-pre-line">{ note.Content }</p>
</div>
}
} else {
<p class="text-sm text-gray-500 text-center py-4">No work notes yet</p>
}
</div>
}
}
</div>
<!-- Sidebar -->
<div class="lg:col-span-1 space-y-6">
<!-- Customer Info -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-sm font-medium text-gray-900 mb-3">Customer Information</h3>
<dl class="space-y-3">
<div>
<dt class="text-xs text-gray-500">Name</dt>
<dd class="text-sm font-medium text-gray-900">{ ticket.CustomerName }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Phone</dt>
<dd class="text-sm text-gray-900">
{{ telLink := fmt.Sprintf("tel:%s", ticket.CustomerPhone) }}
<a href={ telLink } class="text-blue-600 hover:text-blue-900">
{ ticket.CustomerPhone }
</a>
</dd>
</div>
if ticket.CustomerEmail != "" {
<div>
<dt class="text-xs text-gray-500">Email</dt>
<dd class="text-sm text-gray-900">
{{ emailLink := fmt.Sprintf("mailto:%s", ticket.CustomerEmail) }}
<a href={ emailLink } class="text-blue-600 hover:text-blue-900">
{ ticket.CustomerEmail }
</a>
</dd>
</div>
}
</dl>
}
}
<!-- Device Details -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-sm font-medium text-gray-900 mb-3">Device Details</h3>
<dl class="space-y-3">
<div>
<dt class="text-xs text-gray-500">Type</dt>
<dd class="text-sm text-gray-900">{ ticket.ItemType }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Brand/Model</dt>
<dd class="text-sm text-gray-900">{ ticket.ItemBrand } { ticket.ItemModel }</dd>
</div>
</dl>
}
}
<!-- Ticket Metadata -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
<h3 class="text-sm font-medium text-gray-900 mb-3">Ticket Details</h3>
<dl class="space-y-3">
<div>
<dt class="text-xs text-gray-500">Priority</dt>
<dd class="text-sm text-gray-900 capitalize">{ ticket.Priority }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Created</dt>
<dd class="text-sm text-gray-900">{ ticket.CreatedAt.String() }</dd>
</div>
if ticket.DueDate != nil {
<div>
<dt class="text-xs text-gray-500">Due Date</dt>
{{
overDueClass := ""
if ticket.IsOverdue() {
overDueClass = "text-red-600 font-semibold"
}
}}
<dd
class={ utils.TwMerge(
"text-sm text-gray-900",
overDueClass,
) }
>
{ ticket.DueDate.String() }
</dd>
</div>
}
<div>
<dt class="text-xs text-gray-500">Estimated Cost</dt>
{{ estimatedCost := fmt.Sprintf("$%.2f", ticket.EstimatedCost) }}
<dd class="text-sm text-gray-900">${ estimatedCost }</dd>
</div>
<div>
<dt class="text-xs text-gray-500">Total Cost</dt>
{{ totalCost := fmt.Sprintf("$%.2f", ticket.TotalCost) }}
<dd class="text-lg font-bold text-gray-900">${ totalCost }</dd>
</div>
</dl>
}
}
<!-- Actions -->
@card.Card() {
@card.Content(card.ContentProps{Class: "px-4 py-5 sm:p-6"}) {
{{ ticketEditLink := fmt.Sprintf("/tickets/%d/edit", ticket.ID) }}
<a
href={ ticketEditLink }
class="w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
>
Edit Ticket
</a>
}
}
</div>
</div>
</div>
}