Add availability calendar to property detail page
All checks were successful
Build frontend / build (push) Successful in 42s
All checks were successful
Build frontend / build (push) Successful in 42s
- Fetches available date ranges from /Reservations/GetAvailableDates/available/{id}
- Custom month calendar with green (available), amber (selected), gray (unavailable)
- Click start date then end date to select a range
- Validates entire range is available before confirming
- Shows selected dates and day count
- Month navigation with prev/next arrows
This commit is contained in:
@ -128,6 +128,11 @@ export async function getTopRecommendations(count = 10) {
|
||||
|
||||
// ─── Reservations ───
|
||||
|
||||
export async function getAvailableDateRanges(propertyId) {
|
||||
console.log('[API] Fetching available dates for property:', propertyId);
|
||||
return apiFetch(`/Reservations/GetAvailableDates/available/${propertyId}`);
|
||||
}
|
||||
|
||||
export async function getReservations() {
|
||||
return apiFetch('/Reservations/GetReservations');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user