Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- Constants
- Variables
- func ActiveSessions(props ActiveSessionsProps) templ.Component
- func Checkout(data layout.AppLayoutData, session model.POSSession, order model.Order, ...) templ.Component
- func Order(props OrderProps) templ.Component
- func Start(data layout.AppLayoutData, stations []model.POSStation, errMsg string) templ.Component
- type ActiveSessionsProps
- type OrderProps
- type PaginationProps
Constants ¶
const DefaultPageSize = 100
DefaultPageSize is bigger than other lists' default (100 vs 20) since the product grid is a fast-picking screen where cashiers want more on screen.
const DefaultSessionPageSize = 20
DefaultSessionPageSize is used when no valid per_page query param is supplied.
Variables ¶
var PageSizes = []int{20, 50, 100}
PageSizes are the selectable "items per page" options for the POS product grid.
var SessionPageSizes = []int{20, 50, 100}
SessionPageSizes are the selectable "items per page" options for the active sessions list. Named distinctly from order.templ's PageSizes (same package, different list with a different default).
Functions ¶
func ActiveSessions ¶
func ActiveSessions(props ActiveSessionsProps) templ.Component
func Order ¶
func Order(props OrderProps) templ.Component
func Start ¶
func Start(data layout.AppLayoutData, stations []model.POSStation, errMsg string) templ.Component
Types ¶
type ActiveSessionsProps ¶
type ActiveSessionsProps struct {
Data layout.AppLayoutData
Sessions []model.POSSession
Page int
PerPage int
TotalItems int
BranchID uuid.UUID
Branches []model.Branch
BranchNames map[uuid.UUID]string
StationNames map[uuid.UUID]string
UserNames map[uuid.UUID]string
StopErr string
}
ActiveSessionsProps holds the data needed to render the owner/manager cross-branch active-sessions dashboard.
type OrderProps ¶
type OrderProps struct {
Data layout.AppLayoutData
Session model.POSSession
Order model.Order
Items []model.OrderItem
Products []model.Product
ProductNames map[uuid.UUID]string
Stocks map[uuid.UUID]float64
EmployeeName string
CashInDrawer int64
Discounts []model.Discount
ReceiptNumber string
CloseErr string
ScanError string
DiscountError string
AssignedCustomer *model.Customer
FoundCustomer *model.Customer
CustomerQuery string
CustomerError string
PaginationProps PaginationProps
}
OrderProps holds the data needed to render the POS order screen.