d0f04f13f8
Phase N.1 — Data Model: - Extend Notification model with category, priority, task fields (status, action, assignee, dueDate, completedAt/By), reminder fields (remindAt, recurrence, nextRemindAt), and targeting metadata (sourceId, senderId, channel) - Add NotificationCategory, NotificationPriority, TaskStatus enums - Add NotificationBroadcast model for group notifications - Shared types with parseTaskAction()/buildTaskAction() helpers Phase N.2 — API: - Extend notification router: listTasks, taskCounts, updateTaskStatus, createReminder/update/delete/list, createBroadcast/listBroadcasts, createTask, assignTask, delete - Broadcast targeting: resolve recipients by user/role/project/orgUnit/all - Task-action registry: approve_vacation, reject_vacation, confirm_assignment - Reminder scheduler: 60s poll interval, recurring support, catch-up on start - SSE events: TASK_ASSIGNED, TASK_COMPLETED, TASK_STATUS_CHANGED, REMINDER_DUE, BROADCAST_SENT Phase N.3 — AI Assistant: - 7 new tools: list_tasks, get_task_detail, update_task_status, execute_task_action, create_reminder, create_task_for_user, send_broadcast - execute_task_action dispatches to task-action registry with per-action permission checks, marks tasks as completed by AI Phase N.4 — Frontend: - Enhanced NotificationBell with task badge, tabs (All/Tasks/Reminders) - TaskCard component with priority badges, due dates, action buttons - ReminderModal for creating/editing personal reminders - BroadcastModal for targeted group notifications (manager+) - NotificationCenter full-page with 5 tabs and bulk actions - TaskWidget dashboard widget showing open tasks - Admin broadcast management page - AppShell nav links for Notifications and Broadcasts - SSE hook handlers for task/reminder events Phase N.5 — Auto-Tasks: - Vacation create → APPROVAL tasks for all managers - Vacation approve/reject → mark approval tasks as DONE - Demand create → TASK for managers to fill staffing needs Co-Authored-By: claude-flow <ruv@ruv.net>
67 lines
1.6 KiB
TypeScript
67 lines
1.6 KiB
TypeScript
export * from "./germanStates.js";
|
|
export * from "./publicHolidays.js";
|
|
export * from "./columns.js";
|
|
export * from "./dispo-import.js";
|
|
|
|
export const BUDGET_WARNING_THRESHOLDS = {
|
|
INFO: 70,
|
|
WARNING: 85,
|
|
CRITICAL: 95,
|
|
} as const;
|
|
|
|
export const DEFAULT_WORKING_HOURS_PER_DAY = 8;
|
|
|
|
export const DEFAULT_AVAILABILITY = {
|
|
monday: 8,
|
|
tuesday: 8,
|
|
wednesday: 8,
|
|
thursday: 8,
|
|
friday: 8,
|
|
} as const;
|
|
|
|
export const VALUE_SCORE_WEIGHTS = {
|
|
SKILL_DEPTH: 0.30,
|
|
SKILL_BREADTH: 0.15,
|
|
COST_EFFICIENCY: 0.25,
|
|
CHARGEABILITY: 0.15,
|
|
EXPERIENCE: 0.15,
|
|
} as const;
|
|
|
|
export const SCORE_WEIGHTS = {
|
|
SKILL: 0.4,
|
|
AVAILABILITY: 0.3,
|
|
COST: 0.2,
|
|
UTILIZATION: 0.1,
|
|
} as const;
|
|
|
|
export const PAGINATION_DEFAULTS = {
|
|
PAGE: 1,
|
|
LIMIT: 50,
|
|
MAX_LIMIT: 500,
|
|
} as const;
|
|
|
|
export const SSE_EVENT_TYPES = {
|
|
ALLOCATION_CREATED: "allocation.created",
|
|
ALLOCATION_UPDATED: "allocation.updated",
|
|
ALLOCATION_DELETED: "allocation.deleted",
|
|
PROJECT_SHIFTED: "project.shifted",
|
|
BUDGET_WARNING: "budget.warning",
|
|
VACATION_CREATED: "vacation.created",
|
|
VACATION_UPDATED: "vacation.updated",
|
|
VACATION_DELETED: "vacation.deleted",
|
|
ROLE_CREATED: "role.created",
|
|
ROLE_UPDATED: "role.updated",
|
|
ROLE_DELETED: "role.deleted",
|
|
NOTIFICATION_CREATED: "notification:created",
|
|
TASK_ASSIGNED: "task.assigned",
|
|
TASK_COMPLETED: "task.completed",
|
|
TASK_STATUS_CHANGED: "task.status_changed",
|
|
REMINDER_DUE: "reminder.due",
|
|
BROADCAST_SENT: "broadcast.sent",
|
|
PING: "ping",
|
|
} as const;
|
|
|
|
export type SseEventType = (typeof SSE_EVENT_TYPES)[keyof typeof SSE_EVENT_TYPES];
|
|
|
|
export const SSE_NOTIFICATION_CREATED = SSE_EVENT_TYPES.NOTIFICATION_CREATED;
|