Fix: drag ghost visual, check-in date auto-fill, backend room_id patch

- BookingCalendar: replace tiny ghost badge with full-size booking block
  (same color, correct width based on nights × cell width, centered on cursor)
- BookingModal: auto-set check-out to check-in+1 day when check-in changes
- Backend PATCH /bookings/🆔 add room_id to allowed fields so drag-to-move saves correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 00:56:49 +03:00
parent 97b2ca1f91
commit 80e3b21827
3 changed files with 29 additions and 14 deletions

View File

@@ -144,7 +144,7 @@ const bookings: FastifyPluginAsync = async (fastify) => {
const hotelId = await getHotelId(slug)
if (!hotelId) return reply.code(404).send({ error: 'Hotel not found' })
const allowed = ['guest_name','guest_email','guest_phone','check_in','check_out',
const allowed = ['room_id','guest_name','guest_email','guest_phone','check_in','check_out',
'adults','children','status','source','total_amount','paid_amount','notes']
const updates: string[] = []
const values: unknown[] = []