Files
portal/app/resources/js/composables/leadStatuses.ts
T

27 lines
1.4 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.
/**
* 5 системных статусов воронки (редизайн 2026-05-17).
*
* Источник истины: db/schema.sql:2130 (lead_statuses seed). НЕ из BRANDBOOK_v2 §3.6
* (расхождение #1 handoff vs ТЗ из реестра v1.13: handoff содержит 14 «обобщённых»
* статусов, не совпадающих с реальными slug'ами; пересечение всего 2 — Переговоры
* и Оплачено).
*
* При фактической интеграции с API подтягиваем `GET /api/lead-statuses` —
* система+tenant-кастом. Сейчас — компайл-тайм snapshot для UI.
*/
export interface LeadStatus {
slug: string;
nameRu: string;
isSystem: boolean;
sortOrder: number;
colorHex: string;
}
export const LEAD_STATUSES: LeadStatus[] = [
{ slug: 'new', nameRu: 'Новая сделка', isSystem: true, sortOrder: 1, colorHex: '#3B82F6' },
{ slug: 'viewed', nameRu: 'Просмотрено', isSystem: true, sortOrder: 2, colorHex: '#8B5CF6' },
{ slug: 'in_progress', nameRu: 'В работе', isSystem: true, sortOrder: 3, colorHex: '#06B6D4' },
{ slug: 'won', nameRu: 'Сделка', isSystem: true, sortOrder: 4, colorHex: '#10B981' },
{ slug: 'lost', nameRu: 'Не реализовано', isSystem: true, sortOrder: 5, colorHex: '#6B7280' },
];