print => save
This commit is contained in:
@@ -787,6 +787,9 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print before saving to API
|
||||||
|
await _printQuantities(stage);
|
||||||
|
|
||||||
// Show loading dialog
|
// Show loading dialog
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -865,16 +868,6 @@ class _ProductDetailPageState extends ConsumerState<ProductDetailPage> {
|
|||||||
widget.productId,
|
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
|
// Do NOT clear quantity/weight fields - keep them for reference
|
||||||
// User can manually clear them if needed using the 'C' button
|
// User can manually clear them if needed using the 'C' button
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user