fix: toggle CSS + guest autocomplete in BookingModal rental tab
- Toggle: add type=button, overflow-hidden, p-0, explicit left-[2px] + translate-x-[18px] pattern for reliable knob positioning across all toggles - Guest field in BookingModal rental tab: add debounced DB search (api.guests.list) + suggestions dropdown (same as RentalBookingModal) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -261,16 +261,17 @@ export function RentalBookingModal({
|
||||
<span className="text-xs text-slate-400">Есть частичные брони</span>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => (!hasTimedConflict && !hasFullDayConflict) && setIsFullDay(v => !v)}
|
||||
className={cn(
|
||||
'relative rounded-full transition-colors shrink-0',
|
||||
'relative rounded-full overflow-hidden transition-colors shrink-0 p-0',
|
||||
isFullDay ? 'bg-brand-600' : 'bg-slate-200 dark:bg-slate-600',
|
||||
)}
|
||||
style={{ height: 22, width: 40 }}
|
||||
>
|
||||
<span className={cn(
|
||||
'absolute top-0.5 w-4 h-4 rounded-full bg-white shadow transition-transform',
|
||||
isFullDay ? 'translate-x-5' : 'translate-x-0.5',
|
||||
'absolute top-[3px] left-[2px] w-4 h-4 rounded-full bg-white shadow transition-transform duration-200',
|
||||
isFullDay ? 'translate-x-[18px]' : 'translate-x-0',
|
||||
)} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user