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:
@@ -76,7 +76,7 @@ export const createUserSchema = z.object({
|
||||
emailPassword: z.string().min(1).optional(),
|
||||
firstName: z.string().max(100).optional(),
|
||||
lastName: z.string().max(100).optional(),
|
||||
role: z.enum(['admin', 'member']).optional(),
|
||||
role: z.enum(['admin', 'team_leader', 'member']).optional(),
|
||||
});
|
||||
|
||||
// Update user schema
|
||||
@@ -89,7 +89,7 @@ export const updateUserSchema = z.object({
|
||||
// Change role schema (admin only)
|
||||
export const changeRoleSchema = z.object({
|
||||
userId: z.string().uuid('Neplatný formát user ID'),
|
||||
role: z.enum(['admin', 'member'], {
|
||||
role: z.enum(['admin', 'team_leader', 'member'], {
|
||||
required_error: 'Rola je povinná',
|
||||
invalid_type_error: 'Neplatná rola',
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user