208 lines
8.4 KiB
JavaScript
208 lines
8.4 KiB
JavaScript
// ══════════════════════════════════════════════════════════════════
|
||
// ЕДИНЫЙ РЕЕСТР СТАТУСОВ
|
||
// Добавьте новый статус сюда — больше ничего менять не нужно.
|
||
// ══════════════════════════════════════════════════════════════════
|
||
//
|
||
// Поля объекта статуса:
|
||
// key — уникальный ключ (используется в БД, API, marksCache)
|
||
// chipClass — CSS-класс чипа фильтра (для цвета)
|
||
// chipLabel — текст на чипе фильтра
|
||
// chipDotColor — цвет точки на чипе (CSS-значение)
|
||
// badgeClass — CSS-класс бейджа статуса в таблице
|
||
// label — текст бейджа и тултипов
|
||
// sseLabel — текст в SSE-тосте
|
||
// exportLabel — текст в экспорте (CSV/TXT)
|
||
// btnClass — CSS-класс активной кнопки в боковой панели
|
||
// rowClass — CSS-класс строки таблицы
|
||
// btnIcon — иконка кнопки в боковой панели
|
||
// btnLabel — текст кнопки в боковой панели
|
||
// ispColor — цвет точки в inline-пикере статуса
|
||
// kbColor — цвет вспышки при нажатии клавиши
|
||
// kbShortcut — цифра-клавиша быстрого выбора (строка)
|
||
// clearOnUpdate — true: статус сбрасывается при обновлении задачи (режим сброса)
|
||
|
||
const MARKS_CONFIG = [
|
||
{
|
||
key: 'needs_reply',
|
||
chipClass: 'chip-reply',
|
||
chipLabel: 'Нужен ответ',
|
||
chipDotColor: 'var(--red)',
|
||
badgeClass: 'sb-reply',
|
||
label: 'Нужен ответ',
|
||
sseLabel: 'Нужно ответить',
|
||
exportLabel: 'Клиент ждет ответа',
|
||
btnClass: 'mbtn-reply',
|
||
rowClass: 'row-reply',
|
||
btnIcon: '✉',
|
||
btnLabel: 'Нужно ответить',
|
||
ispColor: 'var(--red)',
|
||
kbColor: '#ff4d4f',
|
||
kbShortcut: '1',
|
||
clearOnUpdate: true,
|
||
},
|
||
{
|
||
key: 'wait_client',
|
||
chipClass: 'chip-wait',
|
||
chipLabel: 'Ждём клиента',
|
||
chipDotColor: 'var(--orange)',
|
||
badgeClass: 'sb-wait',
|
||
label: 'Ждём клиента',
|
||
sseLabel: 'Ждём клиента',
|
||
exportLabel: 'Ждем клиента',
|
||
btnClass: 'mbtn-wait',
|
||
rowClass: 'row-wait',
|
||
btnIcon: '⏳',
|
||
btnLabel: 'Ждём клиента',
|
||
ispColor: 'var(--orange)',
|
||
kbColor: '#fa8c16',
|
||
kbShortcut: '2',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'resolved',
|
||
chipClass: 'chip-resolved',
|
||
chipLabel: 'Можно закрыть',
|
||
chipDotColor: 'var(--green)',
|
||
badgeClass: 'sb-resolved',
|
||
label: 'Можно закрыть',
|
||
sseLabel: 'Можно закрыть',
|
||
exportLabel: 'Решено',
|
||
btnClass: 'mbtn-resolve',
|
||
rowClass: 'row-resolved',
|
||
btnIcon: '✓',
|
||
btnLabel: 'Можно Закрыть',
|
||
ispColor: 'var(--green)',
|
||
kbColor: '#52c41a',
|
||
kbShortcut: '3',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'vyezdnye',
|
||
chipClass: 'chip-vyezdnye',
|
||
chipLabel: 'Не наша',
|
||
chipDotColor: 'var(--purple)',
|
||
badgeClass: 'sb-vyezdnye',
|
||
label: 'Не наша',
|
||
sseLabel: 'Не наша',
|
||
exportLabel: 'Не наша',
|
||
btnClass: 'mbtn-vyezdnye',
|
||
rowClass: 'row-vyezdnye',
|
||
btnIcon: '🚗',
|
||
btnLabel: 'Не наша',
|
||
ispColor: 'var(--purple)',
|
||
kbColor: '#722ed1',
|
||
kbShortcut: '4',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'hidden',
|
||
chipClass: 'chip-hidden',
|
||
chipLabel: 'Скрытые',
|
||
chipDotColor: 'var(--text2)',
|
||
badgeClass: 'sb-hidden',
|
||
label: 'Скрыто',
|
||
sseLabel: 'Скрыто',
|
||
exportLabel: 'Скрыто',
|
||
btnClass: 'mbtn-hidden',
|
||
rowClass: 'row-hidden',
|
||
btnIcon: '⊘',
|
||
btnLabel: 'Скрыть',
|
||
ispColor: '#bbb',
|
||
kbColor: '#bbb',
|
||
kbShortcut: '6',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'oborudovanie-fix',
|
||
chipClass: 'chip-oborudovanie-fix',
|
||
chipLabel: 'Клиент отправил',
|
||
chipDotColor: '#fa541c',
|
||
badgeClass: 'sb-oborudovanie-fix',
|
||
label: 'Клиент отправил оборудование',
|
||
sseLabel: 'Клиент отправил оборудование',
|
||
exportLabel: 'Клиент отправил оборудование',
|
||
btnClass: 'mbtn-oborudovanie-fix',
|
||
rowClass: 'row-oborudovanie-fix',
|
||
btnIcon: '📤',
|
||
btnLabel: 'Клиент отправил',
|
||
ispColor: '#fa541c',
|
||
kbColor: '#fa541c',
|
||
kbShortcut: '7',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'oborudovanie-in-repair',
|
||
chipClass: 'chip-oborudovanie-in-repair',
|
||
chipLabel: 'В ремонте',
|
||
chipDotColor: '#13c2c2',
|
||
badgeClass: 'sb-oborudovanie-in-repair',
|
||
label: 'Оборудование в ремонте',
|
||
sseLabel: 'Оборудование в ремонте',
|
||
exportLabel: 'Оборудование в ремонте',
|
||
btnClass: 'mbtn-oborudovanie-in-repair',
|
||
rowClass: 'row-oborudovanie-in-repair',
|
||
btnIcon: '🔧',
|
||
btnLabel: 'В ремонте',
|
||
ispColor: '#13c2c2',
|
||
kbColor: '#13c2c2',
|
||
kbShortcut: '8',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'oborudovanie-repair-done',
|
||
chipClass: 'chip-oborudovanie-repair-done',
|
||
chipLabel: 'Ремонт окончен',
|
||
chipDotColor: '#52c41a',
|
||
badgeClass: 'sb-oborudovanie-repair-done',
|
||
label: 'Ремонт окончен — ждёт отправки',
|
||
sseLabel: 'Ремонт окончен — ждёт отправки',
|
||
exportLabel: 'Ремонт окончен — ждёт отправки',
|
||
btnClass: 'mbtn-oborudovanie-repair-done',
|
||
rowClass: 'row-oborudovanie-repair-done',
|
||
btnIcon: '✅',
|
||
btnLabel: 'Ремонт окончен',
|
||
ispColor: '#52c41a',
|
||
kbColor: '#52c41a',
|
||
kbShortcut: '9',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'oborudovanie-send-back',
|
||
chipClass: 'chip-oborudovanie-send-back',
|
||
chipLabel: 'Отправлено клиенту',
|
||
chipDotColor: '#1677ff',
|
||
badgeClass: 'sb-oborudovanie-send-back',
|
||
label: 'Оборудование отправлено клиенту',
|
||
sseLabel: 'Оборудование отправлено клиенту',
|
||
exportLabel: 'Оборудование отправлено клиенту',
|
||
btnClass: 'mbtn-oborudovanie-send-back',
|
||
rowClass: 'row-oborudovanie-send-back',
|
||
btnIcon: '🚚',
|
||
btnLabel: 'Отправлено клиенту',
|
||
ispColor: '#1677ff',
|
||
kbColor: '#1677ff',
|
||
kbShortcut: '0',
|
||
clearOnUpdate: false,
|
||
},
|
||
{
|
||
key: 'oborudovanie-returned',
|
||
chipClass: 'chip-oborudovanie-returned',
|
||
chipLabel: 'Клиент получил',
|
||
chipDotColor: '#722ed1',
|
||
badgeClass: 'sb-oborudovanie-returned',
|
||
label: 'Клиент получил оборудование',
|
||
sseLabel: 'Клиент получил оборудование',
|
||
exportLabel: 'Клиент получил оборудование',
|
||
btnClass: 'mbtn-oborudovanie-returned',
|
||
rowClass: 'row-oborudovanie-returned',
|
||
btnIcon: '🏠',
|
||
btnLabel: 'Клиент получил',
|
||
ispColor: '#722ed1',
|
||
kbColor: '#722ed1',
|
||
kbShortcut: '',
|
||
clearOnUpdate: false,
|
||
},
|
||
];
|
||
|
||
// Совместимость с Node.js (server.js использует require)
|
||
if (typeof module !== 'undefined') module.exports = MARKS_CONFIG;
|