🔍 Room Type Debug Test

Testing room type resolution with debugging to identify the "Deluxe Suite" issue

🐛 Debug Test Scenarios

Test Cases

  • Room 763: room_type_id=1, no room_type
  • Room 764: room_type_id=1, wrong room_type
  • Room 765: room_type_id=2, no room_type
  • Room 766: room_type_id=2, wrong room_type
  • Room 767: room_type_id=3, correct room_type

Expected Results

  • Room 763: "Standard Room" (fallback)
  • Room 764: "Standard Room" (fallback)
  • Room 765: "Superior Room" (fallback)
  • Room 766: "Superior Room" (fallback)
  • Room 767: "Deluxe Suite" (correct)
🔍 Debug Instructions:
  1. Open browser console (F12)
  2. Select dates: January 14-15, 2026
  3. Look for these console logs:
  4. 🔍 HotelBookingCalendar - Complete room data
  5. 🔧 HotelBookingCalendar - Using room_type_id fallback
  6. 🔍 roomsForSelectedDates - Room data
  7. 🔍 roomsByType - Processing Room
  8. 🔧 roomsByType - Created group
  9. 🏨 Final roomsByType result

📅 Hotel Booking Calendar

🔍 Expected Console Debug Output

📊 Key Debug Logs to Look For

🔍 HotelBookingCalendar - Room 763 type resolution: {
  room_type_id: 1,
  resolved_room_type_name: "Standard Room",
  room_type: undefined
}

🔧 HotelBookingCalendar - Using room_type_id fallback for Room 763: Standard Room

✅ Adding available room: ID 763, Type: Standard Room, Number: 763

🔍 roomsForSelectedDates - Room 763 data: {
  room_type_id: 1,
  room_type_name: "Standard Room",
  original_room_type: undefined
}

🔍 roomsByType - Processing Room 763: {
  room_type_id: 1,
  room_type_name: "Standard Room",
  original_room_type: undefined
}

🔧 roomsByType - Created group for type 1 with name: Standard Room

🏨 Final roomsByType result: [
  { id: 1, name: "Standard Room", room_count: 2 },
  { id: 2, name: "Superior Room", room_count: 2 },
  { id: 3, name: "Deluxe Suite", room_count: 1 }
]

🚨 If Still Showing "Deluxe Suite"

  • Check if room_type_name is being set correctly
  • Verify room_type_id fallback is being triggered
  • Look for any "Deluxe Suite" in the original room data
  • Check if there's another source of room type names
  • Verify the roomsByType grouping is using resolved names