Rental: connect to API, improve cell UI; remove price from room labels

Backend:
- Migration 015_rental.sql: rental_objects + rental_bookings tables, seed demo data
- New routes: GET/POST/PATCH/DELETE rental-objects and rental-bookings per hotel
- Register rentalRoutes in app.ts

Frontend:
- api.ts: add rental.listObjects, listBookings, createBooking, updateBooking, deleteBooking
- CalendarPage: fetch rental objects + bookings from API instead of mock data
- BookingCalendar: rental cell UI redesigned — colored squares + working hours + time slots (matches design spec)
- BookingCalendar: remove base rate price from desktop room label column (irrelevant with dynamic pricing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 15:46:01 +03:00
parent 3f4d0dac4c
commit b48e50e62b
6 changed files with 396 additions and 43 deletions

View File

@@ -19,6 +19,7 @@ import netupRoutes from './routes/netup'
import guestsRoutes from './routes/guests'
import bookingGuestsRoutes from './routes/booking-guests'
import hotelSettingsRoutes from './routes/hotel-settings'
import rentalRoutes from './routes/rental'
export async function buildApp() {
const fastify = Fastify({
@@ -79,6 +80,7 @@ export async function buildApp() {
await fastify.register(guestsRoutes)
await fastify.register(bookingGuestsRoutes)
await fastify.register(hotelSettingsRoutes)
await fastify.register(rentalRoutes)
return fastify
}