feat(approvals): Approval Flow v2 프런트엔드 전면 개편
- 환경/라우터 모듈에 approval_flow_v2 토글을 추가하고 FeatureFlags 초기화를 연결 (.env*, lib/core/**) - ApiClient 빌더·ApiRoutes 확장과 ApprovalRepositoryRemote 리팩터링으로 include·액션 시그니처를 정합화 - ApprovalFlow·ApprovalDraft 엔티티/레포/유즈케이스를 도입해 서버 초안과 단계 액션(승인·회수·재상신)을 지원 - Approval 컨트롤러·히스토리·템플릿 페이지와 공유 위젯을 재작성해 감사 로그·회수 UX·템플릿 CRUD를 반영 - Inbound/Outbound/Rental 컨트롤러·페이지에 결재 섹션을 삽입하고 대시보드 pending 카드 요약을 갱신 - SuperportDialog·FormField 등 공통 위젯을 보강하고 승인 위젯 가이드를 추가해 UI 가이드를 정리 - 결재/재고 테스트 픽스처와 단위·위젯·통합 테스트를 확장하고 flutter_test_config로 스테이징 호스트를 허용 - Approval Flow 레포트/플랜 문서를 업데이트하고 ApprovalFlow_System_Integration_and_ChangePlan.md를 추가 - 실행: flutter analyze, flutter test
This commit is contained in:
@@ -42,6 +42,7 @@ class SuperportDialog extends StatelessWidget {
|
||||
this.insetPadding,
|
||||
this.onSubmit,
|
||||
this.enableFocusTrap = true,
|
||||
this.headerActions,
|
||||
});
|
||||
|
||||
final String title;
|
||||
@@ -62,6 +63,11 @@ class SuperportDialog extends StatelessWidget {
|
||||
final FutureOr<void> Function()? onSubmit;
|
||||
final bool enableFocusTrap;
|
||||
|
||||
/// 헤더 우측에 표시할 추가 액션 위젯 목록.
|
||||
///
|
||||
/// - 닫기 버튼 왼쪽에 순서대로 렌더링된다.
|
||||
final List<Widget>? headerActions;
|
||||
|
||||
/// 공통 다이얼로그를 노출하는 헬퍼. `showDialog`와 동일하게 동작한다.
|
||||
static Future<T?> show<T>({
|
||||
required BuildContext context,
|
||||
@@ -97,6 +103,7 @@ class SuperportDialog extends StatelessWidget {
|
||||
description: description,
|
||||
showCloseButton: showCloseButton,
|
||||
onClose: handleClose,
|
||||
actions: headerActions,
|
||||
);
|
||||
final resolvedFooter = footer ?? _buildFooter(context);
|
||||
|
||||
@@ -243,12 +250,14 @@ class _SuperportDialogHeader extends StatelessWidget {
|
||||
this.description,
|
||||
required this.showCloseButton,
|
||||
required this.onClose,
|
||||
this.actions,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final String? description;
|
||||
final bool showCloseButton;
|
||||
final VoidCallback onClose;
|
||||
final List<Widget>? actions;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -276,6 +285,11 @@ class _SuperportDialogHeader extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (actions != null && actions!.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 4, top: 2),
|
||||
child: Wrap(spacing: 8, runSpacing: 8, children: actions!),
|
||||
),
|
||||
if (showCloseButton)
|
||||
IconButton(
|
||||
icon: const Icon(lucide.LucideIcons.x, size: 18),
|
||||
@@ -306,6 +320,7 @@ Future<T?> showSuperportDialog<T>({
|
||||
VoidCallback? onClose,
|
||||
FutureOr<void> Function()? onSubmit,
|
||||
bool enableFocusTrap = true,
|
||||
List<Widget>? headerActions,
|
||||
}) {
|
||||
return SuperportDialog.show<T>(
|
||||
context: context,
|
||||
@@ -324,6 +339,7 @@ Future<T?> showSuperportDialog<T>({
|
||||
onClose: onClose,
|
||||
onSubmit: onSubmit,
|
||||
enableFocusTrap: enableFocusTrap,
|
||||
headerActions: headerActions,
|
||||
child: body,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user