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:
@@ -442,6 +442,7 @@ export interface RoomPayload {
|
||||
extraPlace?: unknown; childPolicy?: unknown
|
||||
description?: string; photos?: string[]
|
||||
earlyCheckinFee?: number | null; lateCheckoutFee?: number | null
|
||||
maintenanceFrom?: string | null; maintenanceTo?: string | null
|
||||
}
|
||||
|
||||
function toRoomPayload(r: Partial<RoomPayload>): Record<string, unknown> {
|
||||
@@ -467,6 +468,8 @@ function toRoomPayload(r: Partial<RoomPayload>): Record<string, unknown> {
|
||||
if (r.photos !== undefined) out.photos = r.photos
|
||||
if (r.earlyCheckinFee !== undefined) out.early_checkin_fee = r.earlyCheckinFee
|
||||
if (r.lateCheckoutFee !== undefined) out.late_checkout_fee = r.lateCheckoutFee
|
||||
if (r.maintenanceFrom !== undefined) out.maintenance_from = r.maintenanceFrom
|
||||
if (r.maintenanceTo !== undefined) out.maintenance_to = r.maintenanceTo
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user