feat: allow on_shelf items in transit batch transfer
Transit shelf registration is effectively an off-shelf operation. Allow not_shelved, on_shelf, and their mix when target is a transit shelf. Only transferred items are blocked since they are already in transit. Also fix conflict color logic: transferred items now correctly show as red (conflict) for both transit and normal shelf targets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,15 +19,15 @@ extension _RegistrationSubmitPart on _RegistrationPageState {
|
||||
|
||||
setState(() => _isSubmitting = true);
|
||||
|
||||
// For transit target: block if any scanned item already has a location
|
||||
// For transit target: block if any scanned item is already transferred
|
||||
// (on_shelf items are allowed — transit registration acts as off-shelf)
|
||||
if (_isTransitTarget) {
|
||||
if (_hasAnyLocatedInScanned()) {
|
||||
final onShelfItems = _findOnShelfItemsInScanned();
|
||||
final transferredItems = _findTransferredItemsInScanned();
|
||||
final transferredItems = _findTransferredItemsInScanned();
|
||||
if (transferredItems.isNotEmpty) {
|
||||
setState(() => _isSubmitting = false);
|
||||
_feedbackService.trigger(FeedbackEvent.submitFailure);
|
||||
_showLocationConflictDialog(
|
||||
onShelfItems: onShelfItems,
|
||||
onShelfItems: [],
|
||||
transferredItems: transferredItems,
|
||||
);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user