Fix calendar rental objects label: compact price, fixed row height

- Abbreviate price to ₽/д (fits in label width without wrapping)
- Rental rows always use normal height (56px min) regardless of compact mode
- Whitespace-nowrap on price line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 14:05:35 +03:00
parent 40e4c04f44
commit 57162c55c6

View File

@@ -496,20 +496,21 @@ export function BookingCalendar({ rooms, bookings, onBookingCreate, onBookingUpd
{/* Rental object rows */}
{rentalObjects.map(obj => {
const totalSpan = obj.closeHour - obj.openHour
const rentalRowH = Math.max(rowHeight, ROW_HEIGHT)
return (
<div key={obj.id}
className="flex border-b border-slate-200 dark:border-slate-700"
style={{ height: rowHeight }}>
style={{ height: rentalRowH }}>
{/* Label */}
<div
className="shrink-0 sticky left-0 z-10 bg-white dark:bg-slate-800 border-r border-slate-200 dark:border-slate-700 flex items-center gap-2 px-3"
style={{ width: LABEL_WIDTH }}
>
<span className="text-lg">{obj.icon}</span>
<span className="text-base leading-none shrink-0">{obj.icon}</span>
<div className="min-w-0">
<p className="text-sm font-medium text-slate-800 dark:text-slate-200 truncate">{obj.name}</p>
<p className="text-xs text-slate-400">
{obj.pricePerHour.toLocaleString('ru-RU')} /ч · {obj.pricePerDay.toLocaleString('ru-RU')} /день
<p className="text-sm font-medium text-slate-800 dark:text-slate-200 truncate leading-tight">{obj.name}</p>
<p className="text-[10px] text-slate-400 whitespace-nowrap leading-tight mt-0.5">
{obj.pricePerHour.toLocaleString('ru-RU')} /ч · {obj.pricePerDay.toLocaleString('ru-RU')} /д
</p>
</div>
</div>
@@ -534,7 +535,7 @@ export function BookingCalendar({ rooms, bookings, onBookingCreate, onBookingUpd
isWe && 'bg-amber-50/30 dark:bg-amber-900/10',
isTod && 'bg-brand-50/40 dark:bg-brand-900/10',
)}
style={{ width: CELL_WIDTH, height: rowHeight }}
style={{ width: CELL_WIDTH, height: rentalRowH }}
>
{hasFullDay ? (
/* Full day booking */