- Add is_blacklisted column to guests (migration 068) - POST /widget/bookings: block blacklisted guests (403, generic message) - GET /widget/:slug/guests/lookup: find existing guest by email/phone for auto-fill - Widget form: debounce guest lookup on email/phone input, show "Заполнить" suggestion - Widget payment screen: replace fake card form with proper YooKassa redirect screen or bank transfer details page - Add bank transfer details field to widget settings (saved as widget_bank_details) - GuestsPage: blacklist toggle button in edit modal + 🚫 ЧС badge in table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9 lines
269 B
SQL
9 lines
269 B
SQL
-- Migration 068 — Add is_blacklisted flag to guests
|
|
|
|
ALTER TABLE guests
|
|
ADD COLUMN IF NOT EXISTS is_blacklisted BOOLEAN NOT NULL DEFAULT FALSE;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_guests_blacklisted
|
|
ON guests(hotel_id, is_blacklisted)
|
|
WHERE is_blacklisted = TRUE;
|