feat: add dashboard overview stats endpoint and UI integration

- Implemented `GET /dashboard/stats` in `DashboardController` to provide aggregate counts for stock, GRN, and procurement.
- Created `DashboardStatsDto` and `WarehouseValuationDto` to structure the response data.
- Developed `DashboardService` to fetch and compute necessary statistics from the database.
- Added `IDashboardService` interface for service abstraction.
- Introduced API client methods in `dashboard.ts` for frontend consumption of the new endpoint.
- Defined TypeScript types for dashboard data in `dashboard.ts` to ensure type safety in the frontend.
- Updated UI components in the frontend to reflect changes in the dashboard, including styling adjustments and removal of unused icons.
This commit is contained in:
2026-07-28 14:59:09 +05:30
parent 0b95d6f1cd
commit b12adebaa0
16 changed files with 496 additions and 344 deletions
+9
View File
@@ -0,0 +1,9 @@
// Dashboard overview endpoint (Backend/ERPCore/Controllers/DashboardController.cs).
import { apiRequest } from "@/lib/api-client"
import { DashboardStats } from "@/types/dashboard"
export const dashboardApi = {
stats(): Promise<DashboardStats> {
return apiRequest<DashboardStats>("/dashboard/stats")
},
}