Include guest info in booking list
All checks were successful
build-and-deploy / build-deploy (push) Successful in 36s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 36s
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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?,
|
||||
|
||||
Reference in New Issue
Block a user