940 lines
35 KiB
JavaScript
940 lines
35 KiB
JavaScript
export const demoUsers = [
|
||
{
|
||
id: "u-manager",
|
||
email: "manager@local",
|
||
name: "Анна Мельник",
|
||
phone: "+7 978 300-10-01",
|
||
role: "manager",
|
||
lastLogin: "2026-03-12T08:15:00Z",
|
||
botBindings: {
|
||
telegram: "@anna_manager",
|
||
vk: "id1045001",
|
||
messengerMax: null,
|
||
},
|
||
},
|
||
{
|
||
id: "u-production",
|
||
email: "production@local",
|
||
name: "Илья Корнеев",
|
||
phone: "+7 978 300-10-02",
|
||
role: "production_lead",
|
||
lastLogin: "2026-03-12T09:05:00Z",
|
||
botBindings: {
|
||
telegram: "@production_lead",
|
||
vk: null,
|
||
messengerMax: null,
|
||
},
|
||
},
|
||
{
|
||
id: "u-logistics",
|
||
email: "logistics@local",
|
||
name: "Ольга Синицына",
|
||
phone: "+7 978 300-10-03",
|
||
role: "logistician",
|
||
lastLogin: "2026-03-12T10:22:00Z",
|
||
botBindings: {
|
||
telegram: "@olga_route",
|
||
vk: "id1045002",
|
||
messengerMax: "olga.max",
|
||
},
|
||
},
|
||
{
|
||
id: "u-logistics-2",
|
||
email: "route@local",
|
||
name: "Павел Миронов",
|
||
phone: "+7 978 300-10-04",
|
||
role: "logistician",
|
||
lastLogin: "2026-03-12T08:47:00Z",
|
||
botBindings: {
|
||
telegram: "@pavel_route",
|
||
vk: null,
|
||
messengerMax: null,
|
||
},
|
||
},
|
||
{
|
||
id: "u-driver",
|
||
email: "driver@local",
|
||
name: "Артём Громов",
|
||
phone: "+7 978 300-10-06",
|
||
role: "driver",
|
||
lastLogin: "2026-03-12T06:55:00Z",
|
||
botBindings: {
|
||
telegram: null,
|
||
vk: null,
|
||
messengerMax: null,
|
||
},
|
||
},
|
||
{
|
||
id: "u-admin",
|
||
email: "admin@local",
|
||
name: "Максим Белов",
|
||
phone: "+7 978 300-10-05",
|
||
role: "admin",
|
||
lastLogin: "2026-03-12T11:41:00Z",
|
||
botBindings: {
|
||
telegram: "@max_admin",
|
||
vk: "id1045003",
|
||
messengerMax: "max.admin",
|
||
},
|
||
},
|
||
];
|
||
|
||
const baseDemoOrders = [
|
||
{
|
||
id: "o-1001",
|
||
orderNumber: "CD-240031",
|
||
customer: {
|
||
name: "Мария Волкова",
|
||
phone: "+7 978 000-12-31",
|
||
messenger: "СМС",
|
||
address: "Симферополь, ул. Тургенева, 18",
|
||
},
|
||
status: "Ожидает согласования доставки",
|
||
deliveryAgreementStatus: "Ожидание ответа",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics"],
|
||
assignedDriverId: null,
|
||
createdAt: "2026-03-11T06:45:00Z",
|
||
updatedAt: "2026-03-12T09:40:00Z",
|
||
scheduledDelivery: "2026-03-14T08:00:00Z",
|
||
items: [
|
||
"Кухонный гарнитур | 1 комплект",
|
||
"Фурнитура Blum | 12 шт",
|
||
"Монтажный комплект | 1 набор",
|
||
],
|
||
tags: ["срочно", "кухня"],
|
||
comments: ["Клиент просит подтверждение за 2 часа до доставки"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-1",
|
||
authorName: "Анна Мельник",
|
||
text: "Проверить доступность подъезда для разгрузки.",
|
||
createdAt: "2026-03-11T08:00:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-1",
|
||
action: "Создан заказ",
|
||
oldStatus: null,
|
||
newStatus: "Новый",
|
||
userName: "Анна Мельник",
|
||
at: "2026-03-11T06:45:00Z",
|
||
},
|
||
{
|
||
id: "h-2",
|
||
action: "Подтверждение менеджером",
|
||
oldStatus: "Новый",
|
||
newStatus: "Подтверждён менеджером",
|
||
userName: "Анна Мельник",
|
||
at: "2026-03-11T07:10:00Z",
|
||
},
|
||
{
|
||
id: "h-3",
|
||
action: "Передан в производство",
|
||
oldStatus: "Подтверждён менеджером",
|
||
newStatus: "В очереди производства",
|
||
userName: "Анна Мельник",
|
||
at: "2026-03-11T07:45:00Z",
|
||
},
|
||
{
|
||
id: "h-4",
|
||
action: "Заказ готов к отгрузке",
|
||
oldStatus: "В производстве",
|
||
newStatus: "Готов к отгрузке",
|
||
userName: "Илья Корнеев",
|
||
at: "2026-03-12T08:20:00Z",
|
||
},
|
||
{
|
||
id: "h-5",
|
||
action: "Запущено согласование доставки",
|
||
oldStatus: "Готов к отгрузке",
|
||
newStatus: "Ожидает согласования доставки",
|
||
userName: "Система",
|
||
at: "2026-03-12T09:40:00Z",
|
||
},
|
||
],
|
||
chatMessages: [
|
||
{
|
||
id: "c-1",
|
||
sender: "bot",
|
||
channel: "СМС",
|
||
text: "Заказ CD-240031 готов. Выберите дату и половину дня доставки.",
|
||
sentAt: "2026-03-12T09:42:00Z",
|
||
},
|
||
{
|
||
id: "c-2",
|
||
sender: "client",
|
||
channel: "СМС",
|
||
text: "Подтвержу позже, вернусь после 16:00.",
|
||
sentAt: "2026-03-12T10:05:00Z",
|
||
},
|
||
],
|
||
internalMessages: [
|
||
{
|
||
id: "ic-1",
|
||
senderId: "u-manager",
|
||
senderName: "Анна Мельник",
|
||
text: "Клиент просил предварительный звонок перед доставкой.",
|
||
sentAt: "2026-03-12T09:50:00Z",
|
||
},
|
||
],
|
||
deliverySlots: [
|
||
{
|
||
id: "ds-1",
|
||
date: "2026-03-14",
|
||
time: "Первая половина дня",
|
||
logisticianId: "u-logistics",
|
||
status: "Ожидает подтверждения",
|
||
},
|
||
],
|
||
exception: null,
|
||
},
|
||
{
|
||
id: "o-1002",
|
||
orderNumber: "CD-240032",
|
||
customer: {
|
||
name: "Александр Савин",
|
||
phone: "+7 978 000-12-32",
|
||
messenger: "Эл. почта",
|
||
address: "Ялта, ул. Чехова, 9",
|
||
},
|
||
status: "Готов к отгрузке",
|
||
deliveryAgreementStatus: "Не начато",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics"],
|
||
assignedDriverId: null,
|
||
createdAt: "2026-03-10T11:20:00Z",
|
||
updatedAt: "2026-03-12T08:20:00Z",
|
||
scheduledDelivery: "2026-03-15T13:00:00Z",
|
||
items: ["Стеклопакет 2400x1800 | 2 шт", "Комплект крепежа | 1 набор"],
|
||
tags: ["стеклопакет"],
|
||
comments: ["Нужен созвон перед отгрузкой"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-2",
|
||
authorName: "Илья Корнеев",
|
||
text: "Производство завершено, передаём логистике после фотофиксации.",
|
||
createdAt: "2026-03-12T08:35:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-6",
|
||
action: "Запущено производство",
|
||
oldStatus: "В очереди производства",
|
||
newStatus: "В производстве",
|
||
userName: "Илья Корнеев",
|
||
at: "2026-03-11T12:20:00Z",
|
||
},
|
||
{
|
||
id: "h-7",
|
||
action: "Заказ готов к отгрузке",
|
||
oldStatus: "В производстве",
|
||
newStatus: "Готов к отгрузке",
|
||
userName: "Илья Корнеев",
|
||
at: "2026-03-12T08:20:00Z",
|
||
},
|
||
],
|
||
chatMessages: [],
|
||
internalMessages: [
|
||
{
|
||
id: "ic-2",
|
||
senderId: "u-production",
|
||
senderName: "Илья Корнеев",
|
||
text: "Можно запускать сообщение клиенту после 14:00.",
|
||
sentAt: "2026-03-12T08:25:00Z",
|
||
},
|
||
],
|
||
deliverySlots: [],
|
||
exception: null,
|
||
},
|
||
{
|
||
id: "o-1003",
|
||
orderNumber: "CD-240033",
|
||
customer: {
|
||
name: "Екатерина Тарасова",
|
||
phone: "+7 978 000-12-33",
|
||
messenger: "СМС",
|
||
address: "Севастополь, пр. Октябрьской Революции, 51",
|
||
},
|
||
status: "Проблема доставки",
|
||
deliveryAgreementStatus: "Нет ответа",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics"],
|
||
assignedDriverId: null,
|
||
createdAt: "2026-03-09T12:00:00Z",
|
||
updatedAt: "2026-03-12T07:05:00Z",
|
||
scheduledDelivery: "2026-03-13T16:00:00Z",
|
||
items: ["Шкаф-купе | 1 шт", "Зеркальные фасады | 2 шт"],
|
||
tags: ["рисковый клиент"],
|
||
comments: ["Три безуспешные попытки подтверждения"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-3",
|
||
authorName: "Ольга Синицына",
|
||
text: "Если клиент выйдет на связь, предлагать только вторую половину дня.",
|
||
createdAt: "2026-03-12T07:09:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-8",
|
||
action: "Запущено согласование доставки",
|
||
oldStatus: "Готов к отгрузке",
|
||
newStatus: "Ожидает согласования доставки",
|
||
userName: "Система",
|
||
at: "2026-03-11T10:05:00Z",
|
||
},
|
||
{
|
||
id: "h-9",
|
||
action: "Зафиксирована проблема доставки",
|
||
oldStatus: "Ожидает согласования доставки",
|
||
newStatus: "Проблема доставки",
|
||
userName: "Ольга Синицына",
|
||
at: "2026-03-12T07:05:00Z",
|
||
},
|
||
],
|
||
chatMessages: [
|
||
{
|
||
id: "c-3",
|
||
sender: "bot",
|
||
channel: "СМС",
|
||
text: "Напоминаем о необходимости выбрать дату доставки.",
|
||
sentAt: "2026-03-12T06:35:00Z",
|
||
},
|
||
],
|
||
internalMessages: [
|
||
{
|
||
id: "ic-3",
|
||
senderId: "u-logistics",
|
||
senderName: "Ольга Синицына",
|
||
text: "Если до 18:00 клиент не ответит, переводим в ручную обработку.",
|
||
sentAt: "2026-03-12T07:08:00Z",
|
||
},
|
||
],
|
||
deliverySlots: [
|
||
{
|
||
id: "ds-3",
|
||
date: "2026-03-13",
|
||
time: "Вторая половина дня",
|
||
logisticianId: "u-logistics",
|
||
status: "Просрочен",
|
||
},
|
||
],
|
||
exception: "Отсутствие ответа клиента",
|
||
},
|
||
{
|
||
id: "o-1004",
|
||
orderNumber: "CD-240034",
|
||
customer: {
|
||
name: "Сергей Марченко",
|
||
phone: "+7 978 000-12-34",
|
||
messenger: "СМС",
|
||
address: "Симферополь, ул. Крылова, 4",
|
||
},
|
||
status: "Назначен водитель",
|
||
deliveryAgreementStatus: "Подтверждено клиентом",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics-2"],
|
||
assignedDriverId: "u-driver",
|
||
driverRouteOrder: 2,
|
||
createdAt: "2026-03-10T09:15:00Z",
|
||
updatedAt: "2026-03-12T11:05:00Z",
|
||
scheduledDelivery: "2026-03-14T13:00:00Z",
|
||
items: ["Столешница дуб | 1 шт", "Опоры металлические | 4 шт"],
|
||
tags: ["сегодня"],
|
||
comments: ["Доставка в офис, разгрузка через задний вход"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-4",
|
||
authorName: "Павел Миронов",
|
||
text: "Назначен на рейс СМФ-02, водитель предупреждён.",
|
||
createdAt: "2026-03-12T11:06:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-10",
|
||
action: "Клиент подтвердил доставку",
|
||
oldStatus: "Ожидает согласования доставки",
|
||
newStatus: "Доставка согласована",
|
||
userName: "Система",
|
||
at: "2026-03-12T09:20:00Z",
|
||
},
|
||
{
|
||
id: "h-11",
|
||
action: "Назначен водитель",
|
||
oldStatus: "Доставка согласована",
|
||
newStatus: "Назначен водитель",
|
||
userName: "Павел Миронов",
|
||
at: "2026-03-12T11:05:00Z",
|
||
},
|
||
],
|
||
chatMessages: [
|
||
{
|
||
id: "c-4",
|
||
sender: "bot",
|
||
channel: "СМС",
|
||
text: "Доставка подтверждена на 13 марта, вторая половина дня.",
|
||
sentAt: "2026-03-12T09:21:00Z",
|
||
},
|
||
],
|
||
internalMessages: [
|
||
{
|
||
id: "ic-4",
|
||
senderId: "u-logistics-2",
|
||
senderName: "Павел Миронов",
|
||
text: "Водитель выезжает со склада в 13:30.",
|
||
sentAt: "2026-03-12T11:08:00Z",
|
||
},
|
||
],
|
||
deliverySlots: [
|
||
{
|
||
id: "ds-4",
|
||
date: "2026-03-14",
|
||
time: "Вторая половина дня",
|
||
logisticianId: "u-logistics-2",
|
||
status: "Подтверждён",
|
||
},
|
||
],
|
||
exception: null,
|
||
},
|
||
{
|
||
id: "o-1006",
|
||
orderNumber: "CD-240036",
|
||
customer: {
|
||
name: "Ирина Лебедева",
|
||
phone: "+7 978 000-12-36",
|
||
messenger: "СМС",
|
||
address: "Симферополь, ул. Киевская, 112",
|
||
},
|
||
status: "Назначен водитель",
|
||
deliveryAgreementStatus: "Подтверждено клиентом",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics"],
|
||
assignedDriverId: "u-driver",
|
||
driverRouteOrder: 1,
|
||
createdAt: "2026-03-12T10:40:00Z",
|
||
updatedAt: "2026-03-13T18:10:00Z",
|
||
scheduledDelivery: "2026-03-14T08:30:00Z",
|
||
items: ["Пенал для ванной | 1 шт", "Крепёжный комплект | 1 набор"],
|
||
tags: ["утро", "симферополь"],
|
||
comments: ["Подъезд со стороны двора, заранее позвонить консьержу"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-6",
|
||
authorName: "Ольга Синицына",
|
||
text: "Клиент просит приехать в начале интервала, до 11:00.",
|
||
createdAt: "2026-03-13T18:12:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-14",
|
||
action: "Клиент подтвердил доставку",
|
||
oldStatus: "Ожидает согласования доставки",
|
||
newStatus: "Доставка согласована",
|
||
userName: "Система",
|
||
at: "2026-03-13T15:20:00Z",
|
||
},
|
||
{
|
||
id: "h-15",
|
||
action: "Назначен водитель",
|
||
oldStatus: "Доставка согласована",
|
||
newStatus: "Назначен водитель",
|
||
userName: "Ольга Синицына",
|
||
at: "2026-03-13T18:10:00Z",
|
||
},
|
||
],
|
||
chatMessages: [
|
||
{
|
||
id: "c-6",
|
||
sender: "bot",
|
||
channel: "СМС",
|
||
text: "Доставка подтверждена на 14 марта, первая половина дня.",
|
||
sentAt: "2026-03-13T15:22:00Z",
|
||
},
|
||
],
|
||
internalMessages: [
|
||
{
|
||
id: "ic-5",
|
||
senderId: "u-logistics",
|
||
senderName: "Ольга Синицына",
|
||
text: "Хрупкая упаковка, просьба выгружать аккуратно.",
|
||
sentAt: "2026-03-13T18:15:00Z",
|
||
},
|
||
],
|
||
deliverySlots: [
|
||
{
|
||
id: "ds-6",
|
||
date: "2026-03-14",
|
||
time: "Первая половина дня",
|
||
logisticianId: "u-logistics",
|
||
status: "Подтверждён",
|
||
},
|
||
],
|
||
exception: null,
|
||
},
|
||
{
|
||
id: "o-1007",
|
||
orderNumber: "CD-240037",
|
||
customer: {
|
||
name: "Дмитрий Шестаков",
|
||
phone: "+7 978 000-12-37",
|
||
messenger: "СМС",
|
||
address: "Ялта, ул. Садовая, 27",
|
||
},
|
||
status: "Загружен",
|
||
deliveryAgreementStatus: "Подтверждено клиентом",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics-2"],
|
||
assignedDriverId: "u-driver",
|
||
driverRouteOrder: 1,
|
||
createdAt: "2026-03-13T08:10:00Z",
|
||
updatedAt: "2026-03-13T19:20:00Z",
|
||
scheduledDelivery: "2026-03-15T09:30:00Z",
|
||
items: ["Комод | 1 шт", "Полка навесная | 2 шт"],
|
||
tags: ["ялта", "завтра"],
|
||
comments: ["Доставка в частный дом, разгрузка у ворот"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-7",
|
||
authorName: "Павел Миронов",
|
||
text: "Машина загружена вечером заранее, выезд утром по расписанию.",
|
||
createdAt: "2026-03-13T19:22:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-16",
|
||
action: "Назначен водитель",
|
||
oldStatus: "Доставка согласована",
|
||
newStatus: "Назначен водитель",
|
||
userName: "Павел Миронов",
|
||
at: "2026-03-13T16:45:00Z",
|
||
},
|
||
{
|
||
id: "h-17",
|
||
action: "Подтверждена загрузка",
|
||
oldStatus: "Назначен водитель",
|
||
newStatus: "Загружен",
|
||
userName: "Артём Громов",
|
||
at: "2026-03-13T19:20:00Z",
|
||
},
|
||
],
|
||
chatMessages: [
|
||
{
|
||
id: "c-7",
|
||
sender: "bot",
|
||
channel: "СМС",
|
||
text: "Доставка назначена на 15 марта, первая половина дня.",
|
||
sentAt: "2026-03-13T16:48:00Z",
|
||
},
|
||
],
|
||
internalMessages: [
|
||
{
|
||
id: "ic-6",
|
||
senderId: "u-driver",
|
||
senderName: "Артём Громов",
|
||
text: "Принял заказ в рейс, планирую выезд в 07:30.",
|
||
sentAt: "2026-03-13T19:25:00Z",
|
||
},
|
||
],
|
||
deliverySlots: [
|
||
{
|
||
id: "ds-7",
|
||
date: "2026-03-15",
|
||
time: "Первая половина дня",
|
||
logisticianId: "u-logistics-2",
|
||
status: "Подтверждён",
|
||
},
|
||
],
|
||
exception: null,
|
||
},
|
||
{
|
||
id: "o-1005",
|
||
orderNumber: "CD-240035",
|
||
customer: {
|
||
name: "Николай Дроздов",
|
||
phone: "+7 978 000-12-35",
|
||
messenger: "Эл. почта",
|
||
address: "Ялта, ул. Московская, 14",
|
||
},
|
||
status: "Закрыт",
|
||
deliveryAgreementStatus: "Подтверждено клиентом",
|
||
managerId: "u-manager",
|
||
logisticianIds: ["u-logistics-2"],
|
||
assignedDriverId: "u-driver",
|
||
driverRouteOrder: 1,
|
||
createdAt: "2026-03-08T09:00:00Z",
|
||
updatedAt: "2026-03-11T18:30:00Z",
|
||
scheduledDelivery: "2026-03-11T08:00:00Z",
|
||
items: ["Тумба под раковину | 1 шт", "Комплект крепежа | 1 набор"],
|
||
tags: ["архив"],
|
||
comments: ["Заказ завершён без замечаний"],
|
||
orderNotes: [
|
||
{
|
||
id: "note-5",
|
||
authorName: "Павел Миронов",
|
||
text: "Клиент подтвердил получение, заказ закрыт.",
|
||
createdAt: "2026-03-11T18:31:00Z",
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: "h-12",
|
||
action: "Доставка завершена",
|
||
oldStatus: "В пути",
|
||
newStatus: "Доставлен",
|
||
userName: "Артём Громов",
|
||
at: "2026-03-11T17:50:00Z",
|
||
},
|
||
{
|
||
id: "h-13",
|
||
action: "Заказ закрыт",
|
||
oldStatus: "Доставлен",
|
||
newStatus: "Закрыт",
|
||
userName: "Павел Миронов",
|
||
at: "2026-03-11T18:30:00Z",
|
||
},
|
||
],
|
||
chatMessages: [
|
||
{
|
||
id: "c-5",
|
||
sender: "bot",
|
||
channel: "Эл. почта",
|
||
text: "Доставка успешно завершена. Спасибо за подтверждение.",
|
||
sentAt: "2026-03-11T18:10:00Z",
|
||
},
|
||
],
|
||
internalMessages: [],
|
||
deliverySlots: [
|
||
{
|
||
id: "ds-5",
|
||
date: "2026-03-11",
|
||
time: "Первая половина дня",
|
||
logisticianId: "u-logistics-2",
|
||
status: "Завершён",
|
||
},
|
||
],
|
||
exception: null,
|
||
},
|
||
];
|
||
|
||
const extraOrderSeeds = [
|
||
{ suffix: 101, customerName: "Людмила Артемьева", status: "Новый", city: "Симферополь", item: "Шкаф распашной", messenger: "СМС", updatedAt: "2026-03-14T08:20:00Z" },
|
||
{ suffix: 102, customerName: "Павел Карпов", status: "Новый", city: "Ялта", item: "Стол обеденный", messenger: "Эл. почта", updatedAt: "2026-03-14T10:10:00Z" },
|
||
{ suffix: 103, customerName: "Алёна Беспалова", status: "Требует уточнения", city: "Евпатория", item: "Тумба ТВ", messenger: "СМС", updatedAt: "2026-03-14T06:40:00Z" },
|
||
{ suffix: 104, customerName: "Георгий Храмов", status: "Требует уточнения", city: "Севастополь", item: "Комод", messenger: "СМС", updatedAt: "2026-03-13T17:50:00Z" },
|
||
{ suffix: 105, customerName: "Валерия Фролова", status: "Подтверждён менеджером", city: "Симферополь", item: "Кухонный фасад", messenger: "СМС", updatedAt: "2026-03-14T11:35:00Z" },
|
||
{ suffix: 106, customerName: "Иван Мирошниченко", status: "Подтверждён менеджером", city: "Алушта", item: "Шкаф-купе", messenger: "Эл. почта", updatedAt: "2026-03-14T09:25:00Z" },
|
||
{ suffix: 107, customerName: "Марина Ермакова", status: "В очереди производства", city: "Симферополь", item: "Столешница", messenger: "СМС", updatedAt: "2026-03-13T12:10:00Z" },
|
||
{ suffix: 108, customerName: "Руслан Гладков", status: "В очереди производства", city: "Ялта", item: "Гардеробная секция", messenger: "Эл. почта", updatedAt: "2026-03-13T08:00:00Z" },
|
||
{ suffix: 109, customerName: "Светлана Коваль", status: "В очереди производства", city: "Севастополь", item: "Дверь межкомнатная", messenger: "СМС", updatedAt: "2026-03-12T13:45:00Z" },
|
||
{ suffix: 110, customerName: "Михаил Орлов", status: "В производстве", city: "Симферополь", item: "Кухня линейная", messenger: "СМС", updatedAt: "2026-03-13T09:30:00Z" },
|
||
{ suffix: 111, customerName: "Татьяна Шубина", status: "В производстве", city: "Ялта", item: "Стеллаж", messenger: "СМС", updatedAt: "2026-03-12T15:20:00Z" },
|
||
{ suffix: 112, customerName: "Андрей Беляев", status: "В производстве", city: "Евпатория", item: "Фасады МДФ", messenger: "Эл. почта", updatedAt: "2026-03-14T07:55:00Z" },
|
||
{ suffix: 113, customerName: "Елена Бондарь", status: "Готов к отгрузке", city: "Симферополь", item: "Пенал для кухни", messenger: "СМС", updatedAt: "2026-03-14T05:15:00Z" },
|
||
{ suffix: 114, customerName: "Кирилл Нестеров", status: "Готов к отгрузке", city: "Ялта", item: "Стол письменный", messenger: "СМС", updatedAt: "2026-03-14T09:45:00Z" },
|
||
{ suffix: 115, customerName: "Наталья Зотова", status: "Готов к отгрузке", city: "Севастополь", item: "Шкаф угловой", messenger: "Эл. почта", updatedAt: "2026-03-13T18:05:00Z" },
|
||
{ suffix: 116, customerName: "Константин Матвеев", status: "Ожидает согласования доставки", city: "Симферополь", item: "Комод высокий", messenger: "СМС", updatedAt: "2026-03-14T08:05:00Z" },
|
||
{ suffix: 117, customerName: "Лариса Шевцова", status: "Ожидает согласования доставки", city: "Ялта", item: "Стеллаж модульный", messenger: "СМС", updatedAt: "2026-03-13T06:50:00Z" },
|
||
{ suffix: 118, customerName: "Евгений Филимонов", status: "Ожидает согласования доставки", city: "Севастополь", item: "Тумба под мойку", messenger: "СМС", updatedAt: "2026-03-12T08:15:00Z" },
|
||
{ suffix: 119, customerName: "Диана Рябова", status: "Доставка согласована", city: "Симферополь", item: "Навесной шкаф", messenger: "СМС", updatedAt: "2026-03-14T11:00:00Z" },
|
||
{ suffix: 120, customerName: "Олег Вишневский", status: "Доставка согласована", city: "Алушта", item: "Стол раскладной", messenger: "Эл. почта", updatedAt: "2026-03-14T04:20:00Z" },
|
||
{ suffix: 121, customerName: "Полина Исаева", status: "Назначен водитель", city: "Симферополь", item: "Кровать", messenger: "СМС", updatedAt: "2026-03-14T10:40:00Z" },
|
||
{ suffix: 122, customerName: "Роман Щукин", status: "Назначен водитель", city: "Ялта", item: "Прихожая", messenger: "Эл. почта", updatedAt: "2026-03-14T09:05:00Z" },
|
||
{ suffix: 123, customerName: "Юлия Баранова", status: "Загружен", city: "Севастополь", item: "Шкаф-пенал", messenger: "СМС", updatedAt: "2026-03-14T07:30:00Z" },
|
||
{ suffix: 124, customerName: "Виктор Громыко", status: "В пути", city: "Симферополь", item: "Гарнитур в прихожую", messenger: "СМС", updatedAt: "2026-03-14T11:20:00Z" },
|
||
{ suffix: 125, customerName: "Инна Самойлова", status: "Доставлен", city: "Евпатория", item: "Шкаф в ванную", messenger: "Эл. почта", updatedAt: "2026-03-14T12:05:00Z" },
|
||
];
|
||
|
||
const DELIVERY_STATUSES = new Set(["Назначен водитель", "Загружен", "В пути", "Доставлен", "Закрыт"]);
|
||
const LOGISTICS_OR_DELIVERY_STATUSES = new Set([
|
||
"Ожидает согласования доставки",
|
||
"Доставка согласована",
|
||
"Назначен водитель",
|
||
"Загружен",
|
||
"В пути",
|
||
"Доставлен",
|
||
"Закрыт",
|
||
]);
|
||
|
||
const getAgreementStatusForDemo = (status) => {
|
||
if (status === "Ожидает согласования доставки") {
|
||
return "Ожидание ответа";
|
||
}
|
||
if (status === "Доставка согласована" || DELIVERY_STATUSES.has(status)) {
|
||
return "Подтверждено клиентом";
|
||
}
|
||
return "Не начато";
|
||
};
|
||
|
||
const getDeliverySlotStatusForDemo = (status) => {
|
||
if (status === "Ожидает согласования доставки") {
|
||
return "Ожидает подтверждения";
|
||
}
|
||
if (status === "Доставка согласована" || status === "Назначен водитель") {
|
||
return "Подтверждён";
|
||
}
|
||
if (status === "Загружен" || status === "В пути") {
|
||
return "В рейсе";
|
||
}
|
||
if (status === "Доставлен" || status === "Закрыт") {
|
||
return "Завершён";
|
||
}
|
||
return "Черновик";
|
||
};
|
||
|
||
const buildExtraDemoOrder = (seed, index) => {
|
||
const logisticianId = index % 2 === 0 ? "u-logistics" : "u-logistics-2";
|
||
const assignedDriverId =
|
||
DELIVERY_STATUSES.has(seed.status) || seed.status === "Доставка согласована"
|
||
? "u-driver"
|
||
: null;
|
||
const scheduledDelivery = `2026-03-${String(16 + (index % 6)).padStart(2, "0")}T${index % 2 === 0 ? "09:00:00Z" : "13:00:00Z"}`;
|
||
|
||
return {
|
||
id: `o-extra-${seed.suffix}`,
|
||
orderNumber: `CD-24${seed.suffix}`,
|
||
customer: {
|
||
name: seed.customerName,
|
||
phone: `+7 978 100-${String(seed.suffix).padStart(3, "0")}`,
|
||
messenger: seed.messenger,
|
||
address: `${seed.city}, ул. Демо, ${10 + index}`,
|
||
},
|
||
status: seed.status,
|
||
deliveryAgreementStatus: getAgreementStatusForDemo(seed.status),
|
||
managerId: "u-manager",
|
||
logisticianIds: LOGISTICS_OR_DELIVERY_STATUSES.has(seed.status) ? [logisticianId] : [],
|
||
assignedDriverId,
|
||
driverRouteOrder: assignedDriverId ? (index % 6) + 1 : null,
|
||
createdAt: `2026-03-${String(9 + (index % 5)).padStart(2, "0")}T${String((index % 5) + 7).padStart(2, "0")}:00:00Z`,
|
||
updatedAt: seed.updatedAt,
|
||
scheduledDelivery,
|
||
items: [`${seed.item} | 1 шт`, "Комплект фурнитуры | 1 набор"],
|
||
tags: [seed.city.toLowerCase(), seed.status.toLowerCase()],
|
||
comments: [`Демо-заказ для проверки нагрузки на статусе «${seed.status}».`],
|
||
orderNotes: [
|
||
{
|
||
id: `note-extra-${seed.suffix}`,
|
||
authorName: "Система",
|
||
text: `Контрольная демо-запись для этапа «${seed.status}».`,
|
||
createdAt: seed.updatedAt,
|
||
},
|
||
],
|
||
history: [
|
||
{
|
||
id: `history-extra-${seed.suffix}`,
|
||
action: "Демо-переход",
|
||
oldStatus: null,
|
||
newStatus: seed.status,
|
||
userName: "Система",
|
||
at: seed.updatedAt,
|
||
},
|
||
],
|
||
chatMessages:
|
||
seed.status === "Ожидает согласования доставки"
|
||
? [
|
||
{
|
||
id: `chat-extra-${seed.suffix}`,
|
||
sender: "bot",
|
||
channel: seed.messenger,
|
||
text: `Клиенту отправлено согласование по заказу CD-24${seed.suffix}.`,
|
||
sentAt: seed.updatedAt,
|
||
},
|
||
]
|
||
: [],
|
||
internalMessages: [
|
||
{
|
||
id: `internal-extra-${seed.suffix}`,
|
||
senderId: logisticianId,
|
||
senderName: logisticianId === "u-logistics" ? "Ольга Синицына" : "Павел Миронов",
|
||
text: `Демо-комментарий для статуса «${seed.status}».`,
|
||
sentAt: seed.updatedAt,
|
||
},
|
||
],
|
||
deliverySlots: LOGISTICS_OR_DELIVERY_STATUSES.has(seed.status)
|
||
? [
|
||
{
|
||
id: `slot-extra-${seed.suffix}`,
|
||
date: scheduledDelivery.slice(0, 10),
|
||
time: index % 2 === 0 ? "Первая половина дня" : "Вторая половина дня",
|
||
logisticianId,
|
||
status: getDeliverySlotStatusForDemo(seed.status),
|
||
},
|
||
]
|
||
: [],
|
||
exception: seed.status === "Проблема доставки" ? "Требуется ручной разбор логистом" : null,
|
||
};
|
||
};
|
||
|
||
const extraDemoOrders = extraOrderSeeds.map(buildExtraDemoOrder);
|
||
|
||
export const demoOrders = [...baseDemoOrders, ...extraDemoOrders];
|
||
|
||
export const demoOrderGroups = [
|
||
{
|
||
id: "953c5bda-7e77-47af-9b7f-9d2c2cf3e7c5",
|
||
groupKey: "3939375462|14.04.26",
|
||
customerName: "Калинина Дарья Егоровна",
|
||
customerPhone: "3939375462",
|
||
customerDate: "14.04.26",
|
||
ordersCount: 1,
|
||
readyCount: 1,
|
||
notReadyCount: 0,
|
||
orderNumbers: ["СФ Т\\ЕА-23094"],
|
||
status: "ready_for_notification",
|
||
deliveryStatus: "agreed",
|
||
deliveryHalfDay: "Первая половина дня",
|
||
smsSentAt: null,
|
||
createdFromExchangeAt: null,
|
||
sourceKey: null,
|
||
legacyCustomerName: null,
|
||
legacyCustomerPhone: null,
|
||
legacyCustomerPhoneNormalized: null,
|
||
legacyCustomerDate: null,
|
||
legacyOrdersTotal: null,
|
||
legacyOrdersReady: null,
|
||
legacyOrdersNotReady: null,
|
||
sourceOrders: null,
|
||
createdAt: "2026-05-05T09:43:53.750061+00:00",
|
||
updatedAt: "2026-05-05T09:43:53.750061+00:00",
|
||
},
|
||
{
|
||
id: "6420ea0d-7a4d-4a18-94cc-7d6d0a4a22ac",
|
||
groupKey: "2263561168|17.04.26",
|
||
customerName: "Петров Константин Владимирович",
|
||
customerPhone: "2263561168",
|
||
customerDate: "17.04.26",
|
||
ordersCount: 2,
|
||
readyCount: 2,
|
||
notReadyCount: 0,
|
||
orderNumbers: ["СФ Т\\ЕА-21974", "СФ Т\\ЕА-21975"],
|
||
status: "ready_for_notification",
|
||
deliveryStatus: "driver_assigned",
|
||
deliveryHalfDay: "Вторая половина дня",
|
||
smsSentAt: "2026-05-05T11:10:00+00:00",
|
||
createdFromExchangeAt: "2026-05-05T09:20:00+00:00",
|
||
sourceKey: "1c-21974",
|
||
legacyCustomerName: null,
|
||
legacyCustomerPhone: null,
|
||
legacyCustomerPhoneNormalized: null,
|
||
legacyCustomerDate: null,
|
||
legacyOrdersTotal: null,
|
||
legacyOrdersReady: null,
|
||
legacyOrdersNotReady: null,
|
||
sourceOrders: null,
|
||
createdAt: "2026-05-05T09:43:53.750061+00:00",
|
||
updatedAt: "2026-05-05T11:10:00+00:00",
|
||
},
|
||
{
|
||
id: "2e5c0ca6-dbd9-4dfd-95ca-f449b8d12a24",
|
||
groupKey: "8926690125|17.03.26",
|
||
customerName: "Иванов Степан Дмитриевич",
|
||
customerPhone: "8926690125",
|
||
customerDate: "17.03.26",
|
||
ordersCount: 1,
|
||
readyCount: 0,
|
||
notReadyCount: 1,
|
||
orderNumbers: ["СФ Т\\ЕА-16477"],
|
||
status: "manual_work",
|
||
deliveryStatus: "pending_confirmation",
|
||
smsSentAt: null,
|
||
createdFromExchangeAt: null,
|
||
sourceKey: "1c-16477",
|
||
legacyCustomerName: null,
|
||
legacyCustomerPhone: null,
|
||
legacyCustomerPhoneNormalized: null,
|
||
legacyCustomerDate: null,
|
||
legacyOrdersTotal: null,
|
||
legacyOrdersReady: null,
|
||
legacyOrdersNotReady: null,
|
||
sourceOrders: null,
|
||
createdAt: "2026-05-05T09:43:53.750061+00:00",
|
||
updatedAt: "2026-05-05T09:43:53.750061+00:00",
|
||
},
|
||
{
|
||
id: "30108722-e37b-424e-8307-328f7d80706e",
|
||
groupKey: "4227515073|11.04.26",
|
||
customerName: "Романов Кирилл Викторович",
|
||
customerPhone: "4227515073",
|
||
customerDate: "11.04.26",
|
||
ordersCount: 3,
|
||
readyCount: 3,
|
||
notReadyCount: 0,
|
||
orderNumbers: ["СФ Т\\ЕА-23120", "СФ Т\\ЕА-23123", "СФ Т\\ЕА-23129"],
|
||
status: "ready_for_notification",
|
||
deliveryStatus: "loaded",
|
||
deliveryHalfDay: "Первая половина дня",
|
||
smsSentAt: null,
|
||
createdFromExchangeAt: null,
|
||
sourceKey: "1c-23120",
|
||
legacyCustomerName: null,
|
||
legacyCustomerPhone: null,
|
||
legacyCustomerPhoneNormalized: null,
|
||
legacyCustomerDate: null,
|
||
legacyOrdersTotal: null,
|
||
legacyOrdersReady: null,
|
||
legacyOrdersNotReady: null,
|
||
sourceOrders: null,
|
||
createdAt: "2026-05-05T09:43:53.750061+00:00",
|
||
updatedAt: "2026-05-05T09:43:53.750061+00:00",
|
||
},
|
||
{
|
||
id: "78a5db18-c603-4317-bfdb-989a69979e9a",
|
||
groupKey: "6206926364|20.04.26",
|
||
customerName: "Антонов Ярослав",
|
||
customerPhone: "6206926364",
|
||
customerDate: "20.04.26",
|
||
ordersCount: 1,
|
||
readyCount: 1,
|
||
notReadyCount: 0,
|
||
orderNumbers: ["СФ Т\\ЕА-24508"],
|
||
status: "sms_sent",
|
||
deliveryStatus: "on_route",
|
||
deliveryHalfDay: "Вторая половина дня",
|
||
smsSentAt: "2026-05-05T12:45:00+00:00",
|
||
createdFromExchangeAt: null,
|
||
sourceKey: null,
|
||
legacyCustomerName: null,
|
||
legacyCustomerPhone: null,
|
||
legacyCustomerPhoneNormalized: null,
|
||
legacyCustomerDate: null,
|
||
legacyOrdersTotal: null,
|
||
legacyOrdersReady: null,
|
||
legacyOrdersNotReady: null,
|
||
sourceOrders: null,
|
||
createdAt: "2026-05-05T09:43:53.750061+00:00",
|
||
updatedAt: "2026-05-05T12:45:00+00:00",
|
||
},
|
||
];
|
||
|
||
export const demoNotifications = [
|
||
{
|
||
id: "n-1",
|
||
type: "warning",
|
||
title: "Ожидается ответ клиента",
|
||
description: "CD-240031: клиенту отправлено согласование доставки, ответ ещё не получен.",
|
||
},
|
||
{
|
||
id: "n-2",
|
||
type: "success",
|
||
title: "Доставка подтверждена",
|
||
description: "CD-240034: клиент подтвердил доставку на вторую половину дня.",
|
||
},
|
||
{
|
||
id: "n-3",
|
||
type: "error",
|
||
title: "Нет ответа клиента",
|
||
description: "CD-240033: требуется ручная обработка логистом.",
|
||
},
|
||
{
|
||
id: "n-4",
|
||
type: "success",
|
||
title: "Заказ готов к отгрузке",
|
||
description: "CD-240032: производство завершено, можно запускать согласование доставки.",
|
||
},
|
||
];
|