improve checked in guest ui
This commit is contained in:
@@ -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