Proje: Okul B2B App · Hub: Okul B2B App — Domain
StatsService Detayları
services/StatsService.ts — Dashboard istatistik servisi.
Endpoint
GET /customer/statistics?school_id={id}
veya
GET /customer/statistics?school_ids[]={id1}&school_ids[]={id2}
Cache
StatsService.cache: Map<string, { data, timestamp }> — 5 dakika TTL.
Cache key: customer_stats_{schoolId}_{companyId}
Lead Sayısı Doğruluğu
İstatistik API’sinin lead count’u ve LeadsService.getLeads() totalCount’u farklı olabilir.
Tek okul için: LeadsService.getLeads(1, 1, schoolId).totalCount kullanılır (daha doğru).
Birden fazla okul için (aggregate): API değeri kullanılır.
Sayı Formatlama
value.toLocaleString('tr-TR') — Türkçe sayı formatı: 1.234.567
Related
- dashboard-istatistikler — dashboard kullanımı
- istatistik-ve-bildirim-tipleri — CustomerStatistics API response