print => save
This commit is contained in:
@@ -787,6 +787,9 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Print before saving to API
|
||||
await _printQuantities(stage);
|
||||
|
||||
// Show loading dialog
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -865,16 +868,6 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
||||
widget.productId,
|
||||
);
|
||||
|
||||
// Get updated stage data
|
||||
final updatedStages = ref.read(productDetailProvider(_providerKey)).stages;
|
||||
final updatedStage = updatedStages.firstWhere(
|
||||
(s) => s.productStageId == stage.productStageId,
|
||||
orElse: () => stage,
|
||||
);
|
||||
|
||||
// Automatically print after successful save
|
||||
await _printQuantities(updatedStage);
|
||||
|
||||
// Do NOT clear quantity/weight fields - keep them for reference
|
||||
// User can manually clear them if needed using the 'C' button
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user