This commit is contained in:
+1
@@ -41,6 +41,7 @@ class PurchasingAnalyticLoaderBloc
|
||||
dateFrom: state.dateFrom,
|
||||
dateTo: state.dateTo,
|
||||
outletId: state.outletId,
|
||||
groupBy: state.groupBy,
|
||||
);
|
||||
|
||||
final newState = result.fold(
|
||||
|
||||
+24
-2
@@ -529,6 +529,7 @@ mixin _$PurchasingAnalyticLoaderState {
|
||||
DateTime get dateFrom => throw _privateConstructorUsedError;
|
||||
DateTime get dateTo => throw _privateConstructorUsedError;
|
||||
String? get outletId => throw _privateConstructorUsedError;
|
||||
String get groupBy => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of PurchasingAnalyticLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -555,6 +556,7 @@ abstract class $PurchasingAnalyticLoaderStateCopyWith<$Res> {
|
||||
DateTime dateFrom,
|
||||
DateTime dateTo,
|
||||
String? outletId,
|
||||
String groupBy,
|
||||
});
|
||||
|
||||
$PurchasingAnalyticCopyWith<$Res> get purchasing;
|
||||
@@ -584,6 +586,7 @@ class _$PurchasingAnalyticLoaderStateCopyWithImpl<
|
||||
Object? dateFrom = null,
|
||||
Object? dateTo = null,
|
||||
Object? outletId = freezed,
|
||||
Object? groupBy = null,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
@@ -611,6 +614,10 @@ class _$PurchasingAnalyticLoaderStateCopyWithImpl<
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
groupBy: null == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
@@ -643,6 +650,7 @@ abstract class _$$PurchasingAnalyticLoaderStateImplCopyWith<$Res>
|
||||
DateTime dateFrom,
|
||||
DateTime dateTo,
|
||||
String? outletId,
|
||||
String groupBy,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -673,6 +681,7 @@ class __$$PurchasingAnalyticLoaderStateImplCopyWithImpl<$Res>
|
||||
Object? dateFrom = null,
|
||||
Object? dateTo = null,
|
||||
Object? outletId = freezed,
|
||||
Object? groupBy = null,
|
||||
}) {
|
||||
return _then(
|
||||
_$PurchasingAnalyticLoaderStateImpl(
|
||||
@@ -700,6 +709,10 @@ class __$$PurchasingAnalyticLoaderStateImplCopyWithImpl<$Res>
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
groupBy: null == groupBy
|
||||
? _value.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -716,6 +729,7 @@ class _$PurchasingAnalyticLoaderStateImpl
|
||||
required this.dateFrom,
|
||||
required this.dateTo,
|
||||
this.outletId,
|
||||
this.groupBy = 'day',
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -731,10 +745,13 @@ class _$PurchasingAnalyticLoaderStateImpl
|
||||
final DateTime dateTo;
|
||||
@override
|
||||
final String? outletId;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String groupBy;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PurchasingAnalyticLoaderState(purchasing: $purchasing, failureOptionPurchasing: $failureOptionPurchasing, isFetching: $isFetching, dateFrom: $dateFrom, dateTo: $dateTo, outletId: $outletId)';
|
||||
return 'PurchasingAnalyticLoaderState(purchasing: $purchasing, failureOptionPurchasing: $failureOptionPurchasing, isFetching: $isFetching, dateFrom: $dateFrom, dateTo: $dateTo, outletId: $outletId, groupBy: $groupBy)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -755,7 +772,8 @@ class _$PurchasingAnalyticLoaderStateImpl
|
||||
other.dateFrom == dateFrom) &&
|
||||
(identical(other.dateTo, dateTo) || other.dateTo == dateTo) &&
|
||||
(identical(other.outletId, outletId) ||
|
||||
other.outletId == outletId));
|
||||
other.outletId == outletId) &&
|
||||
(identical(other.groupBy, groupBy) || other.groupBy == groupBy));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -767,6 +785,7 @@ class _$PurchasingAnalyticLoaderStateImpl
|
||||
dateFrom,
|
||||
dateTo,
|
||||
outletId,
|
||||
groupBy,
|
||||
);
|
||||
|
||||
/// Create a copy of PurchasingAnalyticLoaderState
|
||||
@@ -792,6 +811,7 @@ abstract class _PurchasingAnalyticLoaderState
|
||||
required final DateTime dateFrom,
|
||||
required final DateTime dateTo,
|
||||
final String? outletId,
|
||||
final String groupBy,
|
||||
}) = _$PurchasingAnalyticLoaderStateImpl;
|
||||
|
||||
@override
|
||||
@@ -806,6 +826,8 @@ abstract class _PurchasingAnalyticLoaderState
|
||||
DateTime get dateTo;
|
||||
@override
|
||||
String? get outletId;
|
||||
@override
|
||||
String get groupBy;
|
||||
|
||||
/// Create a copy of PurchasingAnalyticLoaderState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
+1
@@ -9,6 +9,7 @@ class PurchasingAnalyticLoaderState with _$PurchasingAnalyticLoaderState {
|
||||
required DateTime dateFrom,
|
||||
required DateTime dateTo,
|
||||
String? outletId,
|
||||
@Default('day') String groupBy,
|
||||
}) = _PurchasingAnalyticLoaderState;
|
||||
|
||||
factory PurchasingAnalyticLoaderState.initial() =>
|
||||
|
||||
Reference in New Issue
Block a user