update address, cancel order

This commit is contained in:
Phuoc Nguyen
2025-11-25 16:39:29 +07:00
parent 039dfb9fb5
commit 84669ac89c
11 changed files with 584 additions and 194 deletions

View File

@@ -140,4 +140,30 @@ class OrderRepositoryImpl implements OrderRepository {
throw Exception('Failed to upload bill: $e');
}
}
@override
Future<void> updateOrderAddress({
required String orderId,
required String shippingAddressName,
required String customerAddress,
}) async {
try {
await _remoteDataSource.updateOrderAddress(
orderId: orderId,
shippingAddressName: shippingAddressName,
customerAddress: customerAddress,
);
} catch (e) {
throw Exception('Failed to update order address: $e');
}
}
@override
Future<void> cancelOrder(String orderId) async {
try {
await _remoteDataSource.cancelOrder(orderId);
} catch (e) {
throw Exception('Failed to cancel order: $e');
}
}
}