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:
@@ -110,9 +110,10 @@ Color registrationBarColor({
|
||||
required bool isTransitTarget,
|
||||
}) {
|
||||
if (isScanned) {
|
||||
return status == 'on_shelf' && !isTransitTarget
|
||||
? Colors.red
|
||||
: const Color(0xFF43A047);
|
||||
final isConflict = isTransitTarget
|
||||
? status == 'transferred'
|
||||
: (status == 'on_shelf' || status == 'transferred');
|
||||
return isConflict ? Colors.red : const Color(0xFF43A047);
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
@@ -131,9 +132,10 @@ Color registrationRowBgColor({
|
||||
required bool isTransitTarget,
|
||||
}) {
|
||||
if (isScanned) {
|
||||
return status == 'on_shelf' && !isTransitTarget
|
||||
? Colors.red.shade50
|
||||
: const Color(0xFFF1F8E9);
|
||||
final isConflict = isTransitTarget
|
||||
? status == 'transferred'
|
||||
: (status == 'on_shelf' || status == 'transferred');
|
||||
return isConflict ? Colors.red.shade50 : const Color(0xFFF1F8E9);
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
|
||||
Reference in New Issue
Block a user