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

View File

@ -95,9 +95,8 @@ Reducer<BuiltMap<EntityType, BuiltList<String>>> selectedEntitiesReducer =
combineReducers([ combineReducers([
TypedReducer<BuiltMap<EntityType, BuiltList<String>>, TypedReducer<BuiltMap<EntityType, BuiltList<String>>,
UpdateDashboardSelection>((state, action) { UpdateDashboardSelection>((state, action) {
return state.rebuild((b) => b return state.rebuild((b) =>
..[action.entityType] = b..[action.entityType] = BuiltList(action.entityIds ?? <String>[]));
action.entityIds == null ? null : BuiltList(action.entityIds));
}), }),
]); ]);

View File

@ -25,7 +25,7 @@ class DashboardScreenBuilder extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return StoreConnector<AppState, DashboardVM>( return StoreConnector<AppState, DashboardVM>(
//distinct: true, distinct: true,
//onInit: (Store<AppState> store) => isMobile(context) ? store.dispatch(LoadClients()) : null, //onInit: (Store<AppState> store) => isMobile(context) ? store.dispatch(LoadClients()) : null,
converter: DashboardVM.fromStore, converter: DashboardVM.fromStore,
builder: (context, viewModel) { builder: (context, viewModel) {
@ -106,23 +106,19 @@ class DashboardVM {
final Function(int) onOffsetChanged; final Function(int) onOffsetChanged;
final Function(String) onCurrencyChanged; final Function(String) onCurrencyChanged;
/*
@override @override
bool operator ==(dynamic other) => bool operator ==(dynamic other) =>
dashboardState == other.dashboardState && //dashboardUIState == other.dashboardUIState &&
dashboardUIState == other.dashboardUIState && //currencyMap == other.currencyMap &&
currencyMap == other.currencyMap && //isLoading == other.isLoading &&
isLoading == other.isLoading &&
filter == other.filter && filter == other.filter &&
filteredList == other.filteredList; filteredList == other.filteredList;
@override @override
int get hashCode => int get hashCode =>
dashboardState.hashCode ^ //dashboardUIState.hashCode ^
dashboardUIState.hashCode ^ //currencyMap.hashCode ^
currencyMap.hashCode ^ //isLoading.hashCode ^
isLoading.hashCode ^
filter.hashCode ^ filter.hashCode ^
filteredList.hashCode; filteredList.hashCode;
*/
} }