fix(audit): resolve all remaining technical debt issues
CognxSafeTrack
a888244
C2 - analytics SQL injection: UNION detection, ALLOWED_TABLES allowlist,
remove SQL from error responses to prevent schema leakage
H1/H2 - override-feedback: move organizationId validation to top of handler
before any DB mutation; scope enrollment.findFirst to org
H6 - UserListPage: add pagination controls (Précédent/Suivant, 20 per page)
L4 - TrackDaysPage: await load() before closing editor to prevent stale data race
L5 - admin.ts: replace getOrganizationId() with req.organizationId at 3 call sites,
remove now-unused import
M1 - EntityResolver: replace any[] types with proper Prisma payload types
(ResolvedUser/Contact/Organization/Enrollment with exact include shapes)
L8 - AI command fuzzy org match: return pending_confirmation when org found
by partial name match, inject orgId for unambiguous confirmation retry
chore: CRM stabilization sprint completion
CognxSafeTrack
4339e77
- Refactor: Decomposed CrmConversationalDashboard into modular components (Inbox, AIAssistant, StatsHeader)
- Fix: Centralized entity resolution with EntityResolver service (API & Worker)
- Fix: Strict Prisma typing, removed 'as any' casts in organization and whatsapp routes
- Fix: Implemented broadcast message persistence and accurate usage quota tracking
- Schema: Added MessageStatus and status field to Message model