Add beds constructor, extra places and child policy to room modal
- New types: BedItem, ExtraPlace, ChildPolicy on Room interface
- New 'Места' tab in RoomModal with 3 sections:
· Beds constructor: add/remove/count any combo of bed types (1-sp, 2-sp,
queen, king, twin, sofa, bunk, cot) with emoji icons and ±1 steppers
· Extra places: toggle + count (max 5) + price per night
· Child policy: toggle + free-under-age stepper + charge-from-age stepper
with green/amber visual cards and summary text
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,25 @@ export type RoomStatus = 'available' | 'occupied' | 'maintenance' | 'blocked'
|
||||
export type HousekeepingStatus = 'clean' | 'dirty' | 'cleaning' | 'inspect'
|
||||
export type BedType = 'single' | 'double' | 'queen' | 'king' | 'twin'
|
||||
|
||||
export type BedItemType = 'single' | 'double' | 'queen' | 'king' | 'twin' | 'sofa' | 'bunk' | 'cot'
|
||||
|
||||
export interface BedItem {
|
||||
type: BedItemType
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface ExtraPlace {
|
||||
enabled: boolean
|
||||
count: number // max extra places available
|
||||
price: number // price per extra place per night
|
||||
}
|
||||
|
||||
export interface ChildPolicy {
|
||||
enabled: boolean
|
||||
freeUnderAge: number // children strictly under this age stay free
|
||||
chargeFromAge: number // children this age and above pay for extra place
|
||||
}
|
||||
|
||||
export interface RoomCategory {
|
||||
id: string
|
||||
hotelId: string
|
||||
@@ -71,6 +90,9 @@ export interface Room {
|
||||
description?: string
|
||||
photos?: string[]
|
||||
categoryId?: string
|
||||
beds?: BedItem[]
|
||||
extraPlace?: ExtraPlace
|
||||
childPolicy?: ChildPolicy
|
||||
}
|
||||
|
||||
export interface DocumentTemplate {
|
||||
|
||||
Reference in New Issue
Block a user