Include guest info in booking list
All checks were successful
build-and-deploy / build-deploy (push) Successful in 36s

This commit is contained in:
androidlover5842
2026-01-29 20:02:11 +05:30
parent 4c0264cdbe
commit 62f2cc5aaa
2 changed files with 6 additions and 1 deletions

View File

@@ -160,10 +160,13 @@ class BookingFlow(
bookingRepo.findByPropertyIdAndStatusInOrderByCreatedAtDesc(propertyId, statuses)
}
return bookings.map { booking ->
val guest = booking.primaryGuest
BookingListItem(
id = booking.id!!,
status = booking.status.name,
guestId = booking.primaryGuest?.id,
guestId = guest?.id,
guestName = guest?.name,
guestPhone = guest?.phoneE164,
source = booking.source,
expectedCheckInAt = booking.expectedCheckinAt?.toString(),
expectedCheckOutAt = booking.expectedCheckoutAt?.toString(),

View File

@@ -58,6 +58,8 @@ data class BookingListItem(
val id: UUID,
val status: String,
val guestId: UUID?,
val guestName: String?,
val guestPhone: String?,
val source: String?,
val expectedCheckInAt: String?,
val expectedCheckOutAt: String?,