krona-front/src/core/modules/registry.ts

248 lines
10 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { ModuleDefinition } from './types';
export const SYSTEM_MODULES: ModuleDefinition[] = [
{
id: 'dashboard',
label: 'Главная',
iconName: 'LayoutDashboard',
route: '/',
sections: [
{ id: 'overview', label: 'Сводка дня', route: '/' },
{ id: 'alerts', label: 'Требует внимания', route: '/?tab=alerts', badge: '3' },
{ id: 'live', label: 'Операционный статус', route: '/?tab=live' },
],
},
{
id: 'operations',
label: 'Операции',
iconName: 'Workflow',
route: '/operations',
sections: [], // Populated dynamically from active Business Profile operationsTabs
},
{
id: 'crm',
label: 'CRM',
iconName: 'Users',
route: '/crm',
requiredCapability: 'crm',
sections: [
{ id: 'overview', label: 'Обзор CRM', route: '/crm' },
{ id: 'clients', label: 'Клиенты', route: '/crm/clients', badge: '1,420' },
{ id: 'deals', label: 'Сделки & Воронка', route: '/crm/deals', badge: '18' },
{ id: 'leads', label: 'Лиды', route: '/crm/leads', badge: '9' },
{ id: 'companies', label: 'Компании', route: '/crm/companies' },
{ id: 'segments', label: 'Сегменты', route: '/crm/segments' },
{ id: 'activities', label: 'Активности', route: '/crm/activities' },
],
},
{
id: 'sales',
label: 'Продажи',
iconName: 'ShoppingBag',
route: '/sales',
requiredCapability: 'sales',
sections: [
{ id: 'overview', label: 'Обзор', route: '/sales' },
{ id: 'orders', label: 'Все заказы', route: '/sales/orders', badge: '42' },
{ id: 'invoices', label: 'Счета', route: '/sales/invoices' },
{ id: 'payments', label: 'Оплаты', route: '/sales/payments' },
{ id: 'refunds', label: 'Возвраты', route: '/sales/refunds' },
{ id: 'funnels', label: 'Конверсия', route: '/sales/funnels' },
],
},
{
id: 'inventory',
label: 'Склад',
iconName: 'Boxes',
route: '/inventory',
requiredCapability: 'inventory',
sections: [
{ id: 'overview', label: 'Обзор склада', route: '/inventory' },
{ id: 'items', label: 'Остатки товаров', route: '/inventory/items' },
{ id: 'warehouses', label: 'Склады & Локации', route: '/inventory/warehouses' },
{ id: 'batches', label: 'Партии & Сроки', route: '/inventory/batches' },
{ id: 'movements', label: 'Перемещения', route: '/inventory/movements' },
{ id: 'writeoffs', label: 'Списания', route: '/inventory/writeoffs' },
{ id: 'audit', label: 'Инвентаризация', route: '/inventory/audit' },
],
},
{
id: 'procurement',
label: 'Закупки',
iconName: 'Truck',
route: '/procurement',
sections: [
{ id: 'orders', label: 'Заказы поставщикам', route: '/procurement' },
{ id: 'vendors', label: 'База поставщиков', route: '/procurement?tab=vendors' },
{ id: 'contracts', label: 'Договоры & Условия', route: '/procurement?tab=contracts' },
{ id: 'invoices', label: 'Входящие накладные', route: '/procurement?tab=invoices' },
],
},
{
id: 'finance',
label: 'Финансы',
iconName: 'BadgeDollarSign',
route: '/finance',
requiredCapability: 'finance',
sections: [
{ id: 'overview', label: 'Обзор & Сальдо', route: '/finance' },
{ id: 'cashflow', label: 'ДДС (Cash Flow)', route: '/finance/cashflow' },
{ id: 'pnl', label: 'P&L (Прибыли и убытки)', route: '/finance/pnl' },
{ id: 'shifts', label: 'Кассовые смены', route: '/finance/shifts', badge: '2 открыты' },
{ id: 'transactions', label: 'Платежи', route: '/finance/transactions' },
{ id: 'debt', label: 'Задолженности', route: '/finance/debt' },
],
},
{
id: 'employees',
label: 'Сотрудники',
iconName: 'UserCheck',
route: '/employees',
requiredCapability: 'employees',
sections: [
{ id: 'list', label: 'Команда', route: '/employees' },
{ id: 'schedule', label: 'Графики & Смены', route: '/employees/schedule' },
{ id: 'timetrack', label: 'Рабочее время & Табель', route: '/employees/timetrack' },
{ id: 'roles', label: 'Должности & Ставки', route: '/employees/roles' },
{ id: 'kpi', label: 'KPI & Мотивация', route: '/employees/kpi' },
],
},
{
id: 'communications',
label: 'Коммуникации',
iconName: 'MessageSquareText',
route: '/communications',
requiredCapability: 'communications',
badge: '3',
sections: [
{ id: 'messengers', label: 'Мессенджеры', route: '/communications?section=messengers' },
{ id: 'email', label: 'Почта', route: '/communications?section=email' },
{ id: 'channels', label: 'Каналы', route: '/communications?section=channels' },
{ id: 'settings', label: 'Настройки', route: '/communications?section=settings' },
],
},
{
id: 'helpdesk',
label: 'Поддержка',
iconName: 'Headset',
route: '/helpdesk',
requiredCapability: 'helpdesk',
sections: [
{ id: 'overview', label: 'Обзор поддержки', route: '/helpdesk' },
{ id: 'tickets', label: 'Очередь тикетов', route: '/helpdesk/tickets', badge: '5' },
{ id: 'sla', label: 'SLA & Эскалации', route: '/helpdesk/sla' },
{ id: 'kb', label: 'База знаний', route: '/helpdesk/kb' },
{ id: 'analytics', label: 'Метрики поддержки', route: '/helpdesk/analytics' },
],
},
{
id: 'tasks',
label: 'Задачи и проекты',
iconName: 'CheckSquare',
route: '/tasks',
requiredCapability: 'tasks',
sections: [
{ id: 'my', label: 'Мои задачи', route: '/tasks' },
{ id: 'kanban', label: 'Канбан-доска', route: '/tasks/kanban' },
{ id: 'projects', label: 'Проекты', route: '/tasks/projects' },
{ id: 'calendar', label: 'Календарь дедлайнов', route: '/tasks/calendar' },
{ id: 'overdue', label: 'Просроченные', route: '/tasks/overdue', badge: '2' },
],
},
{
id: 'cms',
label: 'Сайты',
iconName: 'Globe',
route: '/cms',
requiredCapability: 'cms',
sections: [
{ id: 'sites', label: 'Мои сайты', route: '/cms' },
{ id: 'pages', label: 'Страницы & Конструктор', route: '/cms/pages' },
{ id: 'forms', label: 'Лид-формы', route: '/cms/forms' },
{ id: 'media', label: 'Медиабиблиотека', route: '/cms/media' },
{ id: 'seo', label: 'SEO & Аналитика', route: '/cms/seo' },
{ id: 'domains', label: 'Домены', route: '/cms/domains' },
],
},
{
id: 'marketing',
label: 'Маркетинг',
iconName: 'Megaphone',
route: '/marketing',
requiredCapability: 'marketing',
sections: [
{ id: 'overview', label: 'Обзор маркетинга', route: '/marketing' },
{ id: 'promos', label: 'Акции & Промокоды', route: '/marketing/promos' },
{ id: 'broadcasts', label: 'Рассылки', route: '/marketing/broadcasts' },
{ id: 'content', label: 'Контент-план', route: '/marketing/content' },
{ id: 'ai_marketer', label: 'AI Маркетолог', route: '/marketing/ai' },
],
},
{
id: 'analytics',
label: 'Аналитика',
iconName: 'BarChart3',
route: '/analytics',
requiredCapability: 'analytics',
sections: [
{ id: 'overview', label: 'Общий дашборд', route: '/analytics' },
{ id: 'sales_bi', label: 'Продажи & Выручка', route: '/analytics/sales' },
{ id: 'abc', label: 'ABC/XYZ анализ', route: '/analytics/abc' },
{ id: 'retention', label: 'Когорты & LTV', route: '/analytics/retention' },
{ id: 'forecasts', label: 'ИИ-прогнозы', route: '/analytics/forecasts' },
],
},
{
id: 'automation',
label: 'Автоматизация',
iconName: 'Cpu',
route: '/automation',
requiredCapability: 'automation',
sections: [
{ id: 'scenarios', label: 'Сценарии автоматизации', route: '/automation' },
{ id: 'builder', label: 'Конструктор цепочек', route: '/automation/builder' },
{ id: 'triggers', label: 'Триггеры событий', route: '/automation/triggers' },
{ id: 'history', label: 'Лог выполнения', route: '/automation/history' },
],
},
{
id: 'ai',
label: 'ИИ-центр',
iconName: 'Sparkles',
route: '/ai',
requiredCapability: 'ai',
badge: '✦',
sections: [
{ id: 'chat', label: 'Диалог с AI', route: '/ai' },
{ id: 'team', label: 'AI Команда', route: '/ai/team' },
{ id: 'tasks', label: 'ИИ-задачи в фоне', route: '/ai/tasks' },
{ id: 'history', label: 'История & Контекст', route: '/ai/history' },
{ id: 'usage', label: 'Лимиты & Токены', route: '/ai/usage' },
],
},
{
id: 'apps',
label: 'Приложения',
iconName: 'Grid',
route: '/apps',
sections: [
{ id: 'catalog', label: 'Каталог расширений', route: '/apps' },
{ id: 'installed', label: 'Установленные', route: '/apps/installed' },
{ id: 'integrations', label: 'Интеграции', route: '/apps/integrations' },
],
},
{
id: 'settings',
label: 'Настройки',
iconName: 'Settings',
route: '/settings',
sections: [
{ id: 'company', label: 'Организация & Точки', route: '/settings' },
{ id: 'profile', label: 'Бизнес-профиль', route: '/settings/profile' },
{ id: 'capabilities', label: 'Configuration Studio', route: '/settings/capabilities' },
{ id: 'users', label: 'Пользователи & Роли', route: '/settings/users' },
{ id: 'integrations', label: 'API & Webhooks', route: '/settings/api' },
{ id: 'appearance', label: 'Тема & Брендинг', route: '/settings/appearance' },
],
},
];