- Migrations 086-088: room_service_settings, menu_items, orders+order_items - Backend: /api/hotels/:slug/room-service/* routes (settings, menu CRUD, orders CRUD, public config, public order status) - push.ts: sendPushToHotel() — push to all hotel staff on new order - On new order: in-app notification + push to hotel staff - api.ts: RoomService types + roomService API methods - RoomServicePage: replaced mocked state with real API, 30s polling, add/edit/delete menu items modal, real advance/cancel order - GuestRoomServicePage: fetches real menu + config, uses hotel payment methods, submits real order, polls status every 15s Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
467 B
SQL
13 lines
467 B
SQL
-- Migration 086 — Room Service: settings per hotel
|
|
|
|
CREATE TABLE room_service_settings (
|
|
hotel_id UUID PRIMARY KEY REFERENCES hotels(id) ON DELETE CASCADE,
|
|
is_active BOOLEAN NOT NULL DEFAULT true,
|
|
service_charge_pct INTEGER NOT NULL DEFAULT 0,
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
-- Auto-create settings for existing hotels
|
|
INSERT INTO room_service_settings (hotel_id)
|
|
SELECT id FROM hotels ON CONFLICT DO NOTHING;
|