Overview
The dashboard models provide aggregated statistics and recent activity data for the admin dashboard view. These models consolidate information from multiple sources to present a comprehensive overview of the system.DashboardStats
Aggregated statistics from all tenants in the system.Fields
Total number of clients (tenants) in the system
Number of clients with isActive=true
Total number of greenhouses across all clients
Number of greenhouses with isActive=true
Total number of devices (sensors + actuators)
Number of sensor devices (categoryId=1)
Number of actuator devices (categoryId=2)
Number of unresolved alerts
Number of critical severity alerts
Total number of users across all tenants
StatCard
Represents a single statistic card displayed on the dashboard.Fields
Unique identifier for the stat card
Title of the stat (e.g., “Clients”, “Greenhouses”)
Main value to display (e.g., “24”, “12 active”)
Subtitle or additional context
Color variant for the subtitle (DEFAULT, SUCCESS, WARNING)
Icon to display on the card (PEOPLE, GREENHOUSE, DEVICES, ALERT, USERS)
MenuItem
Represents a menu item in the sidebar navigation.Fields
Unique identifier for the menu item
Display text for the menu item
Icon for the menu item (DASHBOARD, CLIENTS, SETTINGS)
Navigation route for the menu item
RecentAlert
Represents a recent alert for dashboard display.Computed Properties
Returns the message if available, otherwise description, or empty string
RecentClient
Represents a recent client for dashboard display.DeviceBreakdown
Breakdown of devices by category.Computed Properties
Total number of devices (sensors + actuators)
Enums
StatCardSubtitleColor
Color variants for stat card subtitles:DEFAULT- Primary green for positive changesSUCCESS- Green for good status indicatorsWARNING- Orange/Yellow for alerts requiring attention
StatCardIcon
Icons available for stat cards:PEOPLE- For client/tenant countsGREENHOUSE- For greenhouse countsDEVICES- For device countsALERT- For alert countsUSERS- For user counts
MenuIcon
Icons available for menu items:DASHBOARD- Dashboard viewCLIENTS- Client managementSETTINGS- Settings and configuration
Related Documentation
DashboardRepository
Repository for fetching dashboard data
DashboardViewModel
Dashboard screen state management
Dashboard Feature
User guide for dashboard features
Alert Models
Full alert data models