/** * mock-data.js — Sample data for the Hotline Planner * Mirrors future DB schema. Replace with API calls when backend is ready. */ const SHIFT_TYPES = [ { id: 'morning', label: 'Morning', color: 'morning', allDay: false, category: 'shift' }, { id: 'afternoon', label: 'Afternoon', color: 'afternoon', allDay: false, category: 'shift' }, { id: 'night', label: 'Night', color: 'night', allDay: false, category: 'shift' }, { id: 'allday', label: 'All Day', color: 'allday', allDay: true, category: 'shift' }, { id: 'training', label: 'Training', color: 'training', allDay: false, category: 'activity' }, ]; const EXNET_GROUPS = [ { id: 'molecular-app', label: 'Molecular App', color: 'exnet' }, { id: 'voice-support', label: 'Voice Support', color: 'exnet' }, { id: 'email-queue', label: 'Email Queue', color: 'exnet' }, { id: 'chat-support', label: 'Chat Support', color: 'exnet' }, ]; const DEPARTMENTS = [ 'Voice Team', 'Email Team', 'Molecular', 'Specialist', ]; const SKILLS = [ 'Voice', 'Email', 'Chat', 'Molecular', 'Billing', 'Tech Support', 'Escalation', 'Training', 'QA', ]; const AGENTS = [ { id: 'a1', name: 'Anna Müller', email: 'anna.mueller@company.de', department: 'Voice Team', skills: ['Voice', 'Chat', 'Escalation'] }, { id: 'a2', name: 'Ben Schmidt', email: 'ben.schmidt@company.de', department: 'Email Team', skills: ['Email', 'Billing'] }, { id: 'a3', name: 'Clara Weber', email: 'clara.weber@company.de', department: 'Molecular', skills: ['Molecular', 'Tech Support'] }, { id: 'a4', name: 'David Fischer', email: 'david.fischer@company.de', department: 'Voice Team', skills: ['Voice', 'Training'] }, { id: 'a5', name: 'Elena Braun', email: 'elena.braun@company.de', department: 'Specialist', skills: ['Escalation', 'QA', 'Voice'] }, { id: 'a6', name: 'Felix Wagner', email: 'felix.wagner@company.de', department: 'Email Team', skills: ['Email', 'Chat'] }, { id: 'a7', name: 'Greta Hoffmann', email: 'greta.hoffmann@company.de', department: 'Molecular', skills: ['Molecular', 'Billing', 'QA'] }, { id: 'a8', name: 'Hans Becker', email: 'hans.becker@company.de', department: 'Voice Team', skills: ['Voice', 'Tech Support'] }, { id: 'a9', name: 'Irene Koch', email: 'irene.koch@company.de', department: 'Specialist', skills: ['Training', 'Escalation'] }, { id: 'a10', name: 'Jonas Schäfer', email: 'jonas.schaefer@company.de', department: 'Email Team', skills: ['Email', 'Chat', 'Voice'] }, { id: 'a11', name: 'Kathrin Richter', email: 'kathrin.richter@company.de', department: 'Voice Team', skills: ['Voice', 'Billing'] }, { id: 'a12', name: 'Lukas Meyer', email: 'lukas.meyer@company.de', department: 'Molecular', skills: ['Molecular', 'Training'] }, { id: 'a13', name: 'Maria Schulz', email: 'maria.schulz@company.de', department: 'Specialist', skills: ['QA', 'Escalation', 'Chat'] }, { id: 'a14', name: 'Nico Wolf', email: 'nico.wolf@company.de', department: 'Voice Team', skills: ['Voice', 'Tech Support', 'Email'] }, { id: 'a15', name: 'Olivia Schwarz', email: 'olivia.schwarz@company.de', department: 'Email Team', skills: ['Email', 'Billing', 'QA'] }, ]; const ACTIVE_USERS = [ { id: 'u1', name: 'Max Planner', initials: 'MP', color: '#1976D2' }, { id: 'u2', name: 'Lisa Admin', initials: 'LA', color: '#7B1FA2' }, { id: 'u3', name: 'Tom Scheduler', initials: 'TS', color: '#00897B' }, { id: 'u4', name: 'Sarah Lead', initials: 'SL', color: '#E65100' }, { id: 'u5', name: 'Jan Ops', initials: 'JO', color: '#AD1457' }, { id: 'u6', name: 'Paula HR', initials: 'PH', color: '#558B2F' }, { id: 'u7', name: 'Chris Manager', initials: 'CM', color: '#6A1B9A' }, ]; const VERSION_HISTORY = [ { id: 'v1', user: 'Max Planner', action: 'Updated shifts for Anna Müller (Feb 17–21)', timestamp: '2026-02-13T12:30:00' }, { id: 'v2', user: 'Lisa Admin', action: 'Added training block for David Fischer', timestamp: '2026-02-13T11:15:00' }, { id: 'v3', user: 'Tom Scheduler', action: 'Changed coverage targets for Week 8', timestamp: '2026-02-13T09:45:00' }, { id: 'v4', user: 'Sarah Lead', action: 'Imported new ExNet requirements', timestamp: '2026-02-12T16:20:00' }, { id: 'v5', user: 'Max Planner', action: 'Bulk updated Voice Team shifts', timestamp: '2026-02-12T14:00:00' }, ]; /** * Generate a sample schedule. * Key format: `{agentId}_{YYYY-MM-DD}` * Value: { shifts: string[], exnet: string[], notes: string, locked: null|userId } */ function generateSampleSchedule(agents, startDate, days) { const schedule = {}; const shiftIds = SHIFT_TYPES.map(s => s.id); const exnetIds = EXNET_GROUPS.map(e => e.id); agents.forEach(agent => { for (let d = 0; d < days; d++) { const date = new Date(startDate); date.setDate(date.getDate() + d); const dateStr = date.toISOString().split('T')[0]; const key = `${agent.id}_${dateStr}`; const dayOfWeek = date.getDay(); // Skip weekends for most agents if (dayOfWeek === 0 || dayOfWeek === 6) { schedule[key] = { shifts: [], exnet: [], notes: '', locked: null, history: [] }; continue; } // Semi-random shift assignment for demo const seed = (agent.id.charCodeAt(1) * 31 + d * 7) % 100; const shifts = []; const exnet = []; if (seed < 40) { shifts.push('morning'); } else if (seed < 60) { shifts.push('afternoon'); } else if (seed < 70) { shifts.push('morning', 'training'); } else if (seed < 80) { shifts.push('allday'); } else if (seed < 85) { shifts.push('night'); } // leave some empty if (seed % 5 === 0 && shifts.length > 0) { exnet.push(exnetIds[seed % exnetIds.length]); } const notes = seed % 20 === 0 ? 'Please note: adjusted hours' : ''; const locked = seed === 42 ? 'u2' : null; const history = shifts.length > 0 ? [ { user: ACTIVE_USERS[seed % ACTIVE_USERS.length].name, action: `Set ${shifts.join(', ')}`, timestamp: new Date(Date.now() - seed * 3600000).toISOString() } ] : []; schedule[key] = { shifts, exnet, notes, locked, history }; } }); return schedule; } /** * Generate ExNet targets per date. * Returns: { 'YYYY-MM-DD': { target: number, group: string } } */ function generateExnetTargets(startDate, days) { const targets = {}; const groups = EXNET_GROUPS; for (let d = 0; d < days; d++) { const date = new Date(startDate); date.setDate(date.getDate() + d); const dateStr = date.toISOString().split('T')[0]; const dayOfWeek = date.getDay(); if (dayOfWeek === 0 || dayOfWeek === 6) { targets[dateStr] = { target: 0, group: '' }; } else { const seed = (d * 13) % 100; targets[dateStr] = { target: 2 + (seed % 4), group: groups[d % groups.length].label, }; } } return targets; }