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)
|
bookingRepo.findByPropertyIdAndStatusInOrderByCreatedAtDesc(propertyId, statuses)
|
||||||
}
|
}
|
||||||
return bookings.map { booking ->
|
return bookings.map { booking ->
|
||||||
|
val guest = booking.primaryGuest
|
||||||
BookingListItem(
|
BookingListItem(
|
||||||
id = booking.id!!,
|
id = booking.id!!,
|
||||||
status = booking.status.name,
|
status = booking.status.name,
|
||||||
guestId = booking.primaryGuest?.id,
|
guestId = guest?.id,
|
||||||
|
guestName = guest?.name,
|
||||||
|
guestPhone = guest?.phoneE164,
|
||||||
source = booking.source,
|
source = booking.source,
|
||||||
expectedCheckInAt = booking.expectedCheckinAt?.toString(),
|
expectedCheckInAt = booking.expectedCheckinAt?.toString(),
|
||||||
expectedCheckOutAt = booking.expectedCheckoutAt?.toString(),
|
expectedCheckOutAt = booking.expectedCheckoutAt?.toString(),
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ data class BookingListItem(
|
|||||||
val id: UUID,
|
val id: UUID,
|
||||||
val status: String,
|
val status: String,
|
||||||
val guestId: UUID?,
|
val guestId: UUID?,
|
||||||
|
val guestName: String?,
|
||||||
|
val guestPhone: String?,
|
||||||
val source: String?,
|
val source: String?,
|
||||||
val expectedCheckInAt: String?,
|
val expectedCheckInAt: String?,
|
||||||
val expectedCheckOutAt: String?,
|
val expectedCheckOutAt: String?,
|
||||||
|
|||||||
Reference in New Issue
Block a user