From 57162c55c6face4bd310afe8aaf9aa27af9636b2 Mon Sep 17 00:00:00 2001 From: HotelSync Date: Tue, 17 Mar 2026 14:05:35 +0300 Subject: [PATCH] Fix calendar rental objects label: compact price, fixed row height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/components/calendar/BookingCalendar.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/calendar/BookingCalendar.tsx b/src/components/calendar/BookingCalendar.tsx index 24d98d8..a134054 100644 --- a/src/components/calendar/BookingCalendar.tsx +++ b/src/components/calendar/BookingCalendar.tsx @@ -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 (
+ style={{ height: rentalRowH }}> {/* Label */}
- {obj.icon} + {obj.icon}
-

{obj.name}

-

- {obj.pricePerHour.toLocaleString('ru-RU')} ₽/ч · {obj.pricePerDay.toLocaleString('ru-RU')} ₽/день +

{obj.name}

+

+ {obj.pricePerHour.toLocaleString('ru-RU')} ₽/ч · {obj.pricePerDay.toLocaleString('ru-RU')} ₽/д

@@ -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 */