diff --git a/lib/features/inventory/inbound/presentation/pages/inbound_page.dart b/lib/features/inventory/inbound/presentation/pages/inbound_page.dart index ea402b5..faf8d36 100644 --- a/lib/features/inventory/inbound/presentation/pages/inbound_page.dart +++ b/lib/features/inventory/inbound/presentation/pages/inbound_page.dart @@ -396,12 +396,12 @@ class _InboundPageState extends State { setState(() => _pendingStatus = value); }, options: [ - const ShadOption( + ShadOption( value: null, child: Text(InboundTableSpec.allStatusLabel), ), for (final option in _statusOptions) - ShadOption(value: option, child: Text(option)), + ShadOption(value: option, child: Text(option)), ], ), ), diff --git a/lib/features/inventory/inbound/presentation/specs/inbound_table_spec.dart b/lib/features/inventory/inbound/presentation/specs/inbound_table_spec.dart index 8610bad..dda8f34 100644 --- a/lib/features/inventory/inbound/presentation/specs/inbound_table_spec.dart +++ b/lib/features/inventory/inbound/presentation/specs/inbound_table_spec.dart @@ -75,6 +75,8 @@ class InboundTableSpec { switch (value) { case 'lines': return '상세정보 포함'; + case 'customers': + return '고객 포함'; default: return value; } diff --git a/lib/features/inventory/outbound/presentation/pages/outbound_page.dart b/lib/features/inventory/outbound/presentation/pages/outbound_page.dart index 4e9f7a4..8eb0d66 100644 --- a/lib/features/inventory/outbound/presentation/pages/outbound_page.dart +++ b/lib/features/inventory/outbound/presentation/pages/outbound_page.dart @@ -481,12 +481,12 @@ class _OutboundPageState extends State { Text(value ?? OutboundTableSpec.allStatusLabel), onChanged: (value) => setState(() => _pendingStatus = value), options: [ - const ShadOption( + ShadOption( value: null, child: Text(OutboundTableSpec.allStatusLabel), ), for (final option in _statusOptions) - ShadOption(value: option, child: Text(option)), + ShadOption(value: option, child: Text(option)), ], ), ), diff --git a/lib/features/inventory/rental/presentation/pages/rental_page.dart b/lib/features/inventory/rental/presentation/pages/rental_page.dart index bf42351..757b954 100644 --- a/lib/features/inventory/rental/presentation/pages/rental_page.dart +++ b/lib/features/inventory/rental/presentation/pages/rental_page.dart @@ -438,12 +438,12 @@ class _RentalPageState extends State { Text(value ?? RentalTableSpec.allStatusLabel), onChanged: (value) => setState(() => _pendingStatus = value), options: [ - const ShadOption( + ShadOption( value: null, child: Text(RentalTableSpec.allStatusLabel), ), for (final option in _statusOptions) - ShadOption(value: option, child: Text(option)), + ShadOption(value: option, child: Text(option)), ], ), ), @@ -456,12 +456,12 @@ class _RentalPageState extends State { Text(value ?? RentalTableSpec.allRentalTypeLabel), onChanged: (value) => setState(() => _pendingRentalType = value), options: [ - const ShadOption( + ShadOption( value: null, child: Text(RentalTableSpec.allRentalTypeLabel), ), for (final option in RentalTableSpec.rentalTypes) - ShadOption(value: option, child: Text(option)), + ShadOption(value: option, child: Text(option)), ], ), ), diff --git a/lib/features/inventory/shared/widgets/warehouse_select_field.dart b/lib/features/inventory/shared/widgets/warehouse_select_field.dart index 0f60f5d..c69d745 100644 --- a/lib/features/inventory/shared/widgets/warehouse_select_field.dart +++ b/lib/features/inventory/shared/widgets/warehouse_select_field.dart @@ -230,6 +230,19 @@ class _InventoryWarehouseSelectFieldState return; } final keyword = _controller.text.trim(); + final selectedLabel = _selectedLabel; + final matchesSelectedLabel = + selectedLabel != null && keyword == selectedLabel; + if (matchesSelectedLabel) { + _debounce?.cancel(); + setState(() { + _isSearching = false; + _suggestions + ..clear() + ..addAll(_availableOptions(_initialOptions)); + }); + return; + } if (keyword.isEmpty) { _debounce?.cancel(); setState(() { @@ -328,6 +341,14 @@ class _InventoryWarehouseSelectFieldState return '${option.name} (${option.code})'; } + String? get _selectedLabel { + final selected = _selected; + if (selected == null) { + return null; + } + return selected.id == -1 ? widget.allLabel : _displayLabel(selected); + } + Widget _buildLoadingInput() { return Stack( alignment: Alignment.centerLeft, @@ -363,11 +384,13 @@ class _InventoryWarehouseSelectFieldState textEditingController: _controller, focusNode: _focusNode, optionsBuilder: (textEditingValue) { - if (textEditingValue.text.trim().isEmpty) { - if (_suggestions.isEmpty) { - return _availableOptions(_initialOptions); - } - return _suggestions; + final keyword = textEditingValue.text.trim(); + final selectedLabel = _selectedLabel; + final shouldShowAll = + keyword.isEmpty || + (selectedLabel != null && keyword == selectedLabel); + if (shouldShowAll) { + return _availableOptions(_initialOptions); } return _suggestions; }, diff --git a/lib/widgets/components/filter_bar.dart b/lib/widgets/components/filter_bar.dart index ffe1142..2fa2158 100644 --- a/lib/widgets/components/filter_bar.dart +++ b/lib/widgets/components/filter_bar.dart @@ -111,16 +111,15 @@ class FilterBar extends StatelessWidget { FilterBarActionConfig config, ) { final theme = ShadTheme.of(context); - if (config.hasPendingChanges) { - return ShadBadge( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), - child: Text('미적용 변경', style: theme.textTheme.small), - ), - ); - } if (config.hasActiveFilters) { + final badgeColor = theme.colorScheme.primary; return ShadBadge.outline( + foregroundColor: badgeColor, + backgroundColor: badgeColor.withValues(alpha: 0.08), + hoverBackgroundColor: badgeColor.withValues(alpha: 0.12), + shape: StadiumBorder( + side: BorderSide(color: badgeColor.withValues(alpha: 0.4)), + ), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), child: Text('필터 적용됨', style: theme.textTheme.small), diff --git a/lib/widgets/components/superport_date_picker.dart b/lib/widgets/components/superport_date_picker.dart index edb2393..7ff46d6 100644 --- a/lib/widgets/components/superport_date_picker.dart +++ b/lib/widgets/components/superport_date_picker.dart @@ -31,6 +31,8 @@ class SuperportDatePickerButton extends StatelessWidget { final format = dateFormat ?? intl.DateFormat('yyyy-MM-dd'); final displayText = value != null ? format.format(value!) : placeholder; return ShadButton.outline( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + gap: 8, onPressed: !enabled ? null : () async { @@ -49,14 +51,13 @@ class SuperportDatePickerButton extends StatelessWidget { onChanged(picked); } }, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.min, - children: [ - Text(displayText), - const SizedBox(width: 8), - const Icon(lucide.LucideIcons.calendar, size: 16), - ], + trailing: const Icon(lucide.LucideIcons.calendar, size: 16), + child: Text( + displayText, + maxLines: 1, + overflow: TextOverflow.ellipsis, + softWrap: false, + textAlign: TextAlign.left, ), ); } @@ -92,6 +93,8 @@ class SuperportDateRangePickerButton extends StatelessWidget { ? placeholder : '${format.format(value!.start)} ~ ${format.format(value!.end)}'; return ShadButton.outline( + gap: 8, + mainAxisAlignment: MainAxisAlignment.start, onPressed: !enabled ? null : () async { @@ -111,14 +114,13 @@ class SuperportDateRangePickerButton extends StatelessWidget { onChanged(picked); } }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(lucide.LucideIcons.calendar, size: 16), - const SizedBox(width: 8), - Flexible(child: Text(label, overflow: TextOverflow.ellipsis)), - ], + leading: const Icon(lucide.LucideIcons.calendar, size: 16), + child: Text( + label, + maxLines: 1, + overflow: TextOverflow.ellipsis, + softWrap: false, + textAlign: TextAlign.left, ), ); } diff --git a/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_isolatedDiff.png b/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_isolatedDiff.png index c3a423e..6190aa7 100644 Binary files a/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_isolatedDiff.png and b/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_isolatedDiff.png differ diff --git a/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_maskedDiff.png b/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_maskedDiff.png index 736db7e..1ff7491 100644 Binary files a/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_maskedDiff.png and b/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_maskedDiff.png differ diff --git a/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_testImage.png b/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_testImage.png index 8600859..09ffdef 100644 Binary files a/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_testImage.png and b/test/features/inventory/summary/presentation/pages/failures/inventory_summary_page_default_testImage.png differ