RentalBookingModal: guest search autocomplete + link to room booking

- Guest name field shows dropdown with matching guests from all bookings
- Checked-in guests (🏠) shown first, then confirmed (📅)
- Selecting a guest auto-fills name and phone
- New 'Привязать к номеру' dropdown to link rental to a room booking
- Selecting a linked room auto-fills guest name if empty
- Pass bookings + rooms props from BookingCalendar to modal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 15:56:13 +03:00
parent b48e50e62b
commit 68c9caf46f
2 changed files with 139 additions and 29 deletions

View File

@@ -793,6 +793,8 @@ export function BookingCalendar({ rooms, bookings, slug, onBookingCreate, onBook
existingBookings={(rentalBookings ?? []).filter(
b => b.objectId === rentalModal.obj.id && b.date === rentalModal.date,
)}
bookings={bookings}
rooms={rooms}
onClose={() => setRentalModal(null)}
onSave={(b) => {
onRentalBookingCreate?.(b)