Remove auto check-in on booking create
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -80,8 +80,6 @@ class BookingFlow(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val now = nowForProperty(property.timezone)
|
val now = nowForProperty(property.timezone)
|
||||||
val shouldCheckIn = expectedCheckInAt.isBefore(now) &&
|
|
||||||
!expectedCheckInAt.isBefore(now.minusMinutes(10))
|
|
||||||
val phone = request.guestPhoneE164?.trim()?.takeIf { it.isNotBlank() }
|
val phone = request.guestPhoneE164?.trim()?.takeIf { it.isNotBlank() }
|
||||||
val guest = resolveGuestForBooking(propertyId, property, actor, now, phone)
|
val guest = resolveGuestForBooking(propertyId, property, actor, now, phone)
|
||||||
val hasGuestCounts = request.maleCount != null || request.femaleCount != null || request.childCount != null
|
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(
|
val booking = com.android.trisolarisserver.models.booking.Booking(
|
||||||
property = property,
|
property = property,
|
||||||
primaryGuest = guest,
|
primaryGuest = guest,
|
||||||
status = if (shouldCheckIn) BookingStatus.CHECKED_IN else BookingStatus.OPEN,
|
status = BookingStatus.OPEN,
|
||||||
source = request.source?.trim().takeIf { !it.isNullOrBlank() } ?: "WALKIN",
|
source = request.source?.trim().takeIf { !it.isNullOrBlank() } ?: "WALKIN",
|
||||||
checkinAt = if (shouldCheckIn) expectedCheckInAt else null,
|
checkinAt = null,
|
||||||
expectedCheckinAt = if (shouldCheckIn) null else expectedCheckInAt,
|
expectedCheckinAt = expectedCheckInAt,
|
||||||
expectedCheckoutAt = if (shouldCheckIn) null else expectedCheckOutAt,
|
expectedCheckoutAt = expectedCheckOutAt,
|
||||||
transportMode = request.transportMode?.let {
|
transportMode = request.transportMode?.let {
|
||||||
val mode = parseTransportMode(it)
|
val mode = parseTransportMode(it)
|
||||||
if (!isTransportModeAllowed(property, mode)) {
|
if (!isTransportModeAllowed(property, mode)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user