Not loading large company after login when switching companies
This commit is contained in:
parent
8af8f3d317
commit
c4a0c956d3
|
|
@ -92,12 +92,10 @@ class MenuDrawerVM {
|
||||||
store.dispatch(ClearEntityFilter());
|
store.dispatch(ClearEntityFilter());
|
||||||
store.dispatch(DiscardChanges());
|
store.dispatch(DiscardChanges());
|
||||||
store.dispatch(SelectCompany(companyIndex: index));
|
store.dispatch(SelectCompany(companyIndex: index));
|
||||||
if (store.state.isStale) {
|
if (store.state.company.isLarge && !store.state.isLoaded) {
|
||||||
if (!store.state.isLoaded && store.state.company.isLarge) {
|
store.dispatch(LoadClients());
|
||||||
store.dispatch(LoadClients());
|
} else if (store.state.isStale) {
|
||||||
} else {
|
store.dispatch(RefreshData());
|
||||||
store.dispatch(RefreshData());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
AppBuilder.of(context).rebuild();
|
AppBuilder.of(context).rebuild();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue