Compare commits

..

2 Commits

2 changed files with 32 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import android.os.Build
import android.os.Handler
import android.os.Looper
import androidx.annotation.RequiresApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@ -21,7 +22,6 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Menu
import androidx.compose.material.icons.filled.Notifications
import androidx.compose.material.icons.filled.Sync
import androidx.compose.animation.core.tween
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.DrawerValue
import androidx.compose.material3.Icon
@ -47,8 +47,6 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.foundation.Image
import coil3.compose.AsyncImage
import com.mob.utsmyanmar.R
import com.mob.utsmyanmar.ui.components.appbar.AppBar
import com.mob.utsmyanmar.ui.device_info.DeviceInfoUiState
@ -77,7 +75,7 @@ fun DashboardScreen2(
) {
val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed)
val scope = rememberCoroutineScope()
val mainHandler = remember { Handler(Looper.getMainLooper()) }
val mainHandler = remember { Handler(Looper.getMainLooper())}
var showHostActionDialog by remember { mutableStateOf(false) }
var activeHostAction by remember { mutableStateOf("Log-On") }
var isHostActionRunning by remember { mutableStateOf(false) }

View File

@ -119,6 +119,13 @@ fun AppNavGraph(
}
}
"Pre-Auth",
"Cash Out" -> {
navController.navigate(Routes.Amount.createRoute(action)) {
launchSingleTop = true
}
}
else -> {
navController.navigate(
Routes.Password.createRoute(
@ -145,6 +152,17 @@ fun AppNavGraph(
}
}
"Pre-Auth",
"Cash Out" -> {
sharedViewModel.transactionsType.value = when (action) {
"Pre-Auth" -> TransactionsType.PRE_AUTH_SALE
else -> TransactionsType.CASH_OUT
}
navController.navigate(Routes.Amount.createRoute(action)) {
launchSingleTop = true
}
}
"Pre-Auth Complete Void" -> {
sharedViewModel.transactionsType.value = TransactionsType.PRE_AUTH_COMPLETE_VOID
navController.navigate(
@ -228,6 +246,18 @@ fun AppNavGraph(
launchSingleTop = true
}
}
"Pre-Auth",
"Cash Out" -> {
sharedViewModel.transactionsType.value = when (action) {
"Pre-Auth" -> TransactionsType.PRE_AUTH_SALE
else -> TransactionsType.CASH_OUT
}
navController.navigate(Routes.Amount.createRoute(action)) {
launchSingleTop = true
}
}
"Pre-Auth Complete Void" -> {
sharedViewModel.transactionsType.value = TransactionsType.PRE_AUTH_COMPLETE_VOID
navController.navigate(