feat(dialog): 상세 팝업 SuperportDetailDialog 통합
- SuperportDetailDialog 위젯과 showSuperportDetailDialog 헬퍼를 추가하고 metadata/섹션 패턴을 표준화 - 결재/재고/마스터 각 상세 다이얼로그를 dialogs 디렉터리에 신설하고 기존 페이지를 신규 팝업으로 전환 - SuperportTable 행 선택과 우편번호 검색 다이얼로그 onRowTap 보정을 통해 헤더 오프셋 버그를 제거 - 상세 다이얼로그 및 트랜잭션/상세 뷰 전용 위젯 테스트와 tester_extensions 유틸을 추가하여 회귀를 방지 - detail_dialog_unification_plan.md로 작업 배경과 필드 통합 계획을 문서화
This commit is contained in:
@@ -1,43 +1,47 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../../../../../widgets/components/superport_dialog.dart';
|
||||
import '../../../../../widgets/components/superport_detail_dialog.dart';
|
||||
|
||||
/// 재고 트랜잭션 상세 정보를 Superport 다이얼로그로 표시하는 헬퍼이다.
|
||||
export '../../../../../widgets/components/superport_detail_dialog.dart'
|
||||
show SuperportDetailDialogSection, SuperportDetailMetadata;
|
||||
|
||||
/// 재고 트랜잭션 상세 정보를 Superport 상세 다이얼로그로 감싼다.
|
||||
Future<T?> showInventoryTransactionDetailDialog<T>({
|
||||
required BuildContext context,
|
||||
required String title,
|
||||
required String transactionNumber,
|
||||
required Widget body,
|
||||
required List<SuperportDetailMetadata> metadata,
|
||||
List<SuperportDetailDialogSection> sections = const [],
|
||||
Widget? summary,
|
||||
List<Widget> summaryBadges = const [],
|
||||
String? description,
|
||||
List<Widget> actions = const [],
|
||||
bool includeDefaultClose = true,
|
||||
bool barrierDismissible = true,
|
||||
BoxConstraints? constraints,
|
||||
EdgeInsetsGeometry? contentPadding,
|
||||
bool scrollable = true,
|
||||
bool barrierDismissible = true,
|
||||
int metadataColumns = 2,
|
||||
String? initialSectionId,
|
||||
int initialSectionIndex = 0,
|
||||
FutureOr<void> Function()? onSubmit,
|
||||
}) {
|
||||
final resolvedActions = <Widget>[
|
||||
...actions,
|
||||
if (includeDefaultClose)
|
||||
ShadButton.ghost(
|
||||
onPressed: () => Navigator.of(context, rootNavigator: true).maybePop(),
|
||||
child: const Text('닫기'),
|
||||
),
|
||||
];
|
||||
|
||||
return showSuperportDialog<T>(
|
||||
return showSuperportDetailDialog<T>(
|
||||
context: context,
|
||||
title: title,
|
||||
description: '트랜잭션번호 $transactionNumber',
|
||||
body: body,
|
||||
actions: resolvedActions,
|
||||
constraints: constraints,
|
||||
contentPadding: contentPadding,
|
||||
scrollable: scrollable,
|
||||
description: description,
|
||||
summary: summary,
|
||||
summaryBadges: summaryBadges,
|
||||
metadata: metadata,
|
||||
sections: sections,
|
||||
actions: actions,
|
||||
barrierDismissible: barrierDismissible,
|
||||
constraints: constraints ?? const BoxConstraints(maxWidth: 920),
|
||||
contentPadding:
|
||||
contentPadding ??
|
||||
const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
|
||||
metadataColumns: metadataColumns,
|
||||
initialSectionId: initialSectionId,
|
||||
initialSectionIndex: initialSectionIndex,
|
||||
onSubmit: onSubmit,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user