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:
@@ -1,7 +1,7 @@
|
||||
import express from 'express';
|
||||
import * as timeTrackingController from '../controllers/time-tracking.controller.js';
|
||||
import { authenticate } from '../middlewares/auth/authMiddleware.js';
|
||||
import { requireAdmin } from '../middlewares/auth/roleMiddleware.js';
|
||||
import { requireTeamLeaderOrAdmin } from '../middlewares/auth/roleMiddleware.js';
|
||||
import { validateBody, validateParams } from '../middlewares/security/validateInput.js';
|
||||
import {
|
||||
startTimeEntrySchema,
|
||||
@@ -47,8 +47,8 @@ router.post(
|
||||
// Get running time entry
|
||||
router.get('/running', timeTrackingController.getRunningTimeEntry);
|
||||
|
||||
// Get all running time entries (for dashboard) - admin only
|
||||
router.get('/running-all', requireAdmin, timeTrackingController.getAllRunningTimeEntries);
|
||||
// Get all running time entries (for dashboard) - admin/team_leader
|
||||
router.get('/running-all', requireTeamLeaderOrAdmin, timeTrackingController.getAllRunningTimeEntries);
|
||||
|
||||
// Get all time entries with filters
|
||||
router.get('/', timeTrackingController.getAllTimeEntries);
|
||||
|
||||
Reference in New Issue
Block a user