feat: change total to amount
This commit is contained in:
@@ -49,14 +49,14 @@ class OrderRepository implements IOrderRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Either<OrderFailure, int>> getTotalCount({
|
||||
Future<Either<OrderFailure, OrderTotal>> getTotal({
|
||||
String? status,
|
||||
String? outletId,
|
||||
required DateTime dateFrom,
|
||||
required DateTime dateTo,
|
||||
}) async {
|
||||
try {
|
||||
final result = await _dataProvider.fetchTotalCount(
|
||||
final result = await _dataProvider.fetchTotal(
|
||||
status: status,
|
||||
outletId: outletId,
|
||||
dateFrom: dateFrom,
|
||||
@@ -69,7 +69,7 @@ class OrderRepository implements IOrderRepository {
|
||||
|
||||
return right(result.data!);
|
||||
} catch (e, s) {
|
||||
log('getOrderTotalCountError', name: _logName, error: e, stackTrace: s);
|
||||
log('getOrderTotalError', name: _logName, error: e, stackTrace: s);
|
||||
return left(const OrderFailure.unexpectedError());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user