재고 상세 다이얼로그화 및 마스터 레이아웃 개선

This commit is contained in:
JiWoong Sul
2025-10-22 18:52:21 +09:00
parent a14133df52
commit 09c31b2503
20 changed files with 1187 additions and 923 deletions

View File

@@ -8,6 +8,7 @@ import 'package:superport_v2/widgets/app_layout.dart';
import 'package:superport_v2/widgets/components/filter_bar.dart';
import 'package:superport_v2/widgets/components/superport_dialog.dart';
import 'package:superport_v2/widgets/components/superport_table.dart';
import 'package:superport_v2/widgets/components/responsive_section.dart';
import '../../../../../core/config/environment.dart';
import '../../../../../widgets/spec_page.dart';
@@ -198,8 +199,8 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
),
],
children: [
SizedBox(
width: 280,
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 280),
child: ShadInput(
controller: _searchController,
focusNode: _searchFocusNode,
@@ -208,8 +209,8 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
onSubmitted: (_) => _applyFilters(),
),
),
SizedBox(
width: 220,
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 220),
child: ShadSelect<VendorStatusFilter>(
key: ValueKey(_controller.statusFilter),
initialValue: _controller.statusFilter,
@@ -233,21 +234,27 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
],
),
child: ShadCard(
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('벤더 목록', style: theme.textTheme.h3),
Text('$totalCount건', style: theme.textTheme.muted),
],
title: ResponsiveStackedRow(
leading: Text('벤더 목록', style: theme.textTheme.h3),
trailing: Align(
alignment: Alignment.centerRight,
child: Text('$totalCount건', style: theme.textTheme.muted),
),
),
footer: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'페이지 $currentPage / $totalPages',
style: theme.textTheme.small,
),
Row(
footer: ResponsiveStackedRow(
gap: 8,
breakpoint: 420,
leading: Text(
'페이지 $currentPage / $totalPages',
style: theme.textTheme.small,
),
trailing: Align(
alignment: Alignment.centerRight,
child: Wrap(
spacing: 8,
runSpacing: 8,
alignment: WrapAlignment.end,
runAlignment: WrapAlignment.end,
children: [
ShadButton.outline(
size: ShadButtonSize.sm,
@@ -256,7 +263,6 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
: () => _goToPage(1),
child: const Text('처음'),
),
const SizedBox(width: 8),
ShadButton.outline(
size: ShadButtonSize.sm,
onPressed: _controller.isLoading || currentPage <= 1
@@ -264,7 +270,6 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
: () => _goToPage(currentPage - 1),
child: const Text('이전'),
),
const SizedBox(width: 8),
ShadButton.outline(
size: ShadButtonSize.sm,
onPressed: _controller.isLoading || !hasNext
@@ -272,17 +277,17 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
: () => _goToPage(currentPage + 1),
child: const Text('다음'),
),
const SizedBox(width: 8),
ShadButton.outline(
size: ShadButtonSize.sm,
onPressed: _controller.isLoading || currentPage >= totalPages
onPressed:
_controller.isLoading || currentPage >= totalPages
? null
: () => _goToPage(totalPages),
child: const Text('마지막'),
),
],
),
],
),
),
child: _controller.isLoading
? const Padding(
@@ -510,8 +515,7 @@ class _VendorEnabledPageState extends State<_VendorEnabledPage> {
return ShadButton.ghost(
onPressed: isSaving
? null
: () =>
Navigator.of(context, rootNavigator: true).pop(false),
: () => Navigator.of(context, rootNavigator: true).pop(false),
child: const Text('취소'),
);
},