Dashboard
This commit is contained in:
parent
bb92d0e998
commit
ebc9601ce9
|
|
@ -617,7 +617,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
//return 'Client Count: ${userCompanyState.clientState.list.length}, Last Updated: ${userCompanyState.lastUpdated}';
|
//return 'Client Count: ${userCompanyState.clientState.list.length}, Last Updated: ${userCompanyState.lastUpdated}';
|
||||||
//return 'Token: ${credentials.token} - ${userCompanyStates.map((state) => state?.token?.token ?? '').where((name) => name.isNotEmpty).join(',')}';
|
//return 'Token: ${credentials.token} - ${userCompanyStates.map((state) => state?.token?.token ?? '').where((name) => name.isNotEmpty).join(',')}';
|
||||||
//return 'Payment Terms: ${company.settings.defaultPaymentTerms}';
|
//return 'Payment Terms: ${company.settings.defaultPaymentTerms}';
|
||||||
return 'Dashboard: ${dashboardUIState.selectedEntities}';
|
return 'Dashboard: ${uiState.selectedEntities}';
|
||||||
return '\n\nURL: ${authState.url}\nRoute: ${uiState.currentRoute}\nPrev: ${uiState.previousRoute}\nis Large: ${(company?.isLarge ?? false) ? 'Yes' : 'No'}\nCompany: $companyUpdated${userCompanyState.isStale ? ' [S]' : ''}\nStatic: $staticUpdated${staticState.isStale ? ' [S]' : ''}\n';
|
return '\n\nURL: ${authState.url}\nRoute: ${uiState.currentRoute}\nPrev: ${uiState.previousRoute}\nis Large: ${(company?.isLarge ?? false) ? 'Yes' : 'No'}\nCompany: $companyUpdated${userCompanyState.isStale ? ' [S]' : ''}\nStatic: $staticUpdated${staticState.isStale ? ' [S]' : ''}\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:built_collection/built_collection.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/company/company_actions.dart';
|
import 'package:invoiceninja_flutter/redux/company/company_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
|
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_state.dart';
|
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_state.dart';
|
||||||
|
|
@ -21,11 +20,6 @@ DashboardUIState dashboardUIReducer(DashboardUIState state, dynamic action) {
|
||||||
} else if (action.currencyId != null) {
|
} else if (action.currencyId != null) {
|
||||||
return state.rebuild((b) => b..currencyId = action.currencyId);
|
return state.rebuild((b) => b..currencyId = action.currencyId);
|
||||||
}
|
}
|
||||||
} else if (action is UpdateDashboardSelection) {
|
|
||||||
return state.rebuild((b) => b
|
|
||||||
..selectedEntities[action.entityType] = action.entityIds == null
|
|
||||||
? null
|
|
||||||
: BuiltList<String>(action.entityIds));
|
|
||||||
} else if (action is SelectCompany) {
|
} else if (action is SelectCompany) {
|
||||||
//return state.rebuild((b) => b..currencyId = action.company.currencyId);
|
//return state.rebuild((b) => b..currencyId = action.company.currencyId);
|
||||||
// TODO re-enable
|
// TODO re-enable
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:built_collection/built_collection.dart';
|
|
||||||
import 'package:invoiceninja_flutter/constants.dart';
|
import 'package:invoiceninja_flutter/constants.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/dashboard_model.dart';
|
import 'package:invoiceninja_flutter/data/models/dashboard_model.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
|
|
@ -22,7 +21,6 @@ abstract class DashboardUIState
|
||||||
compareCustomEndDate: convertDateTimeToSqlDate(),
|
compareCustomEndDate: convertDateTimeToSqlDate(),
|
||||||
offset: 0,
|
offset: 0,
|
||||||
currencyId: kCurrencyAll,
|
currencyId: kCurrencyAll,
|
||||||
selectedEntities: BuiltMap<EntityType, List<String>>(),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,8 +48,6 @@ abstract class DashboardUIState
|
||||||
|
|
||||||
String get currencyId;
|
String get currencyId;
|
||||||
|
|
||||||
BuiltMap<EntityType, BuiltList<String>> get selectedEntities;
|
|
||||||
|
|
||||||
static Serializer<DashboardUIState> get serializer => _$dashboardUIStateSerializer;
|
static Serializer<DashboardUIState> get serializer => _$dashboardUIStateSerializer;
|
||||||
|
|
||||||
bool matchesCurrency(String match) {
|
bool matchesCurrency(String match) {
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,6 @@ class _$DashboardUIStateSerializer
|
||||||
'currencyId',
|
'currencyId',
|
||||||
serializers.serialize(object.currencyId,
|
serializers.serialize(object.currencyId,
|
||||||
specifiedType: const FullType(String)),
|
specifiedType: const FullType(String)),
|
||||||
'selectedEntities',
|
|
||||||
serializers.serialize(object.selectedEntities,
|
|
||||||
specifiedType: const FullType(BuiltMap, const [
|
|
||||||
const FullType(EntityType),
|
|
||||||
const FullType(BuiltList, const [const FullType(String)])
|
|
||||||
])),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -106,13 +100,6 @@ class _$DashboardUIStateSerializer
|
||||||
result.currencyId = serializers.deserialize(value,
|
result.currencyId = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(String)) as String;
|
specifiedType: const FullType(String)) as String;
|
||||||
break;
|
break;
|
||||||
case 'selectedEntities':
|
|
||||||
result.selectedEntities.replace(serializers.deserialize(value,
|
|
||||||
specifiedType: const FullType(BuiltMap, const [
|
|
||||||
const FullType(EntityType),
|
|
||||||
const FullType(BuiltList, const [const FullType(String)])
|
|
||||||
])));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,8 +126,6 @@ class _$DashboardUIState extends DashboardUIState {
|
||||||
final int offset;
|
final int offset;
|
||||||
@override
|
@override
|
||||||
final String currencyId;
|
final String currencyId;
|
||||||
@override
|
|
||||||
final BuiltMap<EntityType, BuiltList<String>> selectedEntities;
|
|
||||||
|
|
||||||
factory _$DashboardUIState(
|
factory _$DashboardUIState(
|
||||||
[void Function(DashboardUIStateBuilder) updates]) =>
|
[void Function(DashboardUIStateBuilder) updates]) =>
|
||||||
|
|
@ -155,8 +140,7 @@ class _$DashboardUIState extends DashboardUIState {
|
||||||
this.compareCustomStartDate,
|
this.compareCustomStartDate,
|
||||||
this.compareCustomEndDate,
|
this.compareCustomEndDate,
|
||||||
this.offset,
|
this.offset,
|
||||||
this.currencyId,
|
this.currencyId})
|
||||||
this.selectedEntities})
|
|
||||||
: super._() {
|
: super._() {
|
||||||
if (dateRange == null) {
|
if (dateRange == null) {
|
||||||
throw new BuiltValueNullFieldError('DashboardUIState', 'dateRange');
|
throw new BuiltValueNullFieldError('DashboardUIState', 'dateRange');
|
||||||
|
|
@ -189,10 +173,6 @@ class _$DashboardUIState extends DashboardUIState {
|
||||||
if (currencyId == null) {
|
if (currencyId == null) {
|
||||||
throw new BuiltValueNullFieldError('DashboardUIState', 'currencyId');
|
throw new BuiltValueNullFieldError('DashboardUIState', 'currencyId');
|
||||||
}
|
}
|
||||||
if (selectedEntities == null) {
|
|
||||||
throw new BuiltValueNullFieldError(
|
|
||||||
'DashboardUIState', 'selectedEntities');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -215,8 +195,7 @@ class _$DashboardUIState extends DashboardUIState {
|
||||||
compareCustomStartDate == other.compareCustomStartDate &&
|
compareCustomStartDate == other.compareCustomStartDate &&
|
||||||
compareCustomEndDate == other.compareCustomEndDate &&
|
compareCustomEndDate == other.compareCustomEndDate &&
|
||||||
offset == other.offset &&
|
offset == other.offset &&
|
||||||
currencyId == other.currencyId &&
|
currencyId == other.currencyId;
|
||||||
selectedEntities == other.selectedEntities;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int __hashCode;
|
int __hashCode;
|
||||||
|
|
@ -229,17 +208,15 @@ class _$DashboardUIState extends DashboardUIState {
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc($jc(0, dateRange.hashCode),
|
||||||
$jc($jc(0, dateRange.hashCode),
|
customStartDate.hashCode),
|
||||||
customStartDate.hashCode),
|
customEndDate.hashCode),
|
||||||
customEndDate.hashCode),
|
enableComparison.hashCode),
|
||||||
enableComparison.hashCode),
|
compareDateRange.hashCode),
|
||||||
compareDateRange.hashCode),
|
compareCustomStartDate.hashCode),
|
||||||
compareCustomStartDate.hashCode),
|
compareCustomEndDate.hashCode),
|
||||||
compareCustomEndDate.hashCode),
|
offset.hashCode),
|
||||||
offset.hashCode),
|
currencyId.hashCode));
|
||||||
currencyId.hashCode),
|
|
||||||
selectedEntities.hashCode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -253,8 +230,7 @@ class _$DashboardUIState extends DashboardUIState {
|
||||||
..add('compareCustomStartDate', compareCustomStartDate)
|
..add('compareCustomStartDate', compareCustomStartDate)
|
||||||
..add('compareCustomEndDate', compareCustomEndDate)
|
..add('compareCustomEndDate', compareCustomEndDate)
|
||||||
..add('offset', offset)
|
..add('offset', offset)
|
||||||
..add('currencyId', currencyId)
|
..add('currencyId', currencyId))
|
||||||
..add('selectedEntities', selectedEntities))
|
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -305,14 +281,6 @@ class DashboardUIStateBuilder
|
||||||
String get currencyId => _$this._currencyId;
|
String get currencyId => _$this._currencyId;
|
||||||
set currencyId(String currencyId) => _$this._currencyId = currencyId;
|
set currencyId(String currencyId) => _$this._currencyId = currencyId;
|
||||||
|
|
||||||
MapBuilder<EntityType, BuiltList<String>> _selectedEntities;
|
|
||||||
MapBuilder<EntityType, BuiltList<String>> get selectedEntities =>
|
|
||||||
_$this._selectedEntities ??=
|
|
||||||
new MapBuilder<EntityType, BuiltList<String>>();
|
|
||||||
set selectedEntities(
|
|
||||||
MapBuilder<EntityType, BuiltList<String>> selectedEntities) =>
|
|
||||||
_$this._selectedEntities = selectedEntities;
|
|
||||||
|
|
||||||
DashboardUIStateBuilder();
|
DashboardUIStateBuilder();
|
||||||
|
|
||||||
DashboardUIStateBuilder get _$this {
|
DashboardUIStateBuilder get _$this {
|
||||||
|
|
@ -326,7 +294,6 @@ class DashboardUIStateBuilder
|
||||||
_compareCustomEndDate = _$v.compareCustomEndDate;
|
_compareCustomEndDate = _$v.compareCustomEndDate;
|
||||||
_offset = _$v.offset;
|
_offset = _$v.offset;
|
||||||
_currencyId = _$v.currencyId;
|
_currencyId = _$v.currencyId;
|
||||||
_selectedEntities = _$v.selectedEntities?.toBuilder();
|
|
||||||
_$v = null;
|
_$v = null;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
|
@ -347,31 +314,17 @@ class DashboardUIStateBuilder
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_$DashboardUIState build() {
|
_$DashboardUIState build() {
|
||||||
_$DashboardUIState _$result;
|
final _$result = _$v ??
|
||||||
try {
|
new _$DashboardUIState._(
|
||||||
_$result = _$v ??
|
dateRange: dateRange,
|
||||||
new _$DashboardUIState._(
|
customStartDate: customStartDate,
|
||||||
dateRange: dateRange,
|
customEndDate: customEndDate,
|
||||||
customStartDate: customStartDate,
|
enableComparison: enableComparison,
|
||||||
customEndDate: customEndDate,
|
compareDateRange: compareDateRange,
|
||||||
enableComparison: enableComparison,
|
compareCustomStartDate: compareCustomStartDate,
|
||||||
compareDateRange: compareDateRange,
|
compareCustomEndDate: compareCustomEndDate,
|
||||||
compareCustomStartDate: compareCustomStartDate,
|
offset: offset,
|
||||||
compareCustomEndDate: compareCustomEndDate,
|
currencyId: currencyId);
|
||||||
offset: offset,
|
|
||||||
currencyId: currencyId,
|
|
||||||
selectedEntities: selectedEntities.build());
|
|
||||||
} catch (_) {
|
|
||||||
String _$failedField;
|
|
||||||
try {
|
|
||||||
_$failedField = 'selectedEntities';
|
|
||||||
selectedEntities.build();
|
|
||||||
} catch (e) {
|
|
||||||
throw new BuiltValueNestedFieldError(
|
|
||||||
'DashboardUIState', _$failedField, e.toString());
|
|
||||||
}
|
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
replace(_$result);
|
replace(_$result);
|
||||||
return _$result;
|
return _$result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/client/client_actions.dart';
|
import 'package:invoiceninja_flutter/redux/client/client_actions.dart';
|
||||||
|
|
@ -21,11 +22,10 @@ import 'package:invoiceninja_flutter/redux/project/project_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/quote/quote_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/quote/quote_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/task/task_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/task/task_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/vendor/vendor_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/vendor/vendor_reducer.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_reducer.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/token/token_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/token/token_reducer.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/payment_term/payment_term_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/payment_term/payment_term_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/design/design_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/design/design_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/credit/credit_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/credit/credit_reducer.dart';
|
||||||
|
|
@ -89,6 +89,16 @@ UIState uiReducer(UIState state, dynamic action) {
|
||||||
.replace(settingsUIReducer(state.settingsUIState, action)));
|
.replace(settingsUIReducer(state.settingsUIState, action)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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));
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
|
||||||
Reducer<String> filterReducer = combineReducers([
|
Reducer<String> filterReducer = combineReducers([
|
||||||
TypedReducer<String, FilterCompany>((filter, action) {
|
TypedReducer<String, FilterCompany>((filter, action) {
|
||||||
return action.filter;
|
return action.filter;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
import 'package:built_value/built_value.dart';
|
import 'package:built_value/built_value.dart';
|
||||||
import 'package:built_value/serializer.dart';
|
import 'package:built_value/serializer.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||||
|
|
@ -36,6 +37,7 @@ abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||||
currentRoute: currentRoute ?? LoginScreen.route,
|
currentRoute: currentRoute ?? LoginScreen.route,
|
||||||
previousRoute: '',
|
previousRoute: '',
|
||||||
dashboardUIState: DashboardUIState(),
|
dashboardUIState: DashboardUIState(),
|
||||||
|
selectedEntities: BuiltMap<EntityType, BuiltList<String>>(),
|
||||||
productUIState: ProductUIState(),
|
productUIState: ProductUIState(),
|
||||||
clientUIState: ClientUIState(),
|
clientUIState: ClientUIState(),
|
||||||
invoiceUIState: InvoiceUIState(),
|
invoiceUIState: InvoiceUIState(),
|
||||||
|
|
@ -69,6 +71,8 @@ abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||||
|
|
||||||
int get selectedCompanyIndex;
|
int get selectedCompanyIndex;
|
||||||
|
|
||||||
|
BuiltMap<EntityType, BuiltList<String>> get selectedEntities;
|
||||||
|
|
||||||
String get currentRoute;
|
String get currentRoute;
|
||||||
|
|
||||||
String get previousRoute;
|
String get previousRoute;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
||||||
'selectedCompanyIndex',
|
'selectedCompanyIndex',
|
||||||
serializers.serialize(object.selectedCompanyIndex,
|
serializers.serialize(object.selectedCompanyIndex,
|
||||||
specifiedType: const FullType(int)),
|
specifiedType: const FullType(int)),
|
||||||
|
'selectedEntities',
|
||||||
|
serializers.serialize(object.selectedEntities,
|
||||||
|
specifiedType: const FullType(BuiltMap, const [
|
||||||
|
const FullType(EntityType),
|
||||||
|
const FullType(BuiltList, const [const FullType(String)])
|
||||||
|
])),
|
||||||
'currentRoute',
|
'currentRoute',
|
||||||
serializers.serialize(object.currentRoute,
|
serializers.serialize(object.currentRoute,
|
||||||
specifiedType: const FullType(String)),
|
specifiedType: const FullType(String)),
|
||||||
|
|
@ -133,6 +139,13 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
||||||
result.selectedCompanyIndex = serializers.deserialize(value,
|
result.selectedCompanyIndex = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(int)) as int;
|
specifiedType: const FullType(int)) as int;
|
||||||
break;
|
break;
|
||||||
|
case 'selectedEntities':
|
||||||
|
result.selectedEntities.replace(serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(BuiltMap, const [
|
||||||
|
const FullType(EntityType),
|
||||||
|
const FullType(BuiltList, const [const FullType(String)])
|
||||||
|
])));
|
||||||
|
break;
|
||||||
case 'currentRoute':
|
case 'currentRoute':
|
||||||
result.currentRoute = serializers.deserialize(value,
|
result.currentRoute = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(String)) as String;
|
specifiedType: const FullType(String)) as String;
|
||||||
|
|
@ -261,6 +274,8 @@ class _$UIState extends UIState {
|
||||||
@override
|
@override
|
||||||
final int selectedCompanyIndex;
|
final int selectedCompanyIndex;
|
||||||
@override
|
@override
|
||||||
|
final BuiltMap<EntityType, BuiltList<String>> selectedEntities;
|
||||||
|
@override
|
||||||
final String currentRoute;
|
final String currentRoute;
|
||||||
@override
|
@override
|
||||||
final String previousRoute;
|
final String previousRoute;
|
||||||
|
|
@ -322,6 +337,7 @@ class _$UIState extends UIState {
|
||||||
|
|
||||||
_$UIState._(
|
_$UIState._(
|
||||||
{this.selectedCompanyIndex,
|
{this.selectedCompanyIndex,
|
||||||
|
this.selectedEntities,
|
||||||
this.currentRoute,
|
this.currentRoute,
|
||||||
this.previousRoute,
|
this.previousRoute,
|
||||||
this.filterEntityId,
|
this.filterEntityId,
|
||||||
|
|
@ -354,6 +370,9 @@ class _$UIState extends UIState {
|
||||||
if (selectedCompanyIndex == null) {
|
if (selectedCompanyIndex == null) {
|
||||||
throw new BuiltValueNullFieldError('UIState', 'selectedCompanyIndex');
|
throw new BuiltValueNullFieldError('UIState', 'selectedCompanyIndex');
|
||||||
}
|
}
|
||||||
|
if (selectedEntities == null) {
|
||||||
|
throw new BuiltValueNullFieldError('UIState', 'selectedEntities');
|
||||||
|
}
|
||||||
if (currentRoute == null) {
|
if (currentRoute == null) {
|
||||||
throw new BuiltValueNullFieldError('UIState', 'currentRoute');
|
throw new BuiltValueNullFieldError('UIState', 'currentRoute');
|
||||||
}
|
}
|
||||||
|
|
@ -443,6 +462,7 @@ class _$UIState extends UIState {
|
||||||
if (identical(other, this)) return true;
|
if (identical(other, this)) return true;
|
||||||
return other is UIState &&
|
return other is UIState &&
|
||||||
selectedCompanyIndex == other.selectedCompanyIndex &&
|
selectedCompanyIndex == other.selectedCompanyIndex &&
|
||||||
|
selectedEntities == other.selectedEntities &&
|
||||||
currentRoute == other.currentRoute &&
|
currentRoute == other.currentRoute &&
|
||||||
previousRoute == other.previousRoute &&
|
previousRoute == other.previousRoute &&
|
||||||
filterEntityId == other.filterEntityId &&
|
filterEntityId == other.filterEntityId &&
|
||||||
|
|
@ -494,7 +514,7 @@ class _$UIState extends UIState {
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, selectedCompanyIndex.hashCode), currentRoute.hashCode), previousRoute.hashCode), filterEntityId.hashCode), filterEntityType.hashCode), filter.hashCode), filterClearedAt.hashCode), dashboardUIState.hashCode), productUIState.hashCode), clientUIState.hashCode),
|
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, selectedCompanyIndex.hashCode), selectedEntities.hashCode), currentRoute.hashCode), previousRoute.hashCode), filterEntityId.hashCode), filterEntityType.hashCode), filter.hashCode), filterClearedAt.hashCode), dashboardUIState.hashCode), productUIState.hashCode), clientUIState.hashCode),
|
||||||
invoiceUIState.hashCode),
|
invoiceUIState.hashCode),
|
||||||
webhookUIState.hashCode),
|
webhookUIState.hashCode),
|
||||||
tokenUIState.hashCode),
|
tokenUIState.hashCode),
|
||||||
|
|
@ -520,6 +540,7 @@ class _$UIState extends UIState {
|
||||||
String toString() {
|
String toString() {
|
||||||
return (newBuiltValueToStringHelper('UIState')
|
return (newBuiltValueToStringHelper('UIState')
|
||||||
..add('selectedCompanyIndex', selectedCompanyIndex)
|
..add('selectedCompanyIndex', selectedCompanyIndex)
|
||||||
|
..add('selectedEntities', selectedEntities)
|
||||||
..add('currentRoute', currentRoute)
|
..add('currentRoute', currentRoute)
|
||||||
..add('previousRoute', previousRoute)
|
..add('previousRoute', previousRoute)
|
||||||
..add('filterEntityId', filterEntityId)
|
..add('filterEntityId', filterEntityId)
|
||||||
|
|
@ -560,6 +581,14 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
set selectedCompanyIndex(int selectedCompanyIndex) =>
|
set selectedCompanyIndex(int selectedCompanyIndex) =>
|
||||||
_$this._selectedCompanyIndex = selectedCompanyIndex;
|
_$this._selectedCompanyIndex = selectedCompanyIndex;
|
||||||
|
|
||||||
|
MapBuilder<EntityType, BuiltList<String>> _selectedEntities;
|
||||||
|
MapBuilder<EntityType, BuiltList<String>> get selectedEntities =>
|
||||||
|
_$this._selectedEntities ??=
|
||||||
|
new MapBuilder<EntityType, BuiltList<String>>();
|
||||||
|
set selectedEntities(
|
||||||
|
MapBuilder<EntityType, BuiltList<String>> selectedEntities) =>
|
||||||
|
_$this._selectedEntities = selectedEntities;
|
||||||
|
|
||||||
String _currentRoute;
|
String _currentRoute;
|
||||||
String get currentRoute => _$this._currentRoute;
|
String get currentRoute => _$this._currentRoute;
|
||||||
set currentRoute(String currentRoute) => _$this._currentRoute = currentRoute;
|
set currentRoute(String currentRoute) => _$this._currentRoute = currentRoute;
|
||||||
|
|
@ -726,6 +755,7 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
UIStateBuilder get _$this {
|
UIStateBuilder get _$this {
|
||||||
if (_$v != null) {
|
if (_$v != null) {
|
||||||
_selectedCompanyIndex = _$v.selectedCompanyIndex;
|
_selectedCompanyIndex = _$v.selectedCompanyIndex;
|
||||||
|
_selectedEntities = _$v.selectedEntities?.toBuilder();
|
||||||
_currentRoute = _$v.currentRoute;
|
_currentRoute = _$v.currentRoute;
|
||||||
_previousRoute = _$v.previousRoute;
|
_previousRoute = _$v.previousRoute;
|
||||||
_filterEntityId = _$v.filterEntityId;
|
_filterEntityId = _$v.filterEntityId;
|
||||||
|
|
@ -779,6 +809,7 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
_$result = _$v ??
|
_$result = _$v ??
|
||||||
new _$UIState._(
|
new _$UIState._(
|
||||||
selectedCompanyIndex: selectedCompanyIndex,
|
selectedCompanyIndex: selectedCompanyIndex,
|
||||||
|
selectedEntities: selectedEntities.build(),
|
||||||
currentRoute: currentRoute,
|
currentRoute: currentRoute,
|
||||||
previousRoute: previousRoute,
|
previousRoute: previousRoute,
|
||||||
filterEntityId: filterEntityId,
|
filterEntityId: filterEntityId,
|
||||||
|
|
@ -810,6 +841,9 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
String _$failedField;
|
String _$failedField;
|
||||||
try {
|
try {
|
||||||
|
_$failedField = 'selectedEntities';
|
||||||
|
selectedEntities.build();
|
||||||
|
|
||||||
_$failedField = 'dashboardUIState';
|
_$failedField = 'dashboardUIState';
|
||||||
dashboardUIState.build();
|
dashboardUIState.build();
|
||||||
_$failedField = 'productUIState';
|
_$failedField = 'productUIState';
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ class _InvoiceSidebar extends StatelessWidget {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final invoices = memoizedUpcomingInvoices(state.invoiceState.map);
|
final invoices = memoizedUpcomingInvoices(state.invoiceState.map);
|
||||||
final selectedIds =
|
final selectedIds =
|
||||||
state.dashboardUIState.selectedEntities[EntityType.invoice];
|
state.uiState.selectedEntities[EntityType.invoice];
|
||||||
|
|
||||||
return _DashboardSidebar(
|
return _DashboardSidebar(
|
||||||
label1: localization.upcomingInvoices,
|
label1: localization.upcomingInvoices,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue