Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- Constants
- Variables
- func Correct(data layout.AppLayoutData, original model.StockMovement, productName string, ...) templ.Component
- func Index(props IndexProps) templ.Component
- func Movements(props MovementsProps) templ.Component
- func Procurement(data layout.AppLayoutData, products []model.Product, ...) templ.Component
- func Waste(data layout.AppLayoutData, products []model.Product, errMsg string) templ.Component
- type IndexProps
- type MovementsProps
Constants ¶
View Source
const DefaultMovementPageSize = 20
DefaultMovementPageSize is used when no valid per_page query param is supplied.
View Source
const DefaultPageSize = 20
DefaultPageSize is used when no valid per_page query param is supplied.
Variables ¶
View Source
var MovementPageSizes = []int{20, 50, 100}
MovementPageSizes are the selectable "items per page" options for the movement history list.
View Source
var PageSizes = []int{20, 50, 100}
PageSizes are the selectable "items per page" options for the inventory list.
Functions ¶
func Correct ¶ added in v0.1.2
func Correct(data layout.AppLayoutData, original model.StockMovement, productName string, suppliers []model.Supplier, errMsg string) templ.Component
func Index ¶
func Index(props IndexProps) templ.Component
func Movements ¶ added in v0.1.2
func Movements(props MovementsProps) templ.Component
func Procurement ¶
Types ¶
type IndexProps ¶
type IndexProps struct {
Data layout.AppLayoutData
Lines []model.InventoryLine
Search string
Page int
PerPage int
TotalItems int
// CountProduct/CountDelta/CountErr drive the post-stock-count toast:
// CountErr non-empty → error toast. Else CountProduct non-empty with
// CountDelta empty → "no discrepancy" toast. Both non-empty → adjustment toast.
CountProduct string
CountDelta string
CountErr string
// StockCountMode toggles the inline "Counted Qty" column and its
// explainer banner on/off — off by default so the plain list stays
// uncluttered; toggled via the "Stock Count" header button.
StockCountMode bool
}
IndexProps holds the data needed to render the inventory list page.
type MovementsProps ¶ added in v0.1.2
type MovementsProps struct {
Data layout.AppLayoutData
Movements []model.StockMovement
ProductNames map[uuid.UUID]string
SupplierNames map[uuid.UUID]string
CanCorrect map[uuid.UUID]bool
Reversed map[uuid.UUID]bool
ErrMsg string
Page int
PerPage int
TotalItems int
}
MovementsProps holds the data needed to render the stock movement history page.
Click to show internal directories.
Click to hide internal directories.