Default to dashboard in the demo

This commit is contained in:
Hillel Coren 2024-01-15 13:44:22 +02:00
parent 5e14167e55
commit 21e32df61e
1 changed files with 3 additions and 2 deletions

View File

@ -29,10 +29,11 @@ Middleware<AppState> _createViewDashboard() {
store: store,
force: action.force,
callback: () {
if (!store.state.userCompany.canViewDashboard) {
final state = store.state;
if (state.isLoaded && !state.userCompany.canViewDashboard) {
store.dispatch(ViewClientList());
} else {
if (store.state.isStale) {
if (state.isStale) {
store.dispatch(RefreshData());
}