update. save => print
This commit is contained in:
@@ -102,7 +102,7 @@ class ProductsRemoteDataSourceImpl implements ProductsRemoteDataSource {
|
||||
// The API returns a list of stages for the product
|
||||
final list = json as List;
|
||||
if (list.isEmpty) {
|
||||
throw const ServerException('Product stages not found');
|
||||
throw const ServerException('Không tìm thấy sản phẩm');
|
||||
}
|
||||
// Parse all stages from the list
|
||||
return list
|
||||
|
||||
@@ -418,7 +418,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Error',
|
||||
'Lỗi',
|
||||
style: theme.textTheme.titleLarge?.copyWith(
|
||||
color: theme.colorScheme.error,
|
||||
),
|
||||
@@ -788,8 +788,7 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Print before saving to API
|
||||
await _printQuantities(stage);
|
||||
|
||||
|
||||
// Show loading dialog
|
||||
showDialog(
|
||||
@@ -863,6 +862,9 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
),
|
||||
);
|
||||
|
||||
// Print before saving to API
|
||||
await _printQuantities(stage);
|
||||
|
||||
// Refresh the product detail to show updated quantities
|
||||
await ref.read(productDetailProvider(_providerKey).notifier).refreshProductDetail(
|
||||
widget.warehouseId,
|
||||
|
||||
Reference in New Issue
Block a user