Fix: rental booking save (date comparison), add DB guest search in rental modal
- BookingCalendar: normalize date comparison with .slice(0,10) to fix PostgreSQL DATE ISO format mismatch - CalendarPage: show alert on rental booking save failure - RentalBookingModal: add debounced DB guest search (api.guests.list) with 300ms delay - RentalBookingModal: combine booking suggestions + DB results in unified dropdown - Pass slug prop to RentalBookingModal for API access Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -159,6 +159,8 @@ export function CalendarPage() {
|
||||
setRentalBookings(prev => [...prev, created])
|
||||
} catch (err) {
|
||||
console.error('Failed to create rental booking:', err)
|
||||
const msg = err instanceof Error ? err.message : 'Ошибка сохранения аренды'
|
||||
alert(msg)
|
||||
}
|
||||
}, [slug])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user