feat: maintenance/blocked date ranges with booking overlap warning
- DB migration 020: add maintenance_from, maintenance_to to rooms - Room type + RoomPayload: maintenanceFrom, maintenanceTo fields - Context menu: clicking "На ремонт"/"Закрыт" expands inline date picker (С / По + "Без срока" checkbox), confirms with "Применить" button - Calendar: stripe overlay covers only the maintenance date range (full row if no dates set, partial if date range specified) - Booking creation: if drag-selected dates overlap with maintenance period, shows warning dialog with "Отмена" / "Всё равно забронировать" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
3
backend/migrations/020_room_maintenance_dates.sql
Normal file
3
backend/migrations/020_room_maintenance_dates.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Add maintenance/blocked date range columns to rooms
|
||||
ALTER TABLE rooms ADD COLUMN IF NOT EXISTS maintenance_from DATE;
|
||||
ALTER TABLE rooms ADD COLUMN IF NOT EXISTS maintenance_to DATE;
|
||||
@@ -143,6 +143,7 @@ const rooms: FastifyPluginAsync = async (fastify) => {
|
||||
'housekeeping_status', 'sort_order', 'allow_hourly', 'hourly_rate',
|
||||
'extra_place', 'child_policy', 'description', 'photos',
|
||||
'early_checkin_fee', 'late_checkout_fee',
|
||||
'maintenance_from', 'maintenance_to',
|
||||
]
|
||||
const updates: string[] = []
|
||||
const values: unknown[] = []
|
||||
|
||||
Reference in New Issue
Block a user