Remove auto check-in on booking create
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s

This commit is contained in:
androidlover5842
2026-01-29 11:56:12 +05:30
parent 531c5c216d
commit 92bc2c40a3

View File

@@ -80,8 +80,6 @@ class BookingFlow(
}
val now = nowForProperty(property.timezone)
val shouldCheckIn = expectedCheckInAt.isBefore(now) &&
!expectedCheckInAt.isBefore(now.minusMinutes(10))
val phone = request.guestPhoneE164?.trim()?.takeIf { it.isNotBlank() }
val guest = resolveGuestForBooking(propertyId, property, actor, now, phone)
val hasGuestCounts = request.maleCount != null || request.femaleCount != null || request.childCount != null
@@ -98,11 +96,11 @@ class BookingFlow(
val booking = com.android.trisolarisserver.models.booking.Booking(
property = property,
primaryGuest = guest,
status = if (shouldCheckIn) BookingStatus.CHECKED_IN else BookingStatus.OPEN,
status = BookingStatus.OPEN,
source = request.source?.trim().takeIf { !it.isNullOrBlank() } ?: "WALKIN",
checkinAt = if (shouldCheckIn) expectedCheckInAt else null,
expectedCheckinAt = if (shouldCheckIn) null else expectedCheckInAt,
expectedCheckoutAt = if (shouldCheckIn) null else expectedCheckOutAt,
checkinAt = null,
expectedCheckinAt = expectedCheckInAt,
expectedCheckoutAt = expectedCheckOutAt,
transportMode = request.transportMode?.let {
val mode = parseTransportMode(it)
if (!isTransportModeAllowed(property, mode)) {