Demo is loading /clients instead of /dashboard

This commit is contained in:
Hillel Coren 2023-09-18 15:32:33 +03:00
parent 6b11ac8fb4
commit ef4ff0f1cc
1 changed files with 4 additions and 3 deletions

View File

@ -563,9 +563,10 @@ Middleware<AppState> _createViewMainScreen() {
final action = dynamicAction as ViewMainScreen; final action = dynamicAction as ViewMainScreen;
if (store.state.uiState.currentRoute == LoginScreen.route) { if (store.state.uiState.currentRoute == LoginScreen.route) {
store.dispatch(UpdateCurrentRoute(store.state.userCompany.canViewDashboard store.dispatch(UpdateCurrentRoute(
? DashboardScreenBuilder.route store.state.userCompany.canViewDashboard || store.state.isDemo
: ClientScreen.route)); ? DashboardScreenBuilder.route
: ClientScreen.route));
} }
while (navigatorKey.currentState.canPop()) { while (navigatorKey.currentState.canPop()) {