fix: schedule status system — auto-key, config order, label lookup

- Auto-generate status key from label (admin doesn't need to set keys)
- Remove visible key field from status config editor
- Order statuses/levels in filters by config order (matches admin panel)
- Shared findStatusConfig() for robust label lookup (by key, label, or derived key)
- Custom status badges in DayCard, GroupCard, MobileSchedule
- Simplified filter logic with clsStatus helper
- Removed dead code: TIME_PRESETS, StatusFilter type
- SelectField: blur input after selection to prevent re-open
This commit is contained in:
2026-03-28 00:33:55 +03:00
parent b322c969f2
commit bdeedcfcc8
9 changed files with 102 additions and 37 deletions
+9
View File
@@ -11,6 +11,8 @@ export interface GroupCardProps {
level?: string;
recruiting?: boolean;
hasSlots?: boolean;
status?: string;
statusLabel?: string;
address?: string;
location?: string;
merged: GroupCardSlot[];
@@ -32,6 +34,8 @@ export function GroupCard({
level,
recruiting,
hasSlots,
status,
statusLabel,
address,
location,
merged,
@@ -85,6 +89,11 @@ export function GroupCard({
набор
</span>
)}
{status && status !== "hasSlots" && status !== "recruiting" && (
<span className={`rounded-full bg-gold/15 border border-gold/25 ${badgeSize} font-semibold text-gold`}>
{statusLabel || status}
</span>
)}
{showLocation && (address || location) && (
<span className={`inline-flex items-center gap-1 rounded-full bg-white/[0.04] border border-white/[0.08] ${locSize} font-medium text-white/40`}>
<MapPin size={locIcon} />