feat: hourly pricing + category base prices in booking modal + availability grid
- Add hourly_price column to rate_overrides, base_price/allow_hourly/hourly_base_price to room_categories (migration 033) - Update categories and rate-overrides backend routes to handle new fields - AvailabilityPage: hourly/nightly mode toggle, period prices auto-applied to grid with 'П' indicator, confirmation dialog when overriding period prices - BookingModal: nightly/hourly toggle at top, pricing hierarchy (override → category base → room rate) - RoomCategoriesPage: base_price/allow_hourly/hourly_base_price fields in category form; inline rooms panel - CalendarPage + BookingCalendar: pass hourlyPriceOverrides and categoryBasePrices down to BookingModal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
9
backend/migrations/033_category_pricing.sql
Normal file
9
backend/migrations/033_category_pricing.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Category pricing fields
|
||||
ALTER TABLE room_categories
|
||||
ADD COLUMN IF NOT EXISTS base_price INTEGER NOT NULL DEFAULT 0,
|
||||
ADD COLUMN IF NOT EXISTS allow_hourly BOOLEAN NOT NULL DEFAULT false,
|
||||
ADD COLUMN IF NOT EXISTS hourly_base_price INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- Hourly price override per date in availability grid
|
||||
ALTER TABLE rate_overrides
|
||||
ADD COLUMN IF NOT EXISTS hourly_price INTEGER;
|
||||
Reference in New Issue
Block a user