Add driver leave request screens
This commit is contained in:
@@ -13,14 +13,20 @@ import pl.firmatpp.kierowca.ui.theme.TppKierowcaTheme
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
private var notificationRouteId by mutableStateOf<String?>(null)
|
||||
private var notificationLeaveRequestId by mutableStateOf<String?>(null)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
notificationRouteId = intent.getStringExtra(EXTRA_ROUTE_ID)
|
||||
notificationLeaveRequestId = intent.getStringExtra(EXTRA_LEAVE_REQUEST_ID)
|
||||
setContent {
|
||||
TppKierowcaTheme {
|
||||
val viewModel: DriverViewModel = viewModel()
|
||||
DriverApp(viewModel = viewModel, initialRouteId = notificationRouteId)
|
||||
DriverApp(
|
||||
viewModel = viewModel,
|
||||
initialRouteId = notificationRouteId,
|
||||
initialLeaveRequestId = notificationLeaveRequestId,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,9 +35,11 @@ class MainActivity : ComponentActivity() {
|
||||
super.onNewIntent(intent)
|
||||
setIntent(intent)
|
||||
notificationRouteId = intent.getStringExtra(EXTRA_ROUTE_ID)
|
||||
notificationLeaveRequestId = intent.getStringExtra(EXTRA_LEAVE_REQUEST_ID)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val EXTRA_ROUTE_ID = "pl.firmatpp.kierowca.EXTRA_ROUTE_ID"
|
||||
const val EXTRA_LEAVE_REQUEST_ID = "pl.firmatpp.kierowca.EXTRA_LEAVE_REQUEST_ID"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user