fix(inventory): 파트너 연동 및 상세 모달 동작 안정화
- 입고 레코드에 파트너 식별자와 고객 요약을 캐싱하고 상세 칩으로 노출 - 입고 등록 모달에서 파트너 선택 복원과 고객 동기화를 지원하며 취소 시 상세를 복귀하도록 수정 - 재고 컨트롤러에 고객 동기화 유틸리티와 결재 상태 로딩을 추가하고 단위 테스트를 확장 - 제품·파트너 자동완성 위젯을 재작성해 초기 로딩, 검색, 외부 컨트롤러 동기화를 안정화 - 재고 상세/공통 모달 닫기와 출고·대여 편집 모달의 네비게이터 호출을 루트 기준으로 통일 - 테스트: flutter analyze, flutter test (기존 레이아웃 검증 케이스 실패 지속)
This commit is contained in:
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart' as lucide;
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../core/constants/app_sections.dart';
|
||||
@@ -437,6 +436,10 @@ class _AccountMenuButton extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (result) {
|
||||
case _AccountDialogResult.logout:
|
||||
await service.clearSession();
|
||||
@@ -446,6 +449,9 @@ class _AccountMenuButton extends StatelessWidget {
|
||||
break;
|
||||
case _AccountDialogResult.passwordChanged:
|
||||
final confirmed = await _showMandatoryLogoutDialog(context);
|
||||
if (!context.mounted) {
|
||||
break;
|
||||
}
|
||||
if (confirmed == true) {
|
||||
await service.clearSession();
|
||||
if (context.mounted) {
|
||||
@@ -601,7 +607,7 @@ class _AccountDialogState extends State<_AccountDialog> {
|
||||
}
|
||||
|
||||
Widget _wrapWithWillPop(Widget child) {
|
||||
return WillPopScope(onWillPop: () async => !_isSaving, child: child);
|
||||
return PopScope(canPop: !_isSaving, child: child);
|
||||
}
|
||||
|
||||
Future<void> _saveProfile() async {
|
||||
|
||||
@@ -170,7 +170,9 @@ class SuperportDialog extends StatelessWidget {
|
||||
if (secondaryAction != null) secondaryAction!,
|
||||
primaryAction ??
|
||||
ShadButton.ghost(
|
||||
onPressed: onClose ?? () => Navigator.of(context).maybePop(),
|
||||
onPressed:
|
||||
onClose ??
|
||||
() => Navigator.of(context, rootNavigator: true).maybePop(),
|
||||
child: const Text('닫기'),
|
||||
),
|
||||
].whereType<Widget>().toList();
|
||||
|
||||
Reference in New Issue
Block a user