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 timesheetController from '../controllers/timesheet.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 { z } from 'zod';
|
||||
import { createUpload } from '../config/upload.js';
|
||||
@@ -48,7 +48,7 @@ router.get('/my', timesheetController.getMyTimesheets);
|
||||
* Get all timesheets (admin only)
|
||||
* GET /api/timesheets/all
|
||||
*/
|
||||
router.get('/all', requireAdmin, timesheetController.getAllTimesheets);
|
||||
router.get('/all', requireTeamLeaderOrAdmin, timesheetController.getAllTimesheets);
|
||||
|
||||
/**
|
||||
* Download timesheet
|
||||
|
||||
Reference in New Issue
Block a user