From 45a8cf7c100a8aab0465bc063aea021764268612 Mon Sep 17 00:00:00 2001 From: HotelSync Date: Mon, 6 Apr 2026 15:59:20 +0300 Subject: [PATCH] =?UTF-8?q?ui:=20=D0=B1=D0=BE=D0=BA=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D1=8C=20=E2=80=94=20?= =?UTF-8?q?=D1=88=D0=B8=D1=80=D0=B8=D0=BD=D0=B0=20560px,=20=D0=B2=D0=BA?= =?UTF-8?q?=D0=BB=D0=B0=D0=B4=D0=BA=D0=B0=20=C2=AB=D0=9E=D0=BF=D0=BB=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=C2=BB=20=D0=B4=D0=B2=D1=83=D1=85=D0=BA=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D0=BD=D0=BE=D1=87=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - w-[400px] → w-[560px] для боковой панели бронирования - Вкладка «Оплата»: расчёт + платежи слева, депозит справа (grid 2 cols) - На мобиле — одна колонка как прежде Co-Authored-By: Claude Sonnet 4.6 --- .../bookings/BookingDetailPanel.tsx | 222 +++++++++--------- 1 file changed, 114 insertions(+), 108 deletions(-) diff --git a/src/components/bookings/BookingDetailPanel.tsx b/src/components/bookings/BookingDetailPanel.tsx index e81fcd1..13d9de4 100644 --- a/src/components/bookings/BookingDetailPanel.tsx +++ b/src/components/bookings/BookingDetailPanel.tsx @@ -955,7 +955,7 @@ export function BookingDetailPanel({ booking, room, rooms, allBookings, slug, on <>
-
+
{/* Toast notification */} {toast && ( @@ -1636,125 +1636,131 @@ export function BookingDetailPanel({ booking, room, rooms, allBookings, slug, on {/* ── Оплата ───────────────────────────────────────────────────────── */} {tab === 'payment' && ( -
- {/* Discount selector */} -
- - -
+
- {/* Breakdown */} -
-
- Стоимость - {formatCurrency(baseTotal)} + {/* Левая колонка — расчёт и приём оплаты */} +
+ {/* Discount selector */} +
+ +
- {discountAmt > 0 && ( + + {/* Breakdown */} +
- Скидка «{selDiscount?.name}» - −{formatCurrency(discountAmt)} + Стоимость + {formatCurrency(baseTotal)} +
+ {discountAmt > 0 && ( +
+ Скидка «{selDiscount?.name}» + −{formatCurrency(discountAmt)} +
+ )} +
+ Итого + {formatCurrency(finalTotal)} +
+
+ Оплачено + {formatCurrency(totalPaid)} +
+
0 ? 'text-red-600 dark:text-red-400' : 'text-emerald-600 dark:text-emerald-400', + )}> + {balance > 0 ? 'Остаток' : 'Переплата'} + {balance > 0 ? formatCurrency(balance) : `+${formatCurrency(-balance)}`}
- )} -
- Итого - {formatCurrency(finalTotal)}
-
- Оплачено - {formatCurrency(totalPaid)} -
-
0 ? 'text-red-600 dark:text-red-400' : 'text-emerald-600 dark:text-emerald-400', - )}> - {balance > 0 ? 'Остаток' : 'Переплата'} - {balance > 0 ? formatCurrency(balance) : `+${formatCurrency(-balance)}`} -
-
- {/* Accept payment */} - {!showPayForm ? ( - - ) : ( -
-

Новый платёж

-
- - setPayAmount(e.target.value)} - onFocus={e => e.target.select()} - placeholder="0" min="0" /> -
-
- -
- {METHODS.map(m => ( - - ))} + {/* Accept payment */} + {!showPayForm ? ( + + ) : ( +
+

Новый платёж

+
+ + setPayAmount(e.target.value)} + onFocus={e => e.target.select()} + placeholder="0" min="0" /> +
+
+ +
+ {METHODS.map(m => ( + + ))} +
+
+
+ + setPayNote(e.target.value)} placeholder="Необязательно" /> +
+
+ +
+ )} + + {/* Payment history */} + {payments.length > 0 && (
- - setPayNote(e.target.value)} placeholder="Необязательно" /> +

История платежей

+
+ {payments.map(p => { + const M = METHODS.find(m => m.id === p.method) ?? METHODS[0] + return ( +
+ + {format(new Date(p.createdAt), 'dd.MM.yyyy')} + {p.note || M.label} + {formatCurrency(Number(p.amount))} +
+ ) + })} +
-
- - -
-
- )} + )} +
- {/* Payment history */} - {payments.length > 0 && ( -
-

История платежей

-
- {payments.map(p => { - const M = METHODS.find(m => m.id === p.method) ?? METHODS[0] - return ( -
- - {format(new Date(p.createdAt), 'dd.MM.yyyy')} - {p.note || M.label} - {formatCurrency(Number(p.amount))} -
- ) - })} -
-
- )} - - {/* Deposit widget */} + {/* Правая колонка — депозит */} {slug && ( - +
+ +
)}
)}