/
afanasevn
/
MaxSystems
Обзор
Документация
Войти
/
afanasevn
/
MaxSystems
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
client/src/lib/integrationDeliveryLabels.ts
61 строка
2 KB
IBS\NAfanasev
Integration delivery UI
22 июн 2026, 18:55
22 июн 2026, 18:55
ff9f4c2
Код
Авторство
О чём код?
import type { IntegrationDeliveryStatus } from '@/api/integrationDeliveries' import type { BadgeVariant } from '@/lib/workLabels' export const integrationDeliveryStatusLabels: Record<IntegrationDeliveryStatus, string> = { Pending: 'Ожидает', Processing: 'Обработка', Delivered: 'Доставлено', Failed: 'Ошибка', DeadLettered: 'Dead letter', } export function integrationDeliveryStatusVariant(status: IntegrationDeliveryStatus): BadgeVariant { switch (status) { case 'Pending': return 'secondary' case 'Processing': return 'info' case 'Delivered': return 'success' case 'Failed': return 'destructive' case 'DeadLettered': return 'purple' default: return 'secondary' } } export const integrationQueueLabels: Record<string, string> = { 'integration.servicedesk': 'Service Desk', 'integration.notifications': 'Уведомления', } export const integrationEventTypeLabels: Record<string, string> = { 'work.created': 'Работа создана', 'work.status.changed': 'Статус работы', 'work.assignee.changed': 'Исполнитель работы', 'maintenance.overdue': 'Просрочка ТО', 'maintenance.work.scheduled': 'Плановая работа ТО', } export const INTEGRATION_QUEUES = [ 'integration.servicedesk', 'integration.notifications', ] as const export const INTEGRATION_EVENT_TYPES = [ 'work.created', 'work.status.changed', 'work.assignee.changed', 'maintenance.overdue', 'maintenance.work.scheduled', ] as const export const INTEGRATION_STATUSES: IntegrationDeliveryStatus[] = [ 'Pending', 'Processing', 'Delivered', 'Failed', 'DeadLettered', ]