improve checked in guest ui
This commit is contained in:
@@ -56,7 +56,10 @@ Optional query param:
|
||||
Behavior:
|
||||
- If status is omitted, returns all bookings for the property (newest first).
|
||||
|
||||
Response: List of BookingListItem with id, status, guestId, source, times, counts, expectedGuestCount, notes.
|
||||
Response: List of BookingListItem with id, status, guestId, guestName, guestPhone, roomNumbers, source, times, counts, expectedGuestCount, notes.
|
||||
|
||||
Notes:
|
||||
- It returns active room stays (toAt = null) for each booking.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@ data class BookingListItem(
|
||||
val id: String? = null,
|
||||
val status: String? = null,
|
||||
val guestId: String? = null,
|
||||
val guestName: String? = null,
|
||||
val guestPhone: String? = null,
|
||||
val roomNumbers: List<Int> = emptyList(),
|
||||
val source: String? = null,
|
||||
val checkInAt: String? = null,
|
||||
val checkOutAt: String? = null,
|
||||
|
||||
@@ -174,10 +174,23 @@ private fun CheckedInBookingCard(
|
||||
)
|
||||
) {
|
||||
Column(modifier = Modifier.padding(12.dp)) {
|
||||
Text(
|
||||
text = booking.id?.take(8)?.let { "Booking #$it" } ?: "Booking",
|
||||
style = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
val guestName = booking.guestName?.takeIf { it.isNotBlank() }
|
||||
if (guestName == null) {
|
||||
Text(
|
||||
text = booking.id?.take(8)?.let { "Booking #$it" } ?: "Booking",
|
||||
style = MaterialTheme.typography.titleSmall
|
||||
)
|
||||
}
|
||||
if (guestName != null) {
|
||||
Text(text = guestName, style = MaterialTheme.typography.bodyMedium)
|
||||
}
|
||||
if (booking.roomNumbers.isNotEmpty()) {
|
||||
Text(
|
||||
text = booking.roomNumbers.joinToString(", "),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
)
|
||||
}
|
||||
val source = booking.source?.takeIf { it.isNotBlank() }
|
||||
if (source != null) {
|
||||
Text(text = source, style = MaterialTheme.typography.bodySmall)
|
||||
|
||||
Reference in New Issue
Block a user