feat: report purchasing
Some checks are pending
Build & Deploy iOS to TestFlight / build-and-deploy (push) Waiting to run
Some checks are pending
Build & Deploy iOS to TestFlight / build-and-deploy (push) Waiting to run
This commit is contained in:
parent
c1cefb122b
commit
0b70194d8e
BIN
assets/icons/ic-report-exclusive-summary.png
Normal file
BIN
assets/icons/ic-report-exclusive-summary.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 498 KiB |
@ -41,6 +41,7 @@ class PurchasingAnalyticLoaderBloc
|
||||
dateFrom: state.dateFrom,
|
||||
dateTo: state.dateTo,
|
||||
outletId: state.outletId,
|
||||
groupBy: state.groupBy,
|
||||
);
|
||||
|
||||
final newState = result.fold(
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -9,6 +9,7 @@ class PurchasingAnalyticLoaderState with _$PurchasingAnalyticLoaderState {
|
||||
required DateTime dateFrom,
|
||||
required DateTime dateTo,
|
||||
String? outletId,
|
||||
@Default('day') String groupBy,
|
||||
}) = _PurchasingAnalyticLoaderState;
|
||||
|
||||
factory PurchasingAnalyticLoaderState.initial() =>
|
||||
|
||||
@ -7465,7 +7465,11 @@ abstract class _PurchasingAnalytic implements PurchasingAnalytic {
|
||||
/// @nodoc
|
||||
mixin _$PurchasingAnalyticSummary {
|
||||
int get totalPurchases => throw _privateConstructorUsedError;
|
||||
int get rawMaterialPurchases => throw _privateConstructorUsedError;
|
||||
int get expensePurchases => throw _privateConstructorUsedError;
|
||||
int get totalPurchaseOrders => throw _privateConstructorUsedError;
|
||||
int get rawMaterialPurchaseOrders => throw _privateConstructorUsedError;
|
||||
int get expenseCount => throw _privateConstructorUsedError;
|
||||
int get totalQuantity => throw _privateConstructorUsedError;
|
||||
double get averagePurchaseOrderValue => throw _privateConstructorUsedError;
|
||||
int get totalIngredients => throw _privateConstructorUsedError;
|
||||
@ -7487,7 +7491,11 @@ abstract class $PurchasingAnalyticSummaryCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call({
|
||||
int totalPurchases,
|
||||
int rawMaterialPurchases,
|
||||
int expensePurchases,
|
||||
int totalPurchaseOrders,
|
||||
int rawMaterialPurchaseOrders,
|
||||
int expenseCount,
|
||||
int totalQuantity,
|
||||
double averagePurchaseOrderValue,
|
||||
int totalIngredients,
|
||||
@ -7514,7 +7522,11 @@ class _$PurchasingAnalyticSummaryCopyWithImpl<
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalPurchases = null,
|
||||
Object? rawMaterialPurchases = null,
|
||||
Object? expensePurchases = null,
|
||||
Object? totalPurchaseOrders = null,
|
||||
Object? rawMaterialPurchaseOrders = null,
|
||||
Object? expenseCount = null,
|
||||
Object? totalQuantity = null,
|
||||
Object? averagePurchaseOrderValue = null,
|
||||
Object? totalIngredients = null,
|
||||
@ -7526,10 +7538,26 @@ class _$PurchasingAnalyticSummaryCopyWithImpl<
|
||||
? _value.totalPurchases
|
||||
: totalPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchases: null == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expensePurchases: null == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalPurchaseOrders: null == totalPurchaseOrders
|
||||
? _value.totalPurchaseOrders
|
||||
: totalPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchaseOrders: null == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expenseCount: null == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalQuantity: null == totalQuantity
|
||||
? _value.totalQuantity
|
||||
: totalQuantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -7563,7 +7591,11 @@ abstract class _$$PurchasingAnalyticSummaryImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call({
|
||||
int totalPurchases,
|
||||
int rawMaterialPurchases,
|
||||
int expensePurchases,
|
||||
int totalPurchaseOrders,
|
||||
int rawMaterialPurchaseOrders,
|
||||
int expenseCount,
|
||||
int totalQuantity,
|
||||
double averagePurchaseOrderValue,
|
||||
int totalIngredients,
|
||||
@ -7590,7 +7622,11 @@ class __$$PurchasingAnalyticSummaryImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalPurchases = null,
|
||||
Object? rawMaterialPurchases = null,
|
||||
Object? expensePurchases = null,
|
||||
Object? totalPurchaseOrders = null,
|
||||
Object? rawMaterialPurchaseOrders = null,
|
||||
Object? expenseCount = null,
|
||||
Object? totalQuantity = null,
|
||||
Object? averagePurchaseOrderValue = null,
|
||||
Object? totalIngredients = null,
|
||||
@ -7602,10 +7638,26 @@ class __$$PurchasingAnalyticSummaryImplCopyWithImpl<$Res>
|
||||
? _value.totalPurchases
|
||||
: totalPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchases: null == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expensePurchases: null == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalPurchaseOrders: null == totalPurchaseOrders
|
||||
? _value.totalPurchaseOrders
|
||||
: totalPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchaseOrders: null == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expenseCount: null == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalQuantity: null == totalQuantity
|
||||
? _value.totalQuantity
|
||||
: totalQuantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -7632,7 +7684,11 @@ class __$$PurchasingAnalyticSummaryImplCopyWithImpl<$Res>
|
||||
class _$PurchasingAnalyticSummaryImpl implements _PurchasingAnalyticSummary {
|
||||
const _$PurchasingAnalyticSummaryImpl({
|
||||
required this.totalPurchases,
|
||||
required this.rawMaterialPurchases,
|
||||
required this.expensePurchases,
|
||||
required this.totalPurchaseOrders,
|
||||
required this.rawMaterialPurchaseOrders,
|
||||
required this.expenseCount,
|
||||
required this.totalQuantity,
|
||||
required this.averagePurchaseOrderValue,
|
||||
required this.totalIngredients,
|
||||
@ -7642,8 +7698,16 @@ class _$PurchasingAnalyticSummaryImpl implements _PurchasingAnalyticSummary {
|
||||
@override
|
||||
final int totalPurchases;
|
||||
@override
|
||||
final int rawMaterialPurchases;
|
||||
@override
|
||||
final int expensePurchases;
|
||||
@override
|
||||
final int totalPurchaseOrders;
|
||||
@override
|
||||
final int rawMaterialPurchaseOrders;
|
||||
@override
|
||||
final int expenseCount;
|
||||
@override
|
||||
final int totalQuantity;
|
||||
@override
|
||||
final double averagePurchaseOrderValue;
|
||||
@ -7654,7 +7718,7 @@ class _$PurchasingAnalyticSummaryImpl implements _PurchasingAnalyticSummary {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PurchasingAnalyticSummary(totalPurchases: $totalPurchases, totalPurchaseOrders: $totalPurchaseOrders, totalQuantity: $totalQuantity, averagePurchaseOrderValue: $averagePurchaseOrderValue, totalIngredients: $totalIngredients, totalVendors: $totalVendors)';
|
||||
return 'PurchasingAnalyticSummary(totalPurchases: $totalPurchases, rawMaterialPurchases: $rawMaterialPurchases, expensePurchases: $expensePurchases, totalPurchaseOrders: $totalPurchaseOrders, rawMaterialPurchaseOrders: $rawMaterialPurchaseOrders, expenseCount: $expenseCount, totalQuantity: $totalQuantity, averagePurchaseOrderValue: $averagePurchaseOrderValue, totalIngredients: $totalIngredients, totalVendors: $totalVendors)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -7664,8 +7728,19 @@ class _$PurchasingAnalyticSummaryImpl implements _PurchasingAnalyticSummary {
|
||||
other is _$PurchasingAnalyticSummaryImpl &&
|
||||
(identical(other.totalPurchases, totalPurchases) ||
|
||||
other.totalPurchases == totalPurchases) &&
|
||||
(identical(other.rawMaterialPurchases, rawMaterialPurchases) ||
|
||||
other.rawMaterialPurchases == rawMaterialPurchases) &&
|
||||
(identical(other.expensePurchases, expensePurchases) ||
|
||||
other.expensePurchases == expensePurchases) &&
|
||||
(identical(other.totalPurchaseOrders, totalPurchaseOrders) ||
|
||||
other.totalPurchaseOrders == totalPurchaseOrders) &&
|
||||
(identical(
|
||||
other.rawMaterialPurchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
) ||
|
||||
other.rawMaterialPurchaseOrders == rawMaterialPurchaseOrders) &&
|
||||
(identical(other.expenseCount, expenseCount) ||
|
||||
other.expenseCount == expenseCount) &&
|
||||
(identical(other.totalQuantity, totalQuantity) ||
|
||||
other.totalQuantity == totalQuantity) &&
|
||||
(identical(
|
||||
@ -7683,7 +7758,11 @@ class _$PurchasingAnalyticSummaryImpl implements _PurchasingAnalyticSummary {
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalPurchases,
|
||||
rawMaterialPurchases,
|
||||
expensePurchases,
|
||||
totalPurchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
expenseCount,
|
||||
totalQuantity,
|
||||
averagePurchaseOrderValue,
|
||||
totalIngredients,
|
||||
@ -7705,7 +7784,11 @@ class _$PurchasingAnalyticSummaryImpl implements _PurchasingAnalyticSummary {
|
||||
abstract class _PurchasingAnalyticSummary implements PurchasingAnalyticSummary {
|
||||
const factory _PurchasingAnalyticSummary({
|
||||
required final int totalPurchases,
|
||||
required final int rawMaterialPurchases,
|
||||
required final int expensePurchases,
|
||||
required final int totalPurchaseOrders,
|
||||
required final int rawMaterialPurchaseOrders,
|
||||
required final int expenseCount,
|
||||
required final int totalQuantity,
|
||||
required final double averagePurchaseOrderValue,
|
||||
required final int totalIngredients,
|
||||
@ -7715,8 +7798,16 @@ abstract class _PurchasingAnalyticSummary implements PurchasingAnalyticSummary {
|
||||
@override
|
||||
int get totalPurchases;
|
||||
@override
|
||||
int get rawMaterialPurchases;
|
||||
@override
|
||||
int get expensePurchases;
|
||||
@override
|
||||
int get totalPurchaseOrders;
|
||||
@override
|
||||
int get rawMaterialPurchaseOrders;
|
||||
@override
|
||||
int get expenseCount;
|
||||
@override
|
||||
int get totalQuantity;
|
||||
@override
|
||||
double get averagePurchaseOrderValue;
|
||||
@ -7737,7 +7828,11 @@ abstract class _PurchasingAnalyticSummary implements PurchasingAnalyticSummary {
|
||||
mixin _$PurchasingAnalyticData {
|
||||
DateTime get date => throw _privateConstructorUsedError;
|
||||
int get purchases => throw _privateConstructorUsedError;
|
||||
int get rawMaterialPurchases => throw _privateConstructorUsedError;
|
||||
int get expensePurchases => throw _privateConstructorUsedError;
|
||||
int get purchaseOrders => throw _privateConstructorUsedError;
|
||||
int get rawMaterialPurchaseOrders => throw _privateConstructorUsedError;
|
||||
int get expenseCount => throw _privateConstructorUsedError;
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
int get ingredients => throw _privateConstructorUsedError;
|
||||
int get vendors => throw _privateConstructorUsedError;
|
||||
@ -7759,7 +7854,11 @@ abstract class $PurchasingAnalyticDataCopyWith<$Res> {
|
||||
$Res call({
|
||||
DateTime date,
|
||||
int purchases,
|
||||
int rawMaterialPurchases,
|
||||
int expensePurchases,
|
||||
int purchaseOrders,
|
||||
int rawMaterialPurchaseOrders,
|
||||
int expenseCount,
|
||||
int quantity,
|
||||
int ingredients,
|
||||
int vendors,
|
||||
@ -7786,7 +7885,11 @@ class _$PurchasingAnalyticDataCopyWithImpl<
|
||||
$Res call({
|
||||
Object? date = null,
|
||||
Object? purchases = null,
|
||||
Object? rawMaterialPurchases = null,
|
||||
Object? expensePurchases = null,
|
||||
Object? purchaseOrders = null,
|
||||
Object? rawMaterialPurchaseOrders = null,
|
||||
Object? expenseCount = null,
|
||||
Object? quantity = null,
|
||||
Object? ingredients = null,
|
||||
Object? vendors = null,
|
||||
@ -7801,10 +7904,26 @@ class _$PurchasingAnalyticDataCopyWithImpl<
|
||||
? _value.purchases
|
||||
: purchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchases: null == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expensePurchases: null == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
purchaseOrders: null == purchaseOrders
|
||||
? _value.purchaseOrders
|
||||
: purchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchaseOrders: null == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expenseCount: null == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -7835,7 +7954,11 @@ abstract class _$$PurchasingAnalyticDataImplCopyWith<$Res>
|
||||
$Res call({
|
||||
DateTime date,
|
||||
int purchases,
|
||||
int rawMaterialPurchases,
|
||||
int expensePurchases,
|
||||
int purchaseOrders,
|
||||
int rawMaterialPurchaseOrders,
|
||||
int expenseCount,
|
||||
int quantity,
|
||||
int ingredients,
|
||||
int vendors,
|
||||
@ -7859,7 +7982,11 @@ class __$$PurchasingAnalyticDataImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? date = null,
|
||||
Object? purchases = null,
|
||||
Object? rawMaterialPurchases = null,
|
||||
Object? expensePurchases = null,
|
||||
Object? purchaseOrders = null,
|
||||
Object? rawMaterialPurchaseOrders = null,
|
||||
Object? expenseCount = null,
|
||||
Object? quantity = null,
|
||||
Object? ingredients = null,
|
||||
Object? vendors = null,
|
||||
@ -7874,10 +8001,26 @@ class __$$PurchasingAnalyticDataImplCopyWithImpl<$Res>
|
||||
? _value.purchases
|
||||
: purchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchases: null == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expensePurchases: null == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
purchaseOrders: null == purchaseOrders
|
||||
? _value.purchaseOrders
|
||||
: purchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
rawMaterialPurchaseOrders: null == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
expenseCount: null == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
quantity: null == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -7901,7 +8044,11 @@ class _$PurchasingAnalyticDataImpl implements _PurchasingAnalyticData {
|
||||
const _$PurchasingAnalyticDataImpl({
|
||||
required this.date,
|
||||
required this.purchases,
|
||||
required this.rawMaterialPurchases,
|
||||
required this.expensePurchases,
|
||||
required this.purchaseOrders,
|
||||
required this.rawMaterialPurchaseOrders,
|
||||
required this.expenseCount,
|
||||
required this.quantity,
|
||||
required this.ingredients,
|
||||
required this.vendors,
|
||||
@ -7912,8 +8059,16 @@ class _$PurchasingAnalyticDataImpl implements _PurchasingAnalyticData {
|
||||
@override
|
||||
final int purchases;
|
||||
@override
|
||||
final int rawMaterialPurchases;
|
||||
@override
|
||||
final int expensePurchases;
|
||||
@override
|
||||
final int purchaseOrders;
|
||||
@override
|
||||
final int rawMaterialPurchaseOrders;
|
||||
@override
|
||||
final int expenseCount;
|
||||
@override
|
||||
final int quantity;
|
||||
@override
|
||||
final int ingredients;
|
||||
@ -7922,7 +8077,7 @@ class _$PurchasingAnalyticDataImpl implements _PurchasingAnalyticData {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PurchasingAnalyticData(date: $date, purchases: $purchases, purchaseOrders: $purchaseOrders, quantity: $quantity, ingredients: $ingredients, vendors: $vendors)';
|
||||
return 'PurchasingAnalyticData(date: $date, purchases: $purchases, rawMaterialPurchases: $rawMaterialPurchases, expensePurchases: $expensePurchases, purchaseOrders: $purchaseOrders, rawMaterialPurchaseOrders: $rawMaterialPurchaseOrders, expenseCount: $expenseCount, quantity: $quantity, ingredients: $ingredients, vendors: $vendors)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -7933,8 +8088,19 @@ class _$PurchasingAnalyticDataImpl implements _PurchasingAnalyticData {
|
||||
(identical(other.date, date) || other.date == date) &&
|
||||
(identical(other.purchases, purchases) ||
|
||||
other.purchases == purchases) &&
|
||||
(identical(other.rawMaterialPurchases, rawMaterialPurchases) ||
|
||||
other.rawMaterialPurchases == rawMaterialPurchases) &&
|
||||
(identical(other.expensePurchases, expensePurchases) ||
|
||||
other.expensePurchases == expensePurchases) &&
|
||||
(identical(other.purchaseOrders, purchaseOrders) ||
|
||||
other.purchaseOrders == purchaseOrders) &&
|
||||
(identical(
|
||||
other.rawMaterialPurchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
) ||
|
||||
other.rawMaterialPurchaseOrders == rawMaterialPurchaseOrders) &&
|
||||
(identical(other.expenseCount, expenseCount) ||
|
||||
other.expenseCount == expenseCount) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.ingredients, ingredients) ||
|
||||
@ -7947,7 +8113,11 @@ class _$PurchasingAnalyticDataImpl implements _PurchasingAnalyticData {
|
||||
runtimeType,
|
||||
date,
|
||||
purchases,
|
||||
rawMaterialPurchases,
|
||||
expensePurchases,
|
||||
purchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
expenseCount,
|
||||
quantity,
|
||||
ingredients,
|
||||
vendors,
|
||||
@ -7970,7 +8140,11 @@ abstract class _PurchasingAnalyticData implements PurchasingAnalyticData {
|
||||
const factory _PurchasingAnalyticData({
|
||||
required final DateTime date,
|
||||
required final int purchases,
|
||||
required final int rawMaterialPurchases,
|
||||
required final int expensePurchases,
|
||||
required final int purchaseOrders,
|
||||
required final int rawMaterialPurchaseOrders,
|
||||
required final int expenseCount,
|
||||
required final int quantity,
|
||||
required final int ingredients,
|
||||
required final int vendors,
|
||||
@ -7981,8 +8155,16 @@ abstract class _PurchasingAnalyticData implements PurchasingAnalyticData {
|
||||
@override
|
||||
int get purchases;
|
||||
@override
|
||||
int get rawMaterialPurchases;
|
||||
@override
|
||||
int get expensePurchases;
|
||||
@override
|
||||
int get purchaseOrders;
|
||||
@override
|
||||
int get rawMaterialPurchaseOrders;
|
||||
@override
|
||||
int get expenseCount;
|
||||
@override
|
||||
int get quantity;
|
||||
@override
|
||||
int get ingredients;
|
||||
|
||||
@ -33,7 +33,11 @@ class PurchasingAnalytic with _$PurchasingAnalytic {
|
||||
class PurchasingAnalyticSummary with _$PurchasingAnalyticSummary {
|
||||
const factory PurchasingAnalyticSummary({
|
||||
required int totalPurchases,
|
||||
required int rawMaterialPurchases,
|
||||
required int expensePurchases,
|
||||
required int totalPurchaseOrders,
|
||||
required int rawMaterialPurchaseOrders,
|
||||
required int expenseCount,
|
||||
required int totalQuantity,
|
||||
required double averagePurchaseOrderValue,
|
||||
required int totalIngredients,
|
||||
@ -43,7 +47,11 @@ class PurchasingAnalyticSummary with _$PurchasingAnalyticSummary {
|
||||
factory PurchasingAnalyticSummary.empty() =>
|
||||
const PurchasingAnalyticSummary(
|
||||
totalPurchases: 0,
|
||||
rawMaterialPurchases: 0,
|
||||
expensePurchases: 0,
|
||||
totalPurchaseOrders: 0,
|
||||
rawMaterialPurchaseOrders: 0,
|
||||
expenseCount: 0,
|
||||
totalQuantity: 0,
|
||||
averagePurchaseOrderValue: 0,
|
||||
totalIngredients: 0,
|
||||
@ -56,7 +64,11 @@ class PurchasingAnalyticData with _$PurchasingAnalyticData {
|
||||
const factory PurchasingAnalyticData({
|
||||
required DateTime date,
|
||||
required int purchases,
|
||||
required int rawMaterialPurchases,
|
||||
required int expensePurchases,
|
||||
required int purchaseOrders,
|
||||
required int rawMaterialPurchaseOrders,
|
||||
required int expenseCount,
|
||||
required int quantity,
|
||||
required int ingredients,
|
||||
required int vendors,
|
||||
@ -65,7 +77,11 @@ class PurchasingAnalyticData with _$PurchasingAnalyticData {
|
||||
factory PurchasingAnalyticData.empty() => PurchasingAnalyticData(
|
||||
date: DateTime.fromMillisecondsSinceEpoch(0),
|
||||
purchases: 0,
|
||||
rawMaterialPurchases: 0,
|
||||
expensePurchases: 0,
|
||||
purchaseOrders: 0,
|
||||
rawMaterialPurchaseOrders: 0,
|
||||
expenseCount: 0,
|
||||
quantity: 0,
|
||||
ingredients: 0,
|
||||
vendors: 0,
|
||||
|
||||
@ -49,5 +49,6 @@ abstract class IAnalyticRepository {
|
||||
required DateTime dateFrom,
|
||||
required DateTime dateTo,
|
||||
String? outletId,
|
||||
String groupBy = 'day',
|
||||
});
|
||||
}
|
||||
|
||||
@ -8704,8 +8704,16 @@ PurchasingAnalyticSummaryDto _$PurchasingAnalyticSummaryDtoFromJson(
|
||||
mixin _$PurchasingAnalyticSummaryDto {
|
||||
@JsonKey(name: 'total_purchases')
|
||||
num? get totalPurchases => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'raw_material_purchases')
|
||||
num? get rawMaterialPurchases => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expense_purchases')
|
||||
num? get expensePurchases => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_purchase_orders')
|
||||
num? get totalPurchaseOrders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? get rawMaterialPurchaseOrders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expense_count')
|
||||
num? get expenseCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'total_quantity')
|
||||
num? get totalQuantity => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'average_purchase_order_value')
|
||||
@ -8738,7 +8746,12 @@ abstract class $PurchasingAnalyticSummaryDtoCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'total_purchases') num? totalPurchases,
|
||||
@JsonKey(name: 'raw_material_purchases') num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') num? expensePurchases,
|
||||
@JsonKey(name: 'total_purchase_orders') num? totalPurchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') num? expenseCount,
|
||||
@JsonKey(name: 'total_quantity') num? totalQuantity,
|
||||
@JsonKey(name: 'average_purchase_order_value')
|
||||
num? averagePurchaseOrderValue,
|
||||
@ -8766,7 +8779,11 @@ class _$PurchasingAnalyticSummaryDtoCopyWithImpl<
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalPurchases = freezed,
|
||||
Object? rawMaterialPurchases = freezed,
|
||||
Object? expensePurchases = freezed,
|
||||
Object? totalPurchaseOrders = freezed,
|
||||
Object? rawMaterialPurchaseOrders = freezed,
|
||||
Object? expenseCount = freezed,
|
||||
Object? totalQuantity = freezed,
|
||||
Object? averagePurchaseOrderValue = freezed,
|
||||
Object? totalIngredients = freezed,
|
||||
@ -8778,10 +8795,26 @@ class _$PurchasingAnalyticSummaryDtoCopyWithImpl<
|
||||
? _value.totalPurchases
|
||||
: totalPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchases: freezed == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expensePurchases: freezed == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
totalPurchaseOrders: freezed == totalPurchaseOrders
|
||||
? _value.totalPurchaseOrders
|
||||
: totalPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchaseOrders: freezed == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expenseCount: freezed == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
totalQuantity: freezed == totalQuantity
|
||||
? _value.totalQuantity
|
||||
: totalQuantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -8815,7 +8848,12 @@ abstract class _$$PurchasingAnalyticSummaryDtoImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: 'total_purchases') num? totalPurchases,
|
||||
@JsonKey(name: 'raw_material_purchases') num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') num? expensePurchases,
|
||||
@JsonKey(name: 'total_purchase_orders') num? totalPurchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') num? expenseCount,
|
||||
@JsonKey(name: 'total_quantity') num? totalQuantity,
|
||||
@JsonKey(name: 'average_purchase_order_value')
|
||||
num? averagePurchaseOrderValue,
|
||||
@ -8843,7 +8881,11 @@ class __$$PurchasingAnalyticSummaryDtoImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? totalPurchases = freezed,
|
||||
Object? rawMaterialPurchases = freezed,
|
||||
Object? expensePurchases = freezed,
|
||||
Object? totalPurchaseOrders = freezed,
|
||||
Object? rawMaterialPurchaseOrders = freezed,
|
||||
Object? expenseCount = freezed,
|
||||
Object? totalQuantity = freezed,
|
||||
Object? averagePurchaseOrderValue = freezed,
|
||||
Object? totalIngredients = freezed,
|
||||
@ -8855,10 +8897,26 @@ class __$$PurchasingAnalyticSummaryDtoImplCopyWithImpl<$Res>
|
||||
? _value.totalPurchases
|
||||
: totalPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchases: freezed == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expensePurchases: freezed == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
totalPurchaseOrders: freezed == totalPurchaseOrders
|
||||
? _value.totalPurchaseOrders
|
||||
: totalPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchaseOrders: freezed == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expenseCount: freezed == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
totalQuantity: freezed == totalQuantity
|
||||
? _value.totalQuantity
|
||||
: totalQuantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -8885,7 +8943,12 @@ class __$$PurchasingAnalyticSummaryDtoImplCopyWithImpl<$Res>
|
||||
class _$PurchasingAnalyticSummaryDtoImpl extends _PurchasingAnalyticSummaryDto {
|
||||
const _$PurchasingAnalyticSummaryDtoImpl({
|
||||
@JsonKey(name: 'total_purchases') this.totalPurchases,
|
||||
@JsonKey(name: 'raw_material_purchases') this.rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') this.expensePurchases,
|
||||
@JsonKey(name: 'total_purchase_orders') this.totalPurchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
this.rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') this.expenseCount,
|
||||
@JsonKey(name: 'total_quantity') this.totalQuantity,
|
||||
@JsonKey(name: 'average_purchase_order_value')
|
||||
this.averagePurchaseOrderValue,
|
||||
@ -8901,9 +8964,21 @@ class _$PurchasingAnalyticSummaryDtoImpl extends _PurchasingAnalyticSummaryDto {
|
||||
@JsonKey(name: 'total_purchases')
|
||||
final num? totalPurchases;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchases')
|
||||
final num? rawMaterialPurchases;
|
||||
@override
|
||||
@JsonKey(name: 'expense_purchases')
|
||||
final num? expensePurchases;
|
||||
@override
|
||||
@JsonKey(name: 'total_purchase_orders')
|
||||
final num? totalPurchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
final num? rawMaterialPurchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'expense_count')
|
||||
final num? expenseCount;
|
||||
@override
|
||||
@JsonKey(name: 'total_quantity')
|
||||
final num? totalQuantity;
|
||||
@override
|
||||
@ -8918,7 +8993,7 @@ class _$PurchasingAnalyticSummaryDtoImpl extends _PurchasingAnalyticSummaryDto {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PurchasingAnalyticSummaryDto(totalPurchases: $totalPurchases, totalPurchaseOrders: $totalPurchaseOrders, totalQuantity: $totalQuantity, averagePurchaseOrderValue: $averagePurchaseOrderValue, totalIngredients: $totalIngredients, totalVendors: $totalVendors)';
|
||||
return 'PurchasingAnalyticSummaryDto(totalPurchases: $totalPurchases, rawMaterialPurchases: $rawMaterialPurchases, expensePurchases: $expensePurchases, totalPurchaseOrders: $totalPurchaseOrders, rawMaterialPurchaseOrders: $rawMaterialPurchaseOrders, expenseCount: $expenseCount, totalQuantity: $totalQuantity, averagePurchaseOrderValue: $averagePurchaseOrderValue, totalIngredients: $totalIngredients, totalVendors: $totalVendors)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -8928,8 +9003,19 @@ class _$PurchasingAnalyticSummaryDtoImpl extends _PurchasingAnalyticSummaryDto {
|
||||
other is _$PurchasingAnalyticSummaryDtoImpl &&
|
||||
(identical(other.totalPurchases, totalPurchases) ||
|
||||
other.totalPurchases == totalPurchases) &&
|
||||
(identical(other.rawMaterialPurchases, rawMaterialPurchases) ||
|
||||
other.rawMaterialPurchases == rawMaterialPurchases) &&
|
||||
(identical(other.expensePurchases, expensePurchases) ||
|
||||
other.expensePurchases == expensePurchases) &&
|
||||
(identical(other.totalPurchaseOrders, totalPurchaseOrders) ||
|
||||
other.totalPurchaseOrders == totalPurchaseOrders) &&
|
||||
(identical(
|
||||
other.rawMaterialPurchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
) ||
|
||||
other.rawMaterialPurchaseOrders == rawMaterialPurchaseOrders) &&
|
||||
(identical(other.expenseCount, expenseCount) ||
|
||||
other.expenseCount == expenseCount) &&
|
||||
(identical(other.totalQuantity, totalQuantity) ||
|
||||
other.totalQuantity == totalQuantity) &&
|
||||
(identical(
|
||||
@ -8948,7 +9034,11 @@ class _$PurchasingAnalyticSummaryDtoImpl extends _PurchasingAnalyticSummaryDto {
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
totalPurchases,
|
||||
rawMaterialPurchases,
|
||||
expensePurchases,
|
||||
totalPurchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
expenseCount,
|
||||
totalQuantity,
|
||||
averagePurchaseOrderValue,
|
||||
totalIngredients,
|
||||
@ -8978,7 +9068,12 @@ abstract class _PurchasingAnalyticSummaryDto
|
||||
extends PurchasingAnalyticSummaryDto {
|
||||
const factory _PurchasingAnalyticSummaryDto({
|
||||
@JsonKey(name: 'total_purchases') final num? totalPurchases,
|
||||
@JsonKey(name: 'raw_material_purchases') final num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') final num? expensePurchases,
|
||||
@JsonKey(name: 'total_purchase_orders') final num? totalPurchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
final num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') final num? expenseCount,
|
||||
@JsonKey(name: 'total_quantity') final num? totalQuantity,
|
||||
@JsonKey(name: 'average_purchase_order_value')
|
||||
final num? averagePurchaseOrderValue,
|
||||
@ -8994,9 +9089,21 @@ abstract class _PurchasingAnalyticSummaryDto
|
||||
@JsonKey(name: 'total_purchases')
|
||||
num? get totalPurchases;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchases')
|
||||
num? get rawMaterialPurchases;
|
||||
@override
|
||||
@JsonKey(name: 'expense_purchases')
|
||||
num? get expensePurchases;
|
||||
@override
|
||||
@JsonKey(name: 'total_purchase_orders')
|
||||
num? get totalPurchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? get rawMaterialPurchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'expense_count')
|
||||
num? get expenseCount;
|
||||
@override
|
||||
@JsonKey(name: 'total_quantity')
|
||||
num? get totalQuantity;
|
||||
@override
|
||||
@ -9031,8 +9138,16 @@ mixin _$PurchasingAnalyticDataDto {
|
||||
DateTime? get date => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchases')
|
||||
num? get purchases => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'raw_material_purchases')
|
||||
num? get rawMaterialPurchases => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expense_purchases')
|
||||
num? get expensePurchases => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'purchase_orders')
|
||||
num? get purchaseOrders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? get rawMaterialPurchaseOrders => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'expense_count')
|
||||
num? get expenseCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'quantity')
|
||||
num? get quantity => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'ingredients')
|
||||
@ -9060,7 +9175,12 @@ abstract class $PurchasingAnalyticDataDtoCopyWith<$Res> {
|
||||
$Res call({
|
||||
@JsonKey(name: 'date') DateTime? date,
|
||||
@JsonKey(name: 'purchases') num? purchases,
|
||||
@JsonKey(name: 'raw_material_purchases') num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') num? expensePurchases,
|
||||
@JsonKey(name: 'purchase_orders') num? purchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') num? expenseCount,
|
||||
@JsonKey(name: 'quantity') num? quantity,
|
||||
@JsonKey(name: 'ingredients') num? ingredients,
|
||||
@JsonKey(name: 'vendors') num? vendors,
|
||||
@ -9087,7 +9207,11 @@ class _$PurchasingAnalyticDataDtoCopyWithImpl<
|
||||
$Res call({
|
||||
Object? date = freezed,
|
||||
Object? purchases = freezed,
|
||||
Object? rawMaterialPurchases = freezed,
|
||||
Object? expensePurchases = freezed,
|
||||
Object? purchaseOrders = freezed,
|
||||
Object? rawMaterialPurchaseOrders = freezed,
|
||||
Object? expenseCount = freezed,
|
||||
Object? quantity = freezed,
|
||||
Object? ingredients = freezed,
|
||||
Object? vendors = freezed,
|
||||
@ -9102,10 +9226,26 @@ class _$PurchasingAnalyticDataDtoCopyWithImpl<
|
||||
? _value.purchases
|
||||
: purchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchases: freezed == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expensePurchases: freezed == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
purchaseOrders: freezed == purchaseOrders
|
||||
? _value.purchaseOrders
|
||||
: purchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchaseOrders: freezed == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expenseCount: freezed == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
quantity: freezed == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -9136,7 +9276,12 @@ abstract class _$$PurchasingAnalyticDataDtoImplCopyWith<$Res>
|
||||
$Res call({
|
||||
@JsonKey(name: 'date') DateTime? date,
|
||||
@JsonKey(name: 'purchases') num? purchases,
|
||||
@JsonKey(name: 'raw_material_purchases') num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') num? expensePurchases,
|
||||
@JsonKey(name: 'purchase_orders') num? purchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') num? expenseCount,
|
||||
@JsonKey(name: 'quantity') num? quantity,
|
||||
@JsonKey(name: 'ingredients') num? ingredients,
|
||||
@JsonKey(name: 'vendors') num? vendors,
|
||||
@ -9163,7 +9308,11 @@ class __$$PurchasingAnalyticDataDtoImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? date = freezed,
|
||||
Object? purchases = freezed,
|
||||
Object? rawMaterialPurchases = freezed,
|
||||
Object? expensePurchases = freezed,
|
||||
Object? purchaseOrders = freezed,
|
||||
Object? rawMaterialPurchaseOrders = freezed,
|
||||
Object? expenseCount = freezed,
|
||||
Object? quantity = freezed,
|
||||
Object? ingredients = freezed,
|
||||
Object? vendors = freezed,
|
||||
@ -9178,10 +9327,26 @@ class __$$PurchasingAnalyticDataDtoImplCopyWithImpl<$Res>
|
||||
? _value.purchases
|
||||
: purchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchases: freezed == rawMaterialPurchases
|
||||
? _value.rawMaterialPurchases
|
||||
: rawMaterialPurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expensePurchases: freezed == expensePurchases
|
||||
? _value.expensePurchases
|
||||
: expensePurchases // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
purchaseOrders: freezed == purchaseOrders
|
||||
? _value.purchaseOrders
|
||||
: purchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
rawMaterialPurchaseOrders: freezed == rawMaterialPurchaseOrders
|
||||
? _value.rawMaterialPurchaseOrders
|
||||
: rawMaterialPurchaseOrders // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
expenseCount: freezed == expenseCount
|
||||
? _value.expenseCount
|
||||
: expenseCount // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
quantity: freezed == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
@ -9205,7 +9370,12 @@ class _$PurchasingAnalyticDataDtoImpl extends _PurchasingAnalyticDataDto {
|
||||
const _$PurchasingAnalyticDataDtoImpl({
|
||||
@JsonKey(name: 'date') this.date,
|
||||
@JsonKey(name: 'purchases') this.purchases,
|
||||
@JsonKey(name: 'raw_material_purchases') this.rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') this.expensePurchases,
|
||||
@JsonKey(name: 'purchase_orders') this.purchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
this.rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') this.expenseCount,
|
||||
@JsonKey(name: 'quantity') this.quantity,
|
||||
@JsonKey(name: 'ingredients') this.ingredients,
|
||||
@JsonKey(name: 'vendors') this.vendors,
|
||||
@ -9221,9 +9391,21 @@ class _$PurchasingAnalyticDataDtoImpl extends _PurchasingAnalyticDataDto {
|
||||
@JsonKey(name: 'purchases')
|
||||
final num? purchases;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchases')
|
||||
final num? rawMaterialPurchases;
|
||||
@override
|
||||
@JsonKey(name: 'expense_purchases')
|
||||
final num? expensePurchases;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_orders')
|
||||
final num? purchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
final num? rawMaterialPurchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'expense_count')
|
||||
final num? expenseCount;
|
||||
@override
|
||||
@JsonKey(name: 'quantity')
|
||||
final num? quantity;
|
||||
@override
|
||||
@ -9235,7 +9417,7 @@ class _$PurchasingAnalyticDataDtoImpl extends _PurchasingAnalyticDataDto {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PurchasingAnalyticDataDto(date: $date, purchases: $purchases, purchaseOrders: $purchaseOrders, quantity: $quantity, ingredients: $ingredients, vendors: $vendors)';
|
||||
return 'PurchasingAnalyticDataDto(date: $date, purchases: $purchases, rawMaterialPurchases: $rawMaterialPurchases, expensePurchases: $expensePurchases, purchaseOrders: $purchaseOrders, rawMaterialPurchaseOrders: $rawMaterialPurchaseOrders, expenseCount: $expenseCount, quantity: $quantity, ingredients: $ingredients, vendors: $vendors)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -9246,8 +9428,19 @@ class _$PurchasingAnalyticDataDtoImpl extends _PurchasingAnalyticDataDto {
|
||||
(identical(other.date, date) || other.date == date) &&
|
||||
(identical(other.purchases, purchases) ||
|
||||
other.purchases == purchases) &&
|
||||
(identical(other.rawMaterialPurchases, rawMaterialPurchases) ||
|
||||
other.rawMaterialPurchases == rawMaterialPurchases) &&
|
||||
(identical(other.expensePurchases, expensePurchases) ||
|
||||
other.expensePurchases == expensePurchases) &&
|
||||
(identical(other.purchaseOrders, purchaseOrders) ||
|
||||
other.purchaseOrders == purchaseOrders) &&
|
||||
(identical(
|
||||
other.rawMaterialPurchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
) ||
|
||||
other.rawMaterialPurchaseOrders == rawMaterialPurchaseOrders) &&
|
||||
(identical(other.expenseCount, expenseCount) ||
|
||||
other.expenseCount == expenseCount) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.ingredients, ingredients) ||
|
||||
@ -9261,7 +9454,11 @@ class _$PurchasingAnalyticDataDtoImpl extends _PurchasingAnalyticDataDto {
|
||||
runtimeType,
|
||||
date,
|
||||
purchases,
|
||||
rawMaterialPurchases,
|
||||
expensePurchases,
|
||||
purchaseOrders,
|
||||
rawMaterialPurchaseOrders,
|
||||
expenseCount,
|
||||
quantity,
|
||||
ingredients,
|
||||
vendors,
|
||||
@ -9288,7 +9485,12 @@ abstract class _PurchasingAnalyticDataDto extends PurchasingAnalyticDataDto {
|
||||
const factory _PurchasingAnalyticDataDto({
|
||||
@JsonKey(name: 'date') final DateTime? date,
|
||||
@JsonKey(name: 'purchases') final num? purchases,
|
||||
@JsonKey(name: 'raw_material_purchases') final num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') final num? expensePurchases,
|
||||
@JsonKey(name: 'purchase_orders') final num? purchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
final num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') final num? expenseCount,
|
||||
@JsonKey(name: 'quantity') final num? quantity,
|
||||
@JsonKey(name: 'ingredients') final num? ingredients,
|
||||
@JsonKey(name: 'vendors') final num? vendors,
|
||||
@ -9305,9 +9507,21 @@ abstract class _PurchasingAnalyticDataDto extends PurchasingAnalyticDataDto {
|
||||
@JsonKey(name: 'purchases')
|
||||
num? get purchases;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchases')
|
||||
num? get rawMaterialPurchases;
|
||||
@override
|
||||
@JsonKey(name: 'expense_purchases')
|
||||
num? get expensePurchases;
|
||||
@override
|
||||
@JsonKey(name: 'purchase_orders')
|
||||
num? get purchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'raw_material_purchase_orders')
|
||||
num? get rawMaterialPurchaseOrders;
|
||||
@override
|
||||
@JsonKey(name: 'expense_count')
|
||||
num? get expenseCount;
|
||||
@override
|
||||
@JsonKey(name: 'quantity')
|
||||
num? get quantity;
|
||||
@override
|
||||
|
||||
@ -690,7 +690,11 @@ _$PurchasingAnalyticSummaryDtoImpl _$$PurchasingAnalyticSummaryDtoImplFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$PurchasingAnalyticSummaryDtoImpl(
|
||||
totalPurchases: json['total_purchases'] as num?,
|
||||
rawMaterialPurchases: json['raw_material_purchases'] as num?,
|
||||
expensePurchases: json['expense_purchases'] as num?,
|
||||
totalPurchaseOrders: json['total_purchase_orders'] as num?,
|
||||
rawMaterialPurchaseOrders: json['raw_material_purchase_orders'] as num?,
|
||||
expenseCount: json['expense_count'] as num?,
|
||||
totalQuantity: json['total_quantity'] as num?,
|
||||
averagePurchaseOrderValue: json['average_purchase_order_value'] as num?,
|
||||
totalIngredients: json['total_ingredients'] as num?,
|
||||
@ -701,7 +705,11 @@ Map<String, dynamic> _$$PurchasingAnalyticSummaryDtoImplToJson(
|
||||
_$PurchasingAnalyticSummaryDtoImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'total_purchases': instance.totalPurchases,
|
||||
'raw_material_purchases': instance.rawMaterialPurchases,
|
||||
'expense_purchases': instance.expensePurchases,
|
||||
'total_purchase_orders': instance.totalPurchaseOrders,
|
||||
'raw_material_purchase_orders': instance.rawMaterialPurchaseOrders,
|
||||
'expense_count': instance.expenseCount,
|
||||
'total_quantity': instance.totalQuantity,
|
||||
'average_purchase_order_value': instance.averagePurchaseOrderValue,
|
||||
'total_ingredients': instance.totalIngredients,
|
||||
@ -713,7 +721,11 @@ _$PurchasingAnalyticDataDtoImpl _$$PurchasingAnalyticDataDtoImplFromJson(
|
||||
) => _$PurchasingAnalyticDataDtoImpl(
|
||||
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
|
||||
purchases: json['purchases'] as num?,
|
||||
rawMaterialPurchases: json['raw_material_purchases'] as num?,
|
||||
expensePurchases: json['expense_purchases'] as num?,
|
||||
purchaseOrders: json['purchase_orders'] as num?,
|
||||
rawMaterialPurchaseOrders: json['raw_material_purchase_orders'] as num?,
|
||||
expenseCount: json['expense_count'] as num?,
|
||||
quantity: json['quantity'] as num?,
|
||||
ingredients: json['ingredients'] as num?,
|
||||
vendors: json['vendors'] as num?,
|
||||
@ -724,7 +736,11 @@ Map<String, dynamic> _$$PurchasingAnalyticDataDtoImplToJson(
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'purchases': instance.purchases,
|
||||
'raw_material_purchases': instance.rawMaterialPurchases,
|
||||
'expense_purchases': instance.expensePurchases,
|
||||
'purchase_orders': instance.purchaseOrders,
|
||||
'raw_material_purchase_orders': instance.rawMaterialPurchaseOrders,
|
||||
'expense_count': instance.expenseCount,
|
||||
'quantity': instance.quantity,
|
||||
'ingredients': instance.ingredients,
|
||||
'vendors': instance.vendors,
|
||||
|
||||
@ -236,11 +236,13 @@ class AnalyticRemoteDataProvider {
|
||||
required DateTime dateFrom,
|
||||
required DateTime dateTo,
|
||||
String? outletId,
|
||||
String groupBy = 'day',
|
||||
}) async {
|
||||
try {
|
||||
final Map<String, dynamic> params = {
|
||||
'date_from': dateFrom.toServerDate,
|
||||
'date_to': dateTo.toServerDate,
|
||||
'group_by': groupBy,
|
||||
};
|
||||
if (outletId != null) params['outlet_id'] = outletId;
|
||||
|
||||
|
||||
@ -42,7 +42,11 @@ class PurchasingAnalyticSummaryDto with _$PurchasingAnalyticSummaryDto {
|
||||
|
||||
const factory PurchasingAnalyticSummaryDto({
|
||||
@JsonKey(name: 'total_purchases') num? totalPurchases,
|
||||
@JsonKey(name: 'raw_material_purchases') num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') num? expensePurchases,
|
||||
@JsonKey(name: 'total_purchase_orders') num? totalPurchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders') num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') num? expenseCount,
|
||||
@JsonKey(name: 'total_quantity') num? totalQuantity,
|
||||
@JsonKey(name: 'average_purchase_order_value')
|
||||
num? averagePurchaseOrderValue,
|
||||
@ -55,7 +59,11 @@ class PurchasingAnalyticSummaryDto with _$PurchasingAnalyticSummaryDto {
|
||||
|
||||
PurchasingAnalyticSummary toDomain() => PurchasingAnalyticSummary(
|
||||
totalPurchases: totalPurchases?.toInt() ?? 0,
|
||||
rawMaterialPurchases: rawMaterialPurchases?.toInt() ?? 0,
|
||||
expensePurchases: expensePurchases?.toInt() ?? 0,
|
||||
totalPurchaseOrders: totalPurchaseOrders?.toInt() ?? 0,
|
||||
rawMaterialPurchaseOrders: rawMaterialPurchaseOrders?.toInt() ?? 0,
|
||||
expenseCount: expenseCount?.toInt() ?? 0,
|
||||
totalQuantity: totalQuantity?.toInt() ?? 0,
|
||||
averagePurchaseOrderValue:
|
||||
averagePurchaseOrderValue?.toDouble() ?? 0,
|
||||
@ -71,7 +79,11 @@ class PurchasingAnalyticDataDto with _$PurchasingAnalyticDataDto {
|
||||
const factory PurchasingAnalyticDataDto({
|
||||
@JsonKey(name: 'date') DateTime? date,
|
||||
@JsonKey(name: 'purchases') num? purchases,
|
||||
@JsonKey(name: 'raw_material_purchases') num? rawMaterialPurchases,
|
||||
@JsonKey(name: 'expense_purchases') num? expensePurchases,
|
||||
@JsonKey(name: 'purchase_orders') num? purchaseOrders,
|
||||
@JsonKey(name: 'raw_material_purchase_orders') num? rawMaterialPurchaseOrders,
|
||||
@JsonKey(name: 'expense_count') num? expenseCount,
|
||||
@JsonKey(name: 'quantity') num? quantity,
|
||||
@JsonKey(name: 'ingredients') num? ingredients,
|
||||
@JsonKey(name: 'vendors') num? vendors,
|
||||
@ -83,7 +95,11 @@ class PurchasingAnalyticDataDto with _$PurchasingAnalyticDataDto {
|
||||
PurchasingAnalyticData toDomain() => PurchasingAnalyticData(
|
||||
date: date ?? DateTime.fromMillisecondsSinceEpoch(0),
|
||||
purchases: purchases?.toInt() ?? 0,
|
||||
rawMaterialPurchases: rawMaterialPurchases?.toInt() ?? 0,
|
||||
expensePurchases: expensePurchases?.toInt() ?? 0,
|
||||
purchaseOrders: purchaseOrders?.toInt() ?? 0,
|
||||
rawMaterialPurchaseOrders: rawMaterialPurchaseOrders?.toInt() ?? 0,
|
||||
expenseCount: expenseCount?.toInt() ?? 0,
|
||||
quantity: quantity?.toInt() ?? 0,
|
||||
ingredients: ingredients?.toInt() ?? 0,
|
||||
vendors: vendors?.toInt() ?? 0,
|
||||
|
||||
@ -182,12 +182,14 @@ class AnalyticRepository implements IAnalyticRepository {
|
||||
required DateTime dateFrom,
|
||||
required DateTime dateTo,
|
||||
String? outletId,
|
||||
String groupBy = 'day',
|
||||
}) async {
|
||||
try {
|
||||
final result = await _dataProvider.fetchPurchasing(
|
||||
dateFrom: dateFrom,
|
||||
dateTo: dateTo,
|
||||
outletId: _resolveOutletId(outletId),
|
||||
groupBy: groupBy,
|
||||
);
|
||||
|
||||
if (result.hasError) return left(result.error!);
|
||||
|
||||
@ -136,9 +136,9 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
final gh = _i526.GetItHelper(this, environment, environmentFilter);
|
||||
final firebaseDi = _$FirebaseDi();
|
||||
final sharedPreferencesDi = _$SharedPreferencesDi();
|
||||
final dioDi = _$DioDi();
|
||||
final autoRouteDi = _$AutoRouteDi();
|
||||
final connectivityDi = _$ConnectivityDi();
|
||||
final dioDi = _$DioDi();
|
||||
final packageInfoDi = _$PackageInfoDi();
|
||||
await gh.factoryAsync<_i982.FirebaseApp>(
|
||||
() => firebaseDi.firebaseApp,
|
||||
@ -148,9 +148,9 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
() => sharedPreferencesDi.prefs,
|
||||
preResolve: true,
|
||||
);
|
||||
gh.lazySingleton<_i361.Dio>(() => dioDi.dio);
|
||||
gh.lazySingleton<_i258.AppRouter>(() => autoRouteDi.appRouter);
|
||||
gh.lazySingleton<_i895.Connectivity>(() => connectivityDi.connectivity);
|
||||
gh.lazySingleton<_i361.Dio>(() => dioDi.dio);
|
||||
await gh.lazySingletonAsync<_i655.PackageInfo>(
|
||||
() => packageInfoDi.packageInfo,
|
||||
preResolve: true,
|
||||
@ -174,29 +174,29 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
() => _i115.ApiClient(gh<_i361.Dio>(), gh<_i6.Env>()),
|
||||
);
|
||||
gh.factory<_i6.Env>(() => _i6.ProdEnv(), registerFor: {_prod});
|
||||
gh.factory<_i866.AnalyticRemoteDataProvider>(
|
||||
() => _i866.AnalyticRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i17.AuthRemoteDataProvider>(
|
||||
() => _i17.AuthRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
gh.factory<_i130.OrderRemoteDataProvider>(
|
||||
() => _i130.OrderRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i333.CategoryRemoteDataProvider>(
|
||||
() => _i333.CategoryRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i1006.CustomerRemoteDataProvider>(
|
||||
() => _i1006.CustomerRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
gh.factory<_i17.AuthRemoteDataProvider>(
|
||||
() => _i17.AuthRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i130.OrderRemoteDataProvider>(
|
||||
() => _i130.OrderRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i27.OutletRemoteDataProvider>(
|
||||
() => _i27.OutletRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
gh.factory<_i785.UserRemoteDataProvider>(
|
||||
() => _i785.UserRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i823.ProductRemoteDataProvider>(
|
||||
() => _i823.ProductRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i785.UserRemoteDataProvider>(
|
||||
() => _i785.UserRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
gh.factory<_i27.OutletRemoteDataProvider>(
|
||||
() => _i27.OutletRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i866.AnalyticRemoteDataProvider>(
|
||||
() => _i866.AnalyticRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i1006.CustomerRemoteDataProvider>(
|
||||
() => _i1006.CustomerRemoteDataProvider(gh<_i115.ApiClient>()),
|
||||
);
|
||||
gh.factory<_i48.ICustomerRepository>(
|
||||
() => _i550.CustomerRepository(gh<_i1006.CustomerRemoteDataProvider>()),
|
||||
@ -250,14 +250,14 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh<_i850.OutletLocalDataProvider>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i755.PurchasingAnalyticLoaderBloc>(
|
||||
() => _i755.PurchasingAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
gh.factory<_i473.HomeBloc>(
|
||||
() => _i473.HomeBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i889.SalesLoaderBloc>(
|
||||
() => _i889.SalesLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i473.HomeBloc>(
|
||||
() => _i473.HomeBloc(gh<_i477.IAnalyticRepository>()),
|
||||
gh.factory<_i755.PurchasingAnalyticLoaderBloc>(
|
||||
() => _i755.PurchasingAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i877.OutletListLoaderBloc>(
|
||||
() => _i877.OutletListLoaderBloc(gh<_i197.IOutletRepository>()),
|
||||
@ -265,11 +265,8 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh.factory<_i337.CurrentOutletLoaderBloc>(
|
||||
() => _i337.CurrentOutletLoaderBloc(gh<_i197.IOutletRepository>()),
|
||||
);
|
||||
gh.factory<_i1038.CategoryAnalyticLoaderBloc>(
|
||||
() => _i1038.CategoryAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i516.DashboardAnalyticLoaderBloc>(
|
||||
() => _i516.DashboardAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
gh.factory<_i221.ProductAnalyticLoaderBloc>(
|
||||
() => _i221.ProductAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i785.InventoryAnalyticLoaderBloc>(
|
||||
() => _i785.InventoryAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
@ -279,12 +276,15 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh<_i477.IAnalyticRepository>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i221.ProductAnalyticLoaderBloc>(
|
||||
() => _i221.ProductAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
gh.factory<_i1038.CategoryAnalyticLoaderBloc>(
|
||||
() => _i1038.CategoryAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i11.ProfitLossLoaderBloc>(
|
||||
() => _i11.ProfitLossLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i516.DashboardAnalyticLoaderBloc>(
|
||||
() => _i516.DashboardAnalyticLoaderBloc(gh<_i477.IAnalyticRepository>()),
|
||||
);
|
||||
gh.factory<_i945.AuthBloc>(
|
||||
() => _i945.AuthBloc(gh<_i49.IAuthRepository>()),
|
||||
);
|
||||
@ -294,12 +294,12 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh.factory<_i1058.OrderLoaderBloc>(
|
||||
() => _i1058.OrderLoaderBloc(gh<_i219.IOrderRepository>()),
|
||||
);
|
||||
gh.factory<_i1030.ChangePasswordFormBloc>(
|
||||
() => _i1030.ChangePasswordFormBloc(gh<_i635.IUserRepository>()),
|
||||
);
|
||||
gh.factory<_i147.UserEditFormBloc>(
|
||||
() => _i147.UserEditFormBloc(gh<_i635.IUserRepository>()),
|
||||
);
|
||||
gh.factory<_i1030.ChangePasswordFormBloc>(
|
||||
() => _i1030.ChangePasswordFormBloc(gh<_i635.IUserRepository>()),
|
||||
);
|
||||
gh.factory<_i775.LoginFormBloc>(
|
||||
() => _i775.LoginFormBloc(
|
||||
gh<_i49.IAuthRepository>(),
|
||||
@ -307,14 +307,14 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh<_i179.FcmService>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i346.InventoryReportBloc>(
|
||||
() => _i346.InventoryReportBloc(
|
||||
gh.factory<_i605.TransactionReportBloc>(
|
||||
() => _i605.TransactionReportBloc(
|
||||
gh<_i477.IAnalyticRepository>(),
|
||||
gh<_i197.IOutletRepository>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i605.TransactionReportBloc>(
|
||||
() => _i605.TransactionReportBloc(
|
||||
gh.factory<_i346.InventoryReportBloc>(
|
||||
() => _i346.InventoryReportBloc(
|
||||
gh<_i477.IAnalyticRepository>(),
|
||||
gh<_i197.IOutletRepository>(),
|
||||
),
|
||||
@ -327,10 +327,10 @@ class _$FirebaseDi extends _i73.FirebaseDi {}
|
||||
|
||||
class _$SharedPreferencesDi extends _i402.SharedPreferencesDi {}
|
||||
|
||||
class _$DioDi extends _i103.DioDi {}
|
||||
|
||||
class _$AutoRouteDi extends _i311.AutoRouteDi {}
|
||||
|
||||
class _$ConnectivityDi extends _i586.ConnectivityDi {}
|
||||
|
||||
class _$DioDi extends _i103.DioDi {}
|
||||
|
||||
class _$PackageInfoDi extends _i227.PackageInfoDi {}
|
||||
|
||||
@ -14,6 +14,10 @@ import 'package:flutter/widgets.dart';
|
||||
class $AssetsIconsGen {
|
||||
const $AssetsIconsGen();
|
||||
|
||||
/// File path: assets/icons/ic-report-exclusive-summary.png
|
||||
AssetGenImage get icReportExclusiveSummary =>
|
||||
const AssetGenImage('assets/icons/ic-report-exclusive-summary.png');
|
||||
|
||||
/// File path: assets/icons/ic-report-product.png
|
||||
AssetGenImage get icReportProduct =>
|
||||
const AssetGenImage('assets/icons/ic-report-product.png');
|
||||
@ -32,6 +36,7 @@ class $AssetsIconsGen {
|
||||
|
||||
/// List of all assets
|
||||
List<AssetGenImage> get values => [
|
||||
icReportExclusiveSummary,
|
||||
icReportProduct,
|
||||
icReportProfitLoss,
|
||||
icReportPurchase,
|
||||
|
||||
@ -235,7 +235,7 @@ class DateRangePickerFieldOutlined extends StatefulWidget {
|
||||
final String? errorText;
|
||||
|
||||
const DateRangePickerFieldOutlined({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.label,
|
||||
this.placeholder = 'Pilih rentang tanggal',
|
||||
this.startDate,
|
||||
@ -246,7 +246,7 @@ class DateRangePickerFieldOutlined extends StatefulWidget {
|
||||
this.primaryColor = AppColor.primary,
|
||||
this.enabled = true,
|
||||
this.errorText,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<DateRangePickerFieldOutlined> createState() =>
|
||||
|
||||
@ -7,8 +7,7 @@ class EmptySearchWidget extends StatelessWidget {
|
||||
final String? searchQuery;
|
||||
final VoidCallback? onClear;
|
||||
|
||||
const EmptySearchWidget({Key? key, this.searchQuery, this.onClear})
|
||||
: super(key: key);
|
||||
const EmptySearchWidget({super.key, this.searchQuery, this.onClear});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@ -13,14 +13,14 @@ class ErrorPage extends StatefulWidget {
|
||||
final IconData? errorIcon;
|
||||
|
||||
const ErrorPage({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.title,
|
||||
this.message,
|
||||
this.onRetry,
|
||||
this.onBack,
|
||||
this.errorCode,
|
||||
this.errorIcon,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<ErrorPage> createState() => _ErrorPageState();
|
||||
|
||||
@ -308,6 +308,30 @@ class _PurchasePageState extends State<PurchasePage>
|
||||
],
|
||||
),
|
||||
const SpaceHeight(12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: PurchaseStatCard(
|
||||
title: 'Bahan Baku',
|
||||
value: s.rawMaterialPurchases.currencyFormatRp,
|
||||
icon: LineIcons.leaf,
|
||||
iconColor: AppColor.secondary,
|
||||
cardAnimation: _fadeAnimation,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: PurchaseStatCard(
|
||||
title: 'Pengeluaran',
|
||||
value: s.expensePurchases.currencyFormatRp,
|
||||
icon: LineIcons.receipt,
|
||||
iconColor: AppColor.warning,
|
||||
cardAnimation: _fadeAnimation,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@ -325,7 +349,7 @@ class _PurchasePageState extends State<PurchasePage>
|
||||
title: 'Rata-rata PO',
|
||||
value: s.averagePurchaseOrderValue.round().currencyFormatRp,
|
||||
icon: LineIcons.dollarSign,
|
||||
iconColor: AppColor.secondary,
|
||||
iconColor: AppColor.secondaryDark,
|
||||
cardAnimation: _fadeAnimation,
|
||||
),
|
||||
),
|
||||
@ -336,7 +360,7 @@ class _PurchasePageState extends State<PurchasePage>
|
||||
children: [
|
||||
Expanded(
|
||||
child: PurchaseStatCard(
|
||||
title: 'Bahan Baku',
|
||||
title: 'Item Bahan Baku',
|
||||
value: '${s.totalIngredients} item',
|
||||
icon: LineIcons.leaf,
|
||||
iconColor: AppColor.secondaryDark,
|
||||
@ -554,6 +578,14 @@ class _PurchasePageState extends State<PurchasePage>
|
||||
Expanded(child: _shimmerCard(height: 100)),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: _shimmerCard(height: 100)),
|
||||
const SpaceWidth(12),
|
||||
Expanded(child: _shimmerCard(height: 100)),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ class PurchaseVendorCard extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// Rank badge
|
||||
Container(
|
||||
@ -69,7 +70,7 @@ class PurchaseVendorCard extends StatelessWidget {
|
||||
color: AppColor.info.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
LineIcons.truck,
|
||||
color: AppColor.info,
|
||||
size: 20,
|
||||
@ -77,31 +78,51 @@ class PurchaseVendorCard extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
|
||||
// Name & details
|
||||
// Name, chips, and total cost — all in one column
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
data.vendorName.trim(),
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
// Vendor name + total cost on same row
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
data.vendorName.trim(),
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
data.totalCost.currencyFormatRp,
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w800,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
|
||||
// Chips — wrap to next line if not enough space
|
||||
Wrap(
|
||||
spacing: 6,
|
||||
runSpacing: 4,
|
||||
children: [
|
||||
_Chip(
|
||||
label: '${data.purchaseOrderCount} PO',
|
||||
color: AppColor.info,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
_Chip(
|
||||
label: '${data.ingredientCount} bahan',
|
||||
color: AppColor.secondary,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
_Chip(
|
||||
label: '${data.quantity} pcs',
|
||||
color: AppColor.warning,
|
||||
@ -111,15 +132,6 @@ class PurchaseVendorCard extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Total cost
|
||||
Text(
|
||||
data.totalCost.currencyFormatRp,
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w800,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user