feat: tariff selector in BookingModal
- Migration 050: add tariff_id FK to bookings table - Backend: accept tariff_id in POST/PATCH bookings - Frontend: load active tariffs in BookingModal, show tariff dropdown - Price calculation applies tariff modifier (percent or fixed) before discount - tariffId forwarded through CalendarPage → api.bookings.create/update Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -166,6 +166,7 @@ export function CalendarPage() {
|
||||
adults: data.adults, children: data.children,
|
||||
status: data.status, source: data.source,
|
||||
totalAmount: data.totalAmount, paidAmount: data.paidAmount, notes: data.notes,
|
||||
tariffId: data.tariffId,
|
||||
})
|
||||
setBookings(prev => [...prev, created])
|
||||
send({ type: 'booking:created', booking: created })
|
||||
@@ -186,6 +187,7 @@ export function CalendarPage() {
|
||||
adults: data.adults, children: data.children,
|
||||
status: data.status, source: data.source,
|
||||
totalAmount: data.totalAmount, notes: data.notes,
|
||||
tariffId: data.tariffId,
|
||||
})
|
||||
setBookings(prev => prev.map(b => b.id === id ? updated : b))
|
||||
send({ type: 'booking:updated', booking: updated })
|
||||
|
||||
Reference in New Issue
Block a user