This commit is contained in:
Phuoc Nguyen
2025-10-28 15:51:48 +07:00
parent e14ae56c3c
commit 0010446298
6 changed files with 352 additions and 39 deletions

View File

@@ -35,8 +35,13 @@ class ProductsRemoteDataSourceImpl implements ProductsRemoteDataSource {
@override
Future<List<ProductModel>> getProducts(int warehouseId, String type) async {
try {
// Make API call to get all products
final response = await apiClient.get('/portalProduct/getAllProduct');
// Choose endpoint based on operation type
final endpoint = type == 'export'
? ApiEndpoints.productsForExport(warehouseId)
: ApiEndpoints.products;
// Make API call to get products
final response = await apiClient.get(endpoint);
// Parse the API response using ApiResponse wrapper
final apiResponse = ApiResponse.fromJson(