feat(dashboard): add date filter and stat groups components
- Implemented DashboardDateFilter component for selecting date ranges. - Created DashboardStatGroups component to display various dashboard statistics. - Added dashboard chart data processing logic to support new chart specifications. - Introduced reusable Chart components for rendering different types of charts.
This commit is contained in:
@@ -10,6 +10,9 @@ namespace ERPCore.Dtos.Dashboard;
|
||||
/// Recent movements isn't here — it's just GET /stock/ledger with a small pageSize, no
|
||||
/// aggregation needed. A single computed-on-read object, not a stored entity — same as
|
||||
/// reorder alerts (docs/11 §5.7).
|
||||
/// Most counts are a snapshot of what is open right now. The few that describe activity
|
||||
/// (sales returns, bundle sales, bank deposits, employees present) are counted inside the
|
||||
/// optional From-To period the dashboard filter sends (default: today).
|
||||
/// </summary>
|
||||
public sealed record DashboardStatsDto(
|
||||
int LowStockAlerts,
|
||||
@@ -24,7 +27,37 @@ public sealed record DashboardStatsDto(
|
||||
int OpenRfqs,
|
||||
int PendingLeaveRequests,
|
||||
int OverdueSalesInvoices,
|
||||
IReadOnlyList<MonthlyPurchasesVsSalesDto> MonthlyPurchasesVsSales);
|
||||
IReadOnlyList<MonthlyPurchasesVsSalesDto> MonthlyPurchasesVsSales,
|
||||
// Stock & warehouse
|
||||
int BatchesExpiringSoon,
|
||||
int TransfersInTransit,
|
||||
int DraftStockAdjustments,
|
||||
int WastagePendingApproval,
|
||||
// Approvals
|
||||
int PendingApprovals,
|
||||
int PriceAdjustmentsPending,
|
||||
// Sales (SalesReturns and BundleSales are counted inside the From-To period)
|
||||
int DraftSalesInvoices,
|
||||
int DraftSalesSlips,
|
||||
int SalesReturns,
|
||||
int BundleSales,
|
||||
// Purchasing
|
||||
int PurchaseReturnsPending,
|
||||
int UnpaidPurchaseInvoices,
|
||||
// Money
|
||||
decimal CashInHand,
|
||||
decimal BankDeposits,
|
||||
// Service & warranty
|
||||
int OpenSupportTickets,
|
||||
int WarrantiesExpiringSoon,
|
||||
int WarrantyClaimsOpen,
|
||||
// Production
|
||||
int ProductionRunsInProgress,
|
||||
// HR
|
||||
int PayrollRunsPending,
|
||||
int AttendanceBatchesPending,
|
||||
int EmployeesPresent,
|
||||
int TotalActiveEmployees);
|
||||
|
||||
/// <summary>One bar in the Stock Valuation chart — total FIFO layer value for a warehouse.</summary>
|
||||
public sealed record WarehouseValuationDto(int WarehouseId, decimal Total);
|
||||
|
||||
Reference in New Issue
Block a user