feat: checklists, minibar and deposit modules
- DB migrations 057-059: checklist_templates/items/completions, minibar_items/consumptions, hotel_deposit_settings, booking_deposits - Backend routes: checklists (templates CRUD + task completions), minibar (items + consumptions), deposit (settings, cash/yookassa hold, release/capture) - YooKassa service for hold/capture/cancel payments - Frontend: ChecklistSettingsPage, MinibarSettingsPage, DepositSettingsPage - HousekeepingPage: task cards now show checklist + minibar panel with checkboxes and quantity buttons - BookingModal: minibar charges summary + deposit management (cash/YooKassa/release) for existing bookings - Sidebar + App.tsx: new routes /settings/checklists, /settings/minibar, /settings/deposit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
22
backend/migrations/058_minibar.sql
Normal file
22
backend/migrations/058_minibar.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
CREATE TABLE minibar_items (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
hotel_id UUID NOT NULL REFERENCES hotels(id) ON DELETE CASCADE,
|
||||
name TEXT NOT NULL,
|
||||
price NUMERIC(10,2) NOT NULL DEFAULT 0,
|
||||
category TEXT,
|
||||
is_active BOOLEAN NOT NULL DEFAULT true,
|
||||
sort_order INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
CREATE TABLE minibar_consumptions (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
hotel_id UUID NOT NULL REFERENCES hotels(id),
|
||||
room_id UUID NOT NULL REFERENCES rooms(id),
|
||||
booking_id UUID REFERENCES bookings(id),
|
||||
task_id UUID REFERENCES housekeeping_tasks(id),
|
||||
item_id UUID NOT NULL REFERENCES minibar_items(id),
|
||||
quantity INTEGER NOT NULL DEFAULT 1,
|
||||
price_per_unit NUMERIC(10,2) NOT NULL,
|
||||
recorded_by UUID REFERENCES users(id),
|
||||
recorded_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
Reference in New Issue
Block a user