products

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

templ: version: v0.2.793

templ: version: v0.2.793

templ: version: v0.2.793

templ: version: v0.2.793

Index

Constants

This section is empty.

Variables

View Source
var (
	InStock       = string(product.InStock)
	InDevelopment = string(product.InDevelopment)
	Approved      = string(product.Approved)
	Statuses      = []StatusViewModel{
		{
			MessageId: "Products.Single.Statuses.in_stock",
			Value:     InStock,
		},
		{
			MessageId: "Products.Single.Statuses.in_development",
			Value:     InDevelopment,
		},
		{
			MessageId: "Products.Single.Statuses.approved",
			Value:     Approved,
		},
	}
)

Functions

func CreateForm

func CreateForm(props *CreatePageProps) templ.Component

func Edit

func Edit(props *EditPageProps) templ.Component

func EditForm

func EditForm(props *EditPageProps) templ.Component

func Index

func Index(props *IndexPageProps) templ.Component

func New

func New(props *CreatePageProps) templ.Component

func PositionSelect

func PositionSelect(props *PositionSelectProps) templ.Component

func ProductsContent

func ProductsContent(props *IndexPageProps) templ.Component

func ProductsTable

func ProductsTable(props *IndexPageProps) templ.Component

func StatusSelect

func StatusSelect(props *StatusSelectProps) templ.Component

Types

type CreatePageProps

type CreatePageProps struct {
	*types.PageContext
	Product *viewmodels.Product
	SaveURL string
	Errors  map[string]string
}

type EditPageProps

type EditPageProps struct {
	*types.PageContext
	Product *viewmodels.Product
	Errors  map[string]string
}

type IndexPageProps

type IndexPageProps struct {
	*types.PageContext
	Products        []*viewmodels.Product
	PaginationState *pagination.State
}

type PositionSelectProps

type PositionSelectProps struct {
	*types.PageContext
	Value string
	Attrs templ.Attributes
}

type StatusSelectProps

type StatusSelectProps struct {
	*types.PageContext
	Value string
	Attrs templ.Attributes
}

type StatusViewModel

type StatusViewModel struct {
	MessageId string
	Value     string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL