booking: ability to take signature
This commit is contained in:
@@ -17,6 +17,7 @@ import com.android.trisolarispms.ui.auth.NameScreen
|
||||
import com.android.trisolarispms.ui.auth.UnauthorizedScreen
|
||||
import com.android.trisolarispms.ui.booking.BookingCreateScreen
|
||||
import com.android.trisolarispms.ui.guest.GuestInfoScreen
|
||||
import com.android.trisolarispms.ui.guest.GuestSignatureScreen
|
||||
import com.android.trisolarispms.ui.home.HomeScreen
|
||||
import com.android.trisolarispms.ui.property.AddPropertyScreen
|
||||
import com.android.trisolarispms.ui.room.RoomFormScreen
|
||||
@@ -106,8 +107,16 @@ class MainActivity : ComponentActivity() {
|
||||
currentRoute.propertyId,
|
||||
currentRoute.roomTypeId
|
||||
)
|
||||
is AppRoute.CreateBooking -> route.value = AppRoute.Home
|
||||
is AppRoute.CreateBooking -> route.value = AppRoute.ActiveRoomStays(
|
||||
currentRoute.propertyId,
|
||||
selectedPropertyName.value ?: "Property"
|
||||
)
|
||||
is AppRoute.GuestInfo -> route.value = AppRoute.Home
|
||||
is AppRoute.GuestSignature -> route.value = AppRoute.GuestInfo(
|
||||
currentRoute.propertyId,
|
||||
currentRoute.bookingId,
|
||||
currentRoute.guestId
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +173,30 @@ class MainActivity : ComponentActivity() {
|
||||
initialGuest = selectedGuest.value,
|
||||
initialPhone = selectedGuestPhone.value,
|
||||
onBack = { route.value = AppRoute.Home },
|
||||
onSave = { route.value = AppRoute.Home }
|
||||
onSave = {
|
||||
route.value = AppRoute.GuestSignature(
|
||||
currentRoute.propertyId,
|
||||
currentRoute.bookingId,
|
||||
currentRoute.guestId
|
||||
)
|
||||
}
|
||||
)
|
||||
is AppRoute.GuestSignature -> GuestSignatureScreen(
|
||||
propertyId = currentRoute.propertyId,
|
||||
guestId = currentRoute.guestId,
|
||||
onBack = {
|
||||
route.value = AppRoute.GuestInfo(
|
||||
currentRoute.propertyId,
|
||||
currentRoute.bookingId,
|
||||
currentRoute.guestId
|
||||
)
|
||||
},
|
||||
onDone = {
|
||||
route.value = AppRoute.ActiveRoomStays(
|
||||
currentRoute.propertyId,
|
||||
selectedPropertyName.value ?: "Property"
|
||||
)
|
||||
}
|
||||
)
|
||||
is AppRoute.ActiveRoomStays -> ActiveRoomStaysScreen(
|
||||
propertyId = currentRoute.propertyId,
|
||||
|
||||
Reference in New Issue
Block a user