refactor(booking): remove maintenance-related metrics and UI components

This commit is contained in:
Jose Selesan
2026-06-08 15:28:49 -03:00
parent b48dd4f15d
commit b2f9a14b87
10 changed files with 19 additions and 95 deletions

View File

@@ -39,7 +39,6 @@ import {
Sun,
Trophy,
Users,
Wrench,
Zap,
} from 'lucide-react';
import { useEffect, useMemo, useRef, useState } from 'react';
@@ -376,7 +375,6 @@ function Legend() {
<div className="flex flex-wrap gap-4 text-xs text-white/70">
<LegendDot color="bg-emerald-500" label="Libre" />
<LegendDot color="bg-blue-500" label="Reservado" />
<LegendDot color="bg-red-500" label="Mantenimiento" />
</div>
);
}
@@ -1134,19 +1132,13 @@ function BookingTimeline({
const left = ((end - range.start) / total) * 100;
const width = ((Math.min(nextStart, range.end) - end) / total) * 100;
const maintenance = index % 2 === 1;
return (
<div
key={`${court?.courtId}-blocked-${slot.startTime}`}
className={`absolute top-7 flex h-12 min-w-[44px] items-center justify-center rounded border ${
maintenance
? 'border-red-500/80 bg-red-500/28 text-red-100'
: 'border-blue-500/70 bg-blue-500/24 text-blue-100'
}`}
className="absolute top-7 flex h-12 min-w-[44px] items-center justify-center rounded border border-blue-500/70 bg-blue-500/24 text-blue-100"
style={{ left: `${left}%`, width: `${Math.max(width - 0.8, 4.5)}%` }}
>
{maintenance ? <Wrench className="size-4" /> : <Lock className="size-4" />}
<Lock className="size-4" />
</div>
);
})}