feat: calendar hover price tooltip + AvailabilityPage API integration

- Calendar cells: hold mouse 600ms to show price tooltip for that date/room (baseRate + hourly rate if enabled)
- AvailabilityPage: load real categories from API, derive basePrice from room baseRates, fall back to room types if no categories
- Rate periods: persisted to DB via new /api/hotels/:slug/rate-periods endpoint
- New backend migration 021_rate_periods.sql + rate-periods route
- Added api.ratePeriods.{list,create,update,delete} to frontend API client

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 15:05:12 +03:00
parent 63da3d21cc
commit c3a30be74e
6 changed files with 411 additions and 45 deletions

View File

@@ -25,6 +25,7 @@ import hotelSettingsRoutes from './routes/hotel-settings'
import rentalRoutes from './routes/rental'
import categoriesRoutes from './routes/categories'
import tariffsRoutes from './routes/tariffs'
import ratePeriodsRoutes from './routes/rate-periods'
import uploadRoutes from './routes/upload'
export async function buildApp() {
@@ -95,6 +96,7 @@ export async function buildApp() {
await fastify.register(rentalRoutes)
await fastify.register(categoriesRoutes)
await fastify.register(tariffsRoutes)
await fastify.register(ratePeriodsRoutes)
await fastify.register(uploadRoutes)
return fastify