feat: Multi-feature CRM update

- Add team_leader role with appropriate permissions
- Add lastSeen timestamp for chat online indicator
- Add needsFollowup flag to ucastnici table
- Add getTodayCalendarCount endpoint for calendar badge
- Add company reminders to calendar data
- Enhance company search to include phone and contacts
- Update routes to allow team_leader access to kurzy, services, timesheets

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2026-01-28 17:23:57 +01:00
parent c3c42ec1e4
commit a4a81ef88e
16 changed files with 246 additions and 36 deletions

View File

@@ -38,3 +38,7 @@ export const requireRole = (...allowedRoles) => {
*/
export const requireAdmin = requireRole('admin');
/**
* Middleware pre admin alebo team_leader rolu
*/
export const requireTeamLeaderOrAdmin = requireRole('admin', 'team_leader');