dashboard

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnboardingProgress

type OnboardingProgress struct {
	HasCompany    bool // step 1 — always true in company context
	HasBranch     bool // step 2
	HasStation    bool // step 3
	HasTeamMember bool // step 4 — ≥1 non-owner user belonging to this company
	HasProduct    bool // step 5
}

OnboardingProgress tracks which of the 5 onboarding steps are complete. All fields are derived from existing data — no new DB table required.

func (OnboardingProgress) CompletedCount

func (p OnboardingProgress) CompletedCount() int

CompletedCount returns how many of the 5 steps are done.

func (OnboardingProgress) IsComplete

func (p OnboardingProgress) IsComplete() bool

IsComplete reports whether all 5 steps are done.

type PageData

type PageData struct {
	TodayRevenue  int64
	TodayOrders   int64
	AvgOrderValue int64
	LowStockCount int
	LowStockItems []model.InventoryLine
	RecentOrders  []model.Order
	Onboarding    OnboardingProgress
}

PageData holds all data needed to render the dashboard view.

Jump to

Keyboard shortcuts

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