fix: minibar deposit — использовать актуальную цену из справочника, а не историческую

Ранее в форме удержания депозита показывалась цена на момент уборки (price_per_unit).
Теперь используется текущая цена позиции (mi.price) — чтобы изменения цен сразу
отражались в счёте. Если цена менялась — показываем индикатор ↑ с tooltip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 15:51:34 +03:00
parent 54d0d2d817
commit 83d797c55f
3 changed files with 33 additions and 18 deletions

View File

@@ -806,7 +806,7 @@ export const api = {
req<void>('DELETE', `/api/hotels/${slug}/bookings/${bookingId}/deposit`),
getMinibarForBooking: (slug: string, bookingId: string) =>
req<{ items: Array<{ itemName: string; quantity: number; pricePerUnit: number; lineTotal: number }>; total: number }>(
req<{ items: Array<{ itemName: string; quantity: number; recordedPrice: number; currentPrice: number; lineTotal: number }>; total: number }>(
'GET', `/api/hotels/${slug}/bookings/${bookingId}/deposit/minibar`,
),