feat(dashboard): revenue "year" tile toggles 365 days ↔ calendar YTD
Per request, keep the dashboard to four tiles rather than adding a fifth: the "Revenue · last 365 days" tile is now clickable and toggles in place between the trailing-365-day window and calendar year-to-date (since Jan 1). - adminDashboard: new calendar-year cutoff + revenue.calendarYearMinor (same cash-basis paid_at window logic as the existing trio). - StatCard gains an optional onClick (renders as a button); the year tile uses it, with a "Tap to switch window" hint for discoverability. - bills.service CrmOverviewStats.revenue gains calendarYearMinor.
This commit is contained in:
@@ -386,6 +386,9 @@ export interface CrmOverviewStats {
|
||||
monthMinor: number;
|
||||
quarterMinor: number;
|
||||
yearMinor: number;
|
||||
/** Revenue since Jan 1 of the current year (calendar YTD). The
|
||||
* dashboard's "year" tile toggles between this and yearMinor. */
|
||||
calendarYearMinor: number;
|
||||
};
|
||||
outstanding: {
|
||||
totalMinor: number;
|
||||
|
||||
Reference in New Issue
Block a user