w-funnel/src/lib/admin/utils/constants.ts
dev.daminik00 92d70cf371 ref
2025-10-01 00:39:54 +02:00

39 lines
1.2 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.

/**
* Константы для админки
*/
export type FunnelStatus = 'draft' | 'published' | 'archived';
export const FUNNEL_STATUS_CONFIG = {
draft: {
label: 'Черновик',
color: 'yellow',
className: 'bg-yellow-100 text-yellow-800 border-yellow-200',
},
published: {
label: 'Опубликована',
color: 'green',
className: 'bg-green-100 text-green-800 border-green-200',
},
archived: {
label: 'Архивирована',
color: 'gray',
className: 'bg-gray-100 text-gray-800 border-gray-200',
},
} as const;
export const SORT_OPTIONS = [
{ value: 'updatedAt-desc', label: 'Сначала новые' },
{ value: 'updatedAt-asc', label: 'Сначала старые' },
{ value: 'name-asc', label: 'По названию А-Я' },
{ value: 'name-desc', label: 'По названию Я-А' },
{ value: 'usage.totalViews-desc', label: 'По популярности' },
] as const;
export const STATUS_FILTER_OPTIONS = [
{ value: 'all', label: 'Все статусы' },
{ value: 'draft', label: 'Черновики' },
{ value: 'published', label: 'Опубликованные' },
{ value: 'archived', label: 'Архивированные' },
] as const;