fix: skip shelf-switch warning when no previous shelf scanned in multi-code mode
In multi-code shelving mode, if the user has scanned zongpai numbers but hasn't scanned any shelf yet, scanning the first shelf should not trigger the "switch shelf" warning dialog since there is no existing shelf to switch from. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,8 +60,10 @@ extension _RegistrationScanPart on _RegistrationPageState {
|
||||
}
|
||||
|
||||
void _handleLocationScan(String locationCode, CodeType locationType) {
|
||||
// In singleCode mode or no existing data, switch directly
|
||||
if (_mode == RegistrationMode.singleCode || _zongpaiNos.isEmpty) {
|
||||
// In singleCode mode or no existing data or no previous shelf, switch directly
|
||||
if (_mode == RegistrationMode.singleCode ||
|
||||
_zongpaiNos.isEmpty ||
|
||||
_locationCode == null) {
|
||||
_feedbackService.trigger(FeedbackEvent.scanValid);
|
||||
setState(() {
|
||||
_locationCode = locationCode;
|
||||
|
||||
Reference in New Issue
Block a user