+
+ Депозит
+
+
+ {yookassaMsg && (
+
+ {yookassaMsg}
+
+ )}
+
+ {/* No deposit yet */}
+ {deposit === null && (
+
+
+ Сумма: {formatCurrency(depositSettings.amount)}
+
+
+
+ {depositSettings.yookassaShopId && (
+
+ )}
+
+
+ )}
+
+ {/* hold_created — awaiting card payment */}
+ {deposit?.status === 'hold_created' && (
+
+
+ Ожидает оплаты по карте
+
+
+
+ https://app.hotelsync.ru/{slug}/pay
+
+
+
+
QR-код на ресепшене активен
+
+
+ )}
+
+ {/* hold_confirmed — held on card */}
+ {deposit?.status === 'hold_confirmed' && (
+
+
+ ✓ Холд подтверждён
+
+
{formatCurrency(deposit.amount)}
+ {!showReleaseForm && (
+
+ )}
+
+ )}
+
+ {/* paid_cash */}
+ {deposit?.status === 'paid_cash' && (
+
+
+ ✓ Наличными
+
+
{formatCurrency(deposit.amount)}
+ {!showReleaseForm && (
+
+ )}
+
+ )}
+
+ {/* Release form */}
+ {showReleaseForm && deposit && (deposit.status === 'hold_confirmed' || deposit.status === 'paid_cash') && (
+
+
Возврат депозита
+
+
+ setCaptureAmount(e.target.value)}
+ className="input text-sm w-full"
+ />
+
+
+
+
+ {releaseError && (
+
{releaseError}
+ )}
+
+
+
+
+
+ )}
+
+ {/* Final statuses */}
+ {deposit?.status === 'captured' && (
+
+ Списано {formatCurrency(deposit.capturedAmount ?? 0)}
+
+ )}
+ {deposit?.status === 'refunded' && (
+
+ Возвращён
+
+ )}
+ {deposit?.status === 'cancelled' && (
+
+ Отменён
+
+ )}
+
+ )
+}
+
// ─── Component ────────────────────────────────────────────────────────────────
interface BookingDetailPanelProps {
@@ -1309,6 +1571,11 @@ export function BookingDetailPanel({ booking, room, rooms, allBookings, slug, on
)}
+
+ {/* Deposit widget */}
+ {slug && (
+