diff --git a/lib/redux/dashboard/dashboard_selectors.dart b/lib/redux/dashboard/dashboard_selectors.dart index 3d748a41f..562cc0ce8 100644 --- a/lib/redux/dashboard/dashboard_selectors.dart +++ b/lib/redux/dashboard/dashboard_selectors.dart @@ -174,6 +174,8 @@ List chartQuotes({ BuiltMap clientMap, BuiltMap groupMap, }) { + print('## chartQuotes...'); + const STATUS_ACTIVE = 'active'; const STATUS_APPROVED = 'approved'; const STATUS_UNAPPROVED = 'unapproved'; @@ -295,6 +297,8 @@ List chartPayments( BuiltMap groupMap, BuiltMap paymentMap, ) { + print('## chartPayments...'); + const STATUS_ACTIVE = 'active'; const STATUS_REFUNDED = 'refunded'; diff --git a/lib/redux/ui/ui_reducer.dart b/lib/redux/ui/ui_reducer.dart index aea14a3ab..c63d3ecab 100644 --- a/lib/redux/ui/ui_reducer.dart +++ b/lib/redux/ui/ui_reducer.dart @@ -95,9 +95,8 @@ Reducer>> selectedEntitiesReducer = combineReducers([ TypedReducer>, UpdateDashboardSelection>((state, action) { - return state.rebuild((b) => b - ..[action.entityType] = - action.entityIds == null ? null : BuiltList(action.entityIds)); + return state.rebuild((b) => + b..[action.entityType] = BuiltList(action.entityIds ?? [])); }), ]); diff --git a/lib/ui/dashboard/dashboard_screen_vm.dart b/lib/ui/dashboard/dashboard_screen_vm.dart index 3d3cf4821..f3d3653d8 100644 --- a/lib/ui/dashboard/dashboard_screen_vm.dart +++ b/lib/ui/dashboard/dashboard_screen_vm.dart @@ -25,7 +25,7 @@ class DashboardScreenBuilder extends StatelessWidget { @override Widget build(BuildContext context) { return StoreConnector( - //distinct: true, + distinct: true, //onInit: (Store store) => isMobile(context) ? store.dispatch(LoadClients()) : null, converter: DashboardVM.fromStore, builder: (context, viewModel) { @@ -106,23 +106,19 @@ class DashboardVM { final Function(int) onOffsetChanged; final Function(String) onCurrencyChanged; -/* @override bool operator ==(dynamic other) => - dashboardState == other.dashboardState && - dashboardUIState == other.dashboardUIState && - currencyMap == other.currencyMap && - isLoading == other.isLoading && + //dashboardUIState == other.dashboardUIState && + //currencyMap == other.currencyMap && + //isLoading == other.isLoading && filter == other.filter && filteredList == other.filteredList; @override int get hashCode => - dashboardState.hashCode ^ - dashboardUIState.hashCode ^ - currencyMap.hashCode ^ - isLoading.hashCode ^ + //dashboardUIState.hashCode ^ + //currencyMap.hashCode ^ + //isLoading.hashCode ^ filter.hashCode ^ filteredList.hashCode; - */ }