asdasdasd
This commit is contained in:
@@ -11,12 +11,14 @@ abstract class ProductsRepository {
|
||||
///
|
||||
/// [warehouseId] - The ID of the warehouse
|
||||
/// [type] - The operation type ('import' or 'export')
|
||||
/// [forceRefresh] - If true, fetch from API even if cache exists
|
||||
///
|
||||
/// Returns Either<Failure, List<ProductEntity>>
|
||||
Future<Either<Failure, List<ProductEntity>>> getProducts(
|
||||
int warehouseId,
|
||||
String type,
|
||||
);
|
||||
String type, {
|
||||
bool forceRefresh = false,
|
||||
});
|
||||
|
||||
/// Get product stages for a product in a warehouse
|
||||
///
|
||||
|
||||
@@ -14,12 +14,18 @@ class GetProductsUseCase {
|
||||
///
|
||||
/// [warehouseId] - The ID of the warehouse to get products from
|
||||
/// [type] - The operation type ('import' or 'export')
|
||||
/// [forceRefresh] - If true, bypass cache and fetch from API
|
||||
///
|
||||
/// Returns Either<Failure, List<ProductEntity>>
|
||||
Future<Either<Failure, List<ProductEntity>>> call(
|
||||
int warehouseId,
|
||||
String type,
|
||||
) async {
|
||||
return await repository.getProducts(warehouseId, type);
|
||||
String type, {
|
||||
bool forceRefresh = false,
|
||||
}) async {
|
||||
return await repository.getProducts(
|
||||
warehouseId,
|
||||
type,
|
||||
forceRefresh: forceRefresh,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user