Dashboard

This commit is contained in:
Hillel Coren 2020-07-21 15:06:31 +03:00
parent 7da286ee66
commit f39b04f759
3 changed files with 13 additions and 14 deletions

View File

@ -174,6 +174,8 @@ List<ChartDataGroup> chartQuotes({
BuiltMap<String, ClientEntity> clientMap,
BuiltMap<String, GroupEntity> groupMap,
}) {
print('## chartQuotes...');
const STATUS_ACTIVE = 'active';
const STATUS_APPROVED = 'approved';
const STATUS_UNAPPROVED = 'unapproved';
@ -295,6 +297,8 @@ List<ChartDataGroup> chartPayments(
BuiltMap<String, GroupEntity> groupMap,
BuiltMap<String, PaymentEntity> paymentMap,
) {
print('## chartPayments...');
const STATUS_ACTIVE = 'active';
const STATUS_REFUNDED = 'refunded';

View File

@ -95,9 +95,8 @@ Reducer<BuiltMap<EntityType, BuiltList<String>>> selectedEntitiesReducer =
combineReducers([
TypedReducer<BuiltMap<EntityType, BuiltList<String>>,
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 ?? <String>[]));
}),
]);

View File

@ -25,7 +25,7 @@ class DashboardScreenBuilder extends StatelessWidget {
@override
Widget build(BuildContext context) {
return StoreConnector<AppState, DashboardVM>(
//distinct: true,
distinct: true,
//onInit: (Store<AppState> 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;
*/
}