add mock-data.js

This commit is contained in:
Dinarassan 2026-05-22 13:59:21 +05:00
parent 6ebd4cc8a9
commit 1607ee4eef

129
mock-data.js Normal file
View File

@ -0,0 +1,129 @@
// Seed data for the ClientOS static MVP demo.
// Loaded by app.js as window.SEED. On first visit it is cloned into
// localStorage; the live STATE object lives in memory and is persisted
// back on every mutation. Press "Reset demo data" in the UI to wipe.
window.SEED = {
meta: { version: 1, seededAt: '2026-05-22T08:00:00+05:00' },
// Identity of the person using the app right now.
currentUserId: 'u1',
users: [
{ id: 'u1', name: 'Айгерим Б.', email: 'aigerim@team.local', role: 'admin', initials: 'АБ', color: '#2563eb', timezone: 'Asia/Almaty' },
{ id: 'u2', name: 'Даурен К.', email: 'dauren@team.local', role: 'member', initials: 'ДК', color: '#16a34a', timezone: 'Asia/Almaty' },
{ id: 'u3', name: 'Анна М.', email: 'anna@team.local', role: 'member', initials: 'АМ', color: '#db2777', timezone: 'Asia/Almaty' },
{ id: 'u4', name: 'Ержан С.', email: 'erzhan@team.local', role: 'member', initials: 'ЕС', color: '#ea580c', timezone: 'Asia/Almaty' },
],
clients: [
{ id: 'c1', name: 'Kaspi.kz', description: 'Финтех-партнёр. Стратегический клиент.', status: 'active', ownerId: 'u1', tags: ['fintech', 'strategic'], createdAt: '2026-01-12T09:00:00+05:00' },
{ id: 'c2', name: 'Beeline KZ', description: 'Телеком-оператор. Проекты по 5G и BSS.', status: 'active', ownerId: 'u2', tags: ['telecom'], createdAt: '2026-02-03T09:00:00+05:00' },
{ id: 'c3', name: 'Halyk Bank', description: 'Банк. Сейчас на паузе из-за внутренних изменений.', status: 'on_hold', ownerId: 'u1', tags: ['banking'], createdAt: '2025-11-20T09:00:00+05:00' },
{ id: 'c4', name: 'Air Astana', description: 'Авиакомпания. Loyalty и crew scheduling.', status: 'active', ownerId: 'u3', tags: ['aviation'], createdAt: '2026-03-18T09:00:00+05:00' },
],
contacts: [
{ id: 'k1', clientId: 'c1', name: 'Алмас Б.', email: 'almas@kaspi.kz', phone: '+7 701 111 22 33', role: 'CTO' },
{ id: 'k2', clientId: 'c1', name: 'Алия Т.', email: 'aliya@kaspi.kz', phone: '+7 701 222 33 44', role: 'PM' },
{ id: 'k3', clientId: 'c2', name: 'Гульнара Т.', email: 'gulnara@beeline.kz', phone: '+7 702 333 44 55', role: 'Head of Product' },
{ id: 'k4', clientId: 'c3', name: 'Серик А.', email: 'serik@halykbank.kz', phone: '+7 705 444 55 66', role: 'Director' },
{ id: 'k5', clientId: 'c4', name: 'Дария Ж.', email: 'daria@airastana.com', phone: '+7 707 555 66 77', role: 'Innovation Lead' },
],
projects: [
{ id: 'p1', clientId: 'c1', name: 'Internal Tools Audit', description: 'Инвентаризация и аудит внутренних сервисов клиента.', status: 'active', priority: 'high', startDate: '2026-05-01', endDate: '2026-06-15', createdById: 'u1' },
{ id: 'p2', clientId: 'c1', name: 'Mobile App Redesign', description: 'Обновление UX мобильного приложения.', status: 'planned', priority: 'medium', startDate: '2026-06-01', endDate: '2026-09-30', createdById: 'u1' },
{ id: 'p3', clientId: 'c2', name: '5G Rollout Q3', description: 'Развёртывание 5G в Алматы и Астане.', status: 'active', priority: 'urgent', startDate: '2026-04-15', endDate: '2026-09-01', createdById: 'u2' },
{ id: 'p4', clientId: 'c2', name: 'BSS Integration', description: 'Интеграция биллинга с новой OSS.', status: 'on_hold', priority: 'low', startDate: '2026-03-01', endDate: '2026-12-31', createdById: 'u2' },
{ id: 'p5', clientId: 'c3', name: 'ATM Network Update', description: 'Обновление прошивок банкоматов.', status: 'planned', priority: 'medium', startDate: '2026-07-01', endDate: '2026-11-30', createdById: 'u1' },
{ id: 'p6', clientId: 'c4', name: 'Loyalty Platform', description: 'Новая платформа лояльности с миль.', status: 'active', priority: 'high', startDate: '2026-03-20', endDate: '2026-08-15', createdById: 'u3' },
{ id: 'p7', clientId: 'c4', name: 'Crew Scheduling MVP', description: 'Прототип системы планирования экипажей.', status: 'active', priority: 'urgent', startDate: '2026-04-01', endDate: '2026-07-01', createdById: 'u3' },
],
tasks: [
// p1 — Kaspi Audit
{ id: 't1', projectId: 'p1', title: 'Inventarize internal services', description: 'Собрать список всех внутренних сервисов и их владельцев.', status: 'done', priority: 'medium', assigneeId: 'u2', dueDate: '2026-05-15', position: 1 },
{ id: 't2', projectId: 'p1', title: 'Interview team leads', description: 'Интервью с лидами по 5 направлениям.', status: 'in_review', priority: 'high', assigneeId: 'u1', dueDate: '2026-05-20', position: 2 },
{ id: 't3', projectId: 'p1', title: 'Draft audit report', description: 'Первый черновик отчёта.', status: 'in_progress', priority: 'high', assigneeId: 'u3', dueDate: '2026-05-28', position: 3 },
{ id: 't4', projectId: 'p1', title: 'Present findings to CTO', description: 'Презентация результатов аудита.', status: 'todo', priority: 'urgent', assigneeId: 'u1', dueDate: '2026-06-02', position: 4 },
// p3 — Beeline 5G
{ id: 't5', projectId: 'p3', title: 'Site survey: Almaty south', description: 'Обследование локаций под базовые станции.', status: 'done', priority: 'high', assigneeId: 'u2', dueDate: '2026-05-10', position: 1 },
{ id: 't6', projectId: 'p3', title: 'Procure base stations', description: 'Закупка оборудования.', status: 'in_progress', priority: 'urgent', assigneeId: 'u4', dueDate: '2026-05-25', position: 2 },
{ id: 't7', projectId: 'p3', title: 'Permits filing', description: 'Подача документов на разрешения.', status: 'blocked', priority: 'high', assigneeId: 'u2', dueDate: '2026-05-30', position: 3 },
{ id: 't8', projectId: 'p3', title: 'Pilot launch Astana', description: 'Пилотный запуск 5G в Астане.', status: 'todo', priority: 'medium', assigneeId: 'u4', dueDate: '2026-06-15', position: 4 },
// p6 — Air Astana Loyalty
{ id: 't9', projectId: 'p6', title: 'Tier rules spec', description: 'Правила уровней лояльности.', status: 'in_review', priority: 'medium', assigneeId: 'u3', dueDate: '2026-05-23', position: 1 },
{ id: 't10', projectId: 'p6', title: 'Email templates', description: 'Шаблоны транзакционных писем.', status: 'todo', priority: 'low', assigneeId: 'u3', dueDate: '2026-06-01', position: 2 },
{ id: 't11', projectId: 'p6', title: 'API design', description: 'Дизайн REST API для платформы.', status: 'in_progress', priority: 'high', assigneeId: 'u1', dueDate: '2026-05-26', position: 3 },
// p7 — Crew Scheduling
{ id: 't12', projectId: 'p7', title: 'Pilot constraints model', description: 'Модель ограничений для расписания пилотов.', status: 'in_progress', priority: 'urgent', assigneeId: 'u4', dueDate: '2026-05-22', position: 1 },
{ id: 't13', projectId: 'p7', title: 'FAA review', description: 'Согласование с авиационным регулятором.', status: 'blocked', priority: 'high', assigneeId: 'u1', dueDate: '2026-06-10', position: 2 },
],
meetings: [
{ id: 'm1', clientId: 'c1', projectId: null, title: 'Kaspi quarterly sync', description: 'Квартальный синк по статусу всех проектов.', startsAt: '2026-05-22T10:00:00+05:00', endsAt: '2026-05-22T11:00:00+05:00', timezone: 'Asia/Almaty', location: 'Zoom', attendeeIds: ['u1','u2'] },
{ id: 'm2', clientId: 'c2', projectId: 'p3', title: 'Beeline 5G status', description: 'Еженедельный статус 5G.', startsAt: '2026-05-22T14:00:00+05:00', endsAt: '2026-05-22T15:00:00+05:00', timezone: 'Asia/Almaty', location: 'Teams', attendeeIds: ['u2','u4'] },
{ id: 'm3', clientId: 'c4', projectId: 'p6', title: 'Air Astana loyalty kickoff', description: 'Старт работы по платформе лояльности.', startsAt: '2026-05-23T09:30:00+05:00', endsAt: '2026-05-23T10:30:00+05:00', timezone: 'Asia/Almaty', location: 'Офис клиента', attendeeIds: ['u1','u3'] },
{ id: 'm4', clientId: 'c3', projectId: null, title: 'Halyk on-hold review', description: 'Решение что делать с проектами Halyk.', startsAt: '2026-05-25T11:00:00+05:00', endsAt: '2026-05-25T12:00:00+05:00', timezone: 'Asia/Almaty', location: 'Внутр. встреча', attendeeIds: ['u1'] },
{ id: 'm5', clientId: 'c4', projectId: 'p7', title: 'Crew scheduling demo', description: 'Показ прототипа команде Air Astana.', startsAt: '2026-05-27T15:00:00+05:00', endsAt: '2026-05-27T16:00:00+05:00', timezone: 'Asia/Almaty', location: 'Zoom', attendeeIds: ['u1','u4'] },
],
channels: [
{ id: 'ch1', scopeType: 'project', scopeId: 'p1', name: '#kaspi-audit', memberIds: ['u1','u2','u3'] },
{ id: 'ch2', scopeType: 'project', scopeId: 'p3', name: '#beeline-5g', memberIds: ['u2','u4'] },
{ id: 'ch3', scopeType: 'project', scopeId: 'p6', name: '#aa-loyalty', memberIds: ['u1','u3'] },
{ id: 'ch4', scopeType: 'project', scopeId: 'p7', name: '#aa-crew', memberIds: ['u1','u4'] },
{ id: 'ch5', scopeType: 'client', scopeId: 'c1', name: '#kaspi-general', memberIds: ['u1','u2','u3'] },
{ id: 'ch6', scopeType: 'client', scopeId: 'c2', name: '#beeline-general', memberIds: ['u2','u4'] },
{ id: 'ch7', scopeType: 'dm', scopeId: null, name: 'Даурен К.', memberIds: ['u1','u2'] },
{ id: 'ch8', scopeType: 'dm', scopeId: null, name: 'Анна М.', memberIds: ['u1','u3'] },
],
messages: [
{ id: 'msg1', channelId: 'ch1', authorId: 'u2', body: 'Закончил инвентаризацию, выгрузил в Confluence.', createdAt: '2026-05-15T16:30:00+05:00' },
{ id: 'msg2', channelId: 'ch1', authorId: 'u1', body: 'Отлично! Завтра обсудим на стендапе.', createdAt: '2026-05-15T16:42:00+05:00' },
{ id: 'msg3', channelId: 'ch1', authorId: 'u3', body: 'Начала черновик отчёта, @Айгерим Б. ревью к четвергу нужно?', createdAt: '2026-05-20T11:10:00+05:00' },
{ id: 'msg4', channelId: 'ch2', authorId: 'u4', body: 'Базовые станции едут, ETA 26 мая.', createdAt: '2026-05-21T09:00:00+05:00' },
{ id: 'msg5', channelId: 'ch2', authorId: 'u2', body: 'По разрешениям задержка, ждём ответ из акимата.', createdAt: '2026-05-21T09:15:00+05:00' },
{ id: 'msg6', channelId: 'ch3', authorId: 'u3', body: 'Спека по тирам почти готова, кидаю на ревью.', createdAt: '2026-05-22T08:30:00+05:00' },
{ id: 'msg7', channelId: 'ch4', authorId: 'u4', body: 'Модель ограничений запустилась локально 🎉', createdAt: '2026-05-22T07:45:00+05:00' },
{ id: 'msg8', channelId: 'ch5', authorId: 'u1', body: 'Завтра созвон с CTO Kaspi в 10:00.', createdAt: '2026-05-21T18:00:00+05:00' },
{ id: 'msg9', channelId: 'ch7', authorId: 'u2', body: 'Привет! Глянь PR пж.', createdAt: '2026-05-22T09:00:00+05:00' },
{ id: 'msg10', channelId: 'ch7', authorId: 'u1', body: 'Сейчас гляну.', createdAt: '2026-05-22T09:02:00+05:00' },
],
comments: [
{ id: 'cm1', parentType: 'task', parentId: 't3', authorId: 'u1', body: 'Не забудь раздел про observability.', createdAt: '2026-05-21T10:00:00+05:00' },
{ id: 'cm2', parentType: 'task', parentId: 't6', authorId: 'u2', body: '@Ержан С. когда ожидаешь поставку?', createdAt: '2026-05-20T15:30:00+05:00' },
{ id: 'cm3', parentType: 'task', parentId: 't12', authorId: 'u1', body: 'Сегодня дедлайн, как успеваешь?', createdAt: '2026-05-22T08:00:00+05:00' },
],
files: [
{ id: 'f1', name: 'Kaspi audit — interview notes.pdf', sizeBytes: 1_245_000, mime: 'application/pdf', scopeType: 'project', scopeId: 'p1', uploadedById: 'u3', uploadedAt: '2026-05-20T16:00:00+05:00' },
{ id: 'f2', name: '5G site survey — Almaty south.xlsx', sizeBytes: 340_000, mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', scopeType: 'task', scopeId: 't5', uploadedById: 'u2', uploadedAt: '2026-05-10T14:20:00+05:00' },
{ id: 'f3', name: 'Loyalty tier rules — draft v3.docx', sizeBytes: 88_000, mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', scopeType: 'project', scopeId: 'p6', uploadedById: 'u3', uploadedAt: '2026-05-22T08:00:00+05:00' },
{ id: 'f4', name: 'Crew constraints model.ipynb', sizeBytes: 24_000, mime: 'application/x-ipynb+json', scopeType: 'task', scopeId: 't12', uploadedById: 'u4', uploadedAt: '2026-05-21T19:45:00+05:00' },
],
notifications: [
{ id: 'n1', userId: 'u1', type: 'meeting_reminder', payload: { meetingId: 'm1', title: 'Kaspi quarterly sync' }, readAt: null, createdAt: '2026-05-22T09:45:00+05:00' },
{ id: 'n2', userId: 'u1', type: 'task_due_soon', payload: { taskId: 't9', title: 'Tier rules spec' }, readAt: null, createdAt: '2026-05-22T08:00:00+05:00' },
{ id: 'n3', userId: 'u1', type: 'comment_mention', payload: { taskId: 't6', by: 'Даурен К.', snippet: 'когда ожидаешь поставку?' }, readAt: null, createdAt: '2026-05-20T15:30:00+05:00' },
{ id: 'n4', userId: 'u1', type: 'meeting_invitation',payload: { meetingId: 'm3', title: 'Air Astana loyalty kickoff' }, readAt: '2026-05-21T20:00:00+05:00', createdAt: '2026-05-21T17:00:00+05:00' },
{ id: 'n5', userId: 'u1', type: 'task_assigned', payload: { taskId: 't11', title: 'API design' }, readAt: '2026-05-21T20:00:00+05:00', createdAt: '2026-05-20T10:00:00+05:00' },
],
activity: [
{ id: 'a1', actorId: 'u2', scopeType: 'project', scopeId: 'p1', verb: 'status_changed', payload: { taskId: 't1', title: 'Inventarize internal services', from: 'in_review', to: 'done' }, createdAt: '2026-05-15T16:25:00+05:00' },
{ id: 'a2', actorId: 'u3', scopeType: 'project', scopeId: 'p1', verb: 'commented', payload: { taskId: 't3', title: 'Draft audit report' }, createdAt: '2026-05-21T10:01:00+05:00' },
{ id: 'a3', actorId: 'u1', scopeType: 'project', scopeId: 'p1', verb: 'scheduled', payload: { meetingId: 'm1', title: 'Kaspi quarterly sync' }, createdAt: '2026-05-21T17:00:00+05:00' },
{ id: 'a4', actorId: 'u4', scopeType: 'project', scopeId: 'p3', verb: 'status_changed', payload: { taskId: 't6', title: 'Procure base stations', from: 'todo', to: 'in_progress' }, createdAt: '2026-05-21T08:50:00+05:00' },
{ id: 'a5', actorId: 'u2', scopeType: 'project', scopeId: 'p3', verb: 'status_changed', payload: { taskId: 't7', title: 'Permits filing', from: 'in_progress', to: 'blocked' }, createdAt: '2026-05-21T16:00:00+05:00' },
{ id: 'a6', actorId: 'u3', scopeType: 'project', scopeId: 'p6', verb: 'uploaded', payload: { fileId: 'f3', name: 'Loyalty tier rules — draft v3.docx' }, createdAt: '2026-05-22T08:00:00+05:00' },
{ id: 'a7', actorId: 'u4', scopeType: 'project', scopeId: 'p7', verb: 'uploaded', payload: { fileId: 'f4', name: 'Crew constraints model.ipynb' }, createdAt: '2026-05-21T19:45:00+05:00' },
{ id: 'a8', actorId: 'u1', scopeType: 'client', scopeId: 'c1', verb: 'created', payload: { projectId: 'p2', name: 'Mobile App Redesign' }, createdAt: '2026-05-18T12:00:00+05:00' },
{ id: 'a9', actorId: 'u3', scopeType: 'client', scopeId: 'c4', verb: 'scheduled', payload: { meetingId: 'm3', title: 'Air Astana loyalty kickoff' }, createdAt: '2026-05-21T17:00:00+05:00' },
{ id: 'a10', actorId: 'u1', scopeType: 'project', scopeId: 'p6', verb: 'assigned', payload: { taskId: 't11', title: 'API design', assigneeId: 'u1' }, createdAt: '2026-05-20T10:00:00+05:00' },
],
};