From eaac3c23aeabf5926f6192e9da0b2bc02a40f2a2 Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Tue, 11 Nov 2025 18:05:58 +0900 Subject: [PATCH] =?UTF-8?q?chore(inventory):=20=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=EB=8B=A8=EC=B6=94=EB=A5=BC=20=EC=84=B8?= =?UTF-8?q?=EB=B6=80=20=EC=95=A1=EC=85=98=EC=9C=BC=EB=A1=9C=20=ED=95=9C?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 입고·출고·대여 페이지 상단의 "선택 항목 수정" 버튼을 제거하고 상세 패널 내 수정 흐름만 노출\n- 제품 상세 다이얼로그에서 준비 중인 히스토리 섹션과 상수 정의를 제거해 UI를 단순화\n- 관련 위젯 테스트에서 히스토리 탭 검증을 삭제하고 문구를 최신 설명으로 갱신 --- .../presentation/pages/inbound_page.dart | 11 ------- .../presentation/pages/outbound_page.dart | 11 ------- .../presentation/pages/rental_page.dart | 11 ------- .../dialogs/product_detail_dialog.dart | 31 ------------------- .../dialogs/product_detail_dialog_test.dart | 5 +-- 5 files changed, 1 insertion(+), 68 deletions(-) diff --git a/lib/features/inventory/inbound/presentation/pages/inbound_page.dart b/lib/features/inventory/inbound/presentation/pages/inbound_page.dart index 92a09ee..8778985 100644 --- a/lib/features/inventory/inbound/presentation/pages/inbound_page.dart +++ b/lib/features/inventory/inbound/presentation/pages/inbound_page.dart @@ -336,17 +336,6 @@ class _InboundPageState extends State { child: const Text('입고 등록'), ), ), - PermissionGate( - resource: PermissionResources.stockTransactions, - action: PermissionAction.edit, - child: ShadButton.outline( - leading: const Icon(lucide.LucideIcons.pencil, size: 16), - onPressed: _selectedRecord == null - ? null - : () => _handleEdit(_selectedRecord!), - child: const Text('선택 항목 수정'), - ), - ), ], toolbar: FilterBar( actionConfig: FilterBarActionConfig( diff --git a/lib/features/inventory/outbound/presentation/pages/outbound_page.dart b/lib/features/inventory/outbound/presentation/pages/outbound_page.dart index e1589ac..99eee04 100644 --- a/lib/features/inventory/outbound/presentation/pages/outbound_page.dart +++ b/lib/features/inventory/outbound/presentation/pages/outbound_page.dart @@ -423,17 +423,6 @@ class _OutboundPageState extends State { child: const Text('출고 등록'), ), ), - PermissionGate( - resource: PermissionResources.stockTransactions, - action: PermissionAction.edit, - child: ShadButton.outline( - leading: const Icon(lucide.LucideIcons.pencil, size: 16), - onPressed: _selectedRecord == null - ? null - : () => _handleEdit(_selectedRecord!), - child: const Text('선택 항목 수정'), - ), - ), ], toolbar: FilterBar( actionConfig: FilterBarActionConfig( diff --git a/lib/features/inventory/rental/presentation/pages/rental_page.dart b/lib/features/inventory/rental/presentation/pages/rental_page.dart index cfe1d29..0957ea4 100644 --- a/lib/features/inventory/rental/presentation/pages/rental_page.dart +++ b/lib/features/inventory/rental/presentation/pages/rental_page.dart @@ -369,17 +369,6 @@ class _RentalPageState extends State { child: const Text('대여 등록'), ), ), - PermissionGate( - resource: PermissionResources.stockTransactions, - action: PermissionAction.edit, - child: ShadButton.outline( - leading: const Icon(lucide.LucideIcons.pencil, size: 16), - onPressed: _selectedRecord == null - ? null - : () => _handleEdit(_selectedRecord!), - child: const Text('선택 항목 수정'), - ), - ), ], toolbar: FilterBar( actionConfig: FilterBarActionConfig( diff --git a/lib/features/masters/product/presentation/dialogs/product_detail_dialog.dart b/lib/features/masters/product/presentation/dialogs/product_detail_dialog.dart index f61e28a..f845c2b 100644 --- a/lib/features/masters/product/presentation/dialogs/product_detail_dialog.dart +++ b/lib/features/masters/product/presentation/dialogs/product_detail_dialog.dart @@ -108,13 +108,6 @@ Future showProductDetailDialog({ icon: LucideIcons.link, builder: (_) => _ProductRelationsSection(product: product), ), - if (product != null) - SuperportDetailDialogSection( - id: _ProductDetailSections.history, - label: '히스토리', - icon: LucideIcons.clock3, - builder: (_) => const _ProductHistorySection(), - ), _ProductFormSection( id: product == null ? _ProductDetailSections.create @@ -218,7 +211,6 @@ Future showProductDetailDialog({ /// 제품 상세 다이얼로그 섹션 정의 모음이다. class _ProductDetailSections { static const relations = 'relations'; - static const history = 'history'; static const edit = 'edit'; static const delete = 'delete'; static const restore = 'restore'; @@ -265,29 +257,6 @@ class _ProductRelationsSection extends StatelessWidget { } } -/// 제품 변경 이력을 안내하는 섹션이다. -class _ProductHistorySection extends StatelessWidget { - const _ProductHistorySection(); - - @override - Widget build(BuildContext context) { - final theme = ShadTheme.of(context); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('현재 제품 변경 이력 데이터는 준비 중입니다.', style: theme.textTheme.small), - const SizedBox(height: 12), - Text( - '재고 입출고 추적 기능이 추가되면 히스토리를 통해 상태 변화를 확인할 수 있습니다.', - style: theme.textTheme.small.copyWith( - color: theme.colorScheme.mutedForeground, - ), - ), - ], - ); - } -} - /// 제품 등록/수정 폼을 제공하는 섹션이다. class _ProductFormSection extends SuperportDetailDialogSection { _ProductFormSection({ diff --git a/test/features/masters/product/presentation/dialogs/product_detail_dialog_test.dart b/test/features/masters/product/presentation/dialogs/product_detail_dialog_test.dart index a7b3376..05917da 100644 --- a/test/features/masters/product/presentation/dialogs/product_detail_dialog_test.dart +++ b/test/features/masters/product/presentation/dialogs/product_detail_dialog_test.dart @@ -48,7 +48,7 @@ void main() { expect(find.text('등록'), findsWidgets); }); - testWidgets('showProductDetailDialog 상세 모드는 기본/연결/히스토리 정보를 제공한다', ( + testWidgets('showProductDetailDialog 상세 모드는 기본/연결 정보를 제공한다', ( tester, ) async { await tester.binding.setSurfaceSize(const Size(1280, 800)); @@ -95,8 +95,5 @@ void main() { await tester.pumpAndSettle(); expect(find.textContaining('슈퍼벤더'), findsWidgets); - await tester.tap(find.text('히스토리')); - await tester.pumpAndSettle(); - expect(find.textContaining('변경 이력 데이터는 준비 중입니다.'), findsOneWidget); }); }