• Mahmoud Aglan's avatar
    feat(dashboard): role-aware dashboards + super-admin command center · f46e7a77
    Mahmoud Aglan authored
    Every user previously saw the same dashboard: DashboardDataService::getData()
    returned one fixed payload with no reference to the current employee. A cashier
    got membership stats they could not act on; an HR manager got revenue instead of
    headcount.
    
    Each role now gets a curated dashboard. Role presets pick the layout, permissions
    gate every widget (mirroring MenuRegistry::getVisible), and multi-role users get
    the deduped union of their presets. Super admin gets a 5-KPI, 16-widget command
    center across six sections.
    
    Wires up WidgetRegistry, which existed fully written but was used by nothing.
    
    144 widgets, all SQL executed and verified against the live schema — 46 were
    corrected during verification, including a month-to-date figure compared against
    a full prior month (a fake collapse every month), spouse counts missing their
    status filter, and receivables that included debt owed by archived deceased
    members.
    
    Only the headline plus first six widgets query on load; the rest hydrate through
    GET /dashboard/widget/{key}, which re-checks permission server-side and renders
    via the same partial as the eager path. Employees with no mapped role fall back
    to the previous shared dashboard, preserved verbatim.
    
    Also loads Chart.js, which PlayerAffairs has always called behind a
    `typeof Chart !== 'undefined'` guard while the library was loaded nowhere —
    those evaluation charts were silently dead and now render.
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    f46e7a77
Name
Last commit
Last update
..
Academies Loading commit data...
AcademyContracts Loading commit data...
AccessMatrix Loading commit data...
Accounting Loading commit data...
Achievements Loading commit data...
ActivitySubscriptions Loading commit data...
Alerts Loading commit data...
Archive Loading commit data...
Audit Loading commit data...
Auth Loading commit data...
Branches Loading commit data...
Carnets Loading commit data...
Cashier Loading commit data...
Children Loading commit data...
Coaches Loading commit data...
Dashboard Loading commit data...
Death Loading commit data...
Disciplines Loading commit data...
Divorce Loading commit data...
Documents Loading commit data...
Facilities Loading commit data...
FacilityDashboards Loading commit data...
FacilityGrids Loading commit data...
Fines Loading commit data...
Foreign Loading commit data...
Forms Loading commit data...
HR Loading commit data...
Honorary Loading commit data...
Installments Loading commit data...
Interviews Loading commit data...
Inventory Loading commit data...
MatchCenter Loading commit data...
MedicalBoard Loading commit data...
Members Loading commit data...
News Loading commit data...
Notifications Loading commit data...
ParentPortal Loading commit data...
Payments Loading commit data...
PlayerAffairs Loading commit data...
PlayerApi Loading commit data...
PlayerAuth Loading commit data...
PlaygroundAdmin Loading commit data...
PoolManagement Loading commit data...
Pricing Loading commit data...
Procurement Loading commit data...
Receipts Loading commit data...
Rentals Loading commit data...
Reports Loading commit data...
Reservations Loading commit data...
Roles Loading commit data...
Rules Loading commit data...
Sales Loading commit data...
Scheduling Loading commit data...
Seasonal Loading commit data...
ServiceCatalog Loading commit data...
Sessions Loading commit data...
Settings Loading commit data...
Sports Loading commit data...
SportsActivity Loading commit data...
SportsDashboard Loading commit data...
Spouses Loading commit data...
Subscriptions Loading commit data...
Support Loading commit data...
Temporary Loading commit data...
Tournaments Loading commit data...
TrainerPortal Loading commit data...
Training Loading commit data...
TrainingGroups Loading commit data...
Transfers Loading commit data...
Treasury Loading commit data...
Tutorials Loading commit data...
Users Loading commit data...
Waiver Loading commit data...
Workflow Loading commit data...