fix: API 응답 파싱 오류 수정 및 에러 처리 개선
주요 변경사항: - 창고 관리 API 응답 구조와 DTO 불일치 수정 - WarehouseLocationDto에 code, manager_phone 필드 추가 - RemoteDataSource에서 API 응답을 DTO 구조에 맞게 변환 - 회사 관리 API 응답 파싱 오류 수정 - CompanyResponse의 필수 필드를 nullable로 변경 - PaginatedResponse 구조 매핑 로직 개선 - 에러 처리 및 로깅 개선 - Service Layer에 상세 에러 로깅 추가 - Controller에서 에러 타입별 처리 - 새로운 유틸리티 추가 - ResponseInterceptor: API 응답 정규화 - DebugLogger: 디버깅 도구 - HealthCheckService: 서버 상태 확인 - 문서화 - API 통합 테스트 가이드 - 에러 분석 보고서 - 리팩토링 계획서
This commit is contained in:
@@ -130,7 +130,7 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: ShadcnTheme.gradient1.withOpacity(0.3),
|
||||
color: ShadcnTheme.gradient1.withValues(alpha: 0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
@@ -186,10 +186,10 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
),
|
||||
const SizedBox(height: ShadcnTheme.spacing8),
|
||||
|
||||
// 사용자명 입력
|
||||
// 아이디/이메일 입력
|
||||
ShadcnInput(
|
||||
label: '사용자명',
|
||||
placeholder: '사용자명을 입력하세요',
|
||||
label: '아이디/이메일',
|
||||
placeholder: '아이디 또는 이메일을 입력하세요',
|
||||
controller: controller.idController,
|
||||
prefixIcon: const Icon(Icons.person_outline),
|
||||
keyboardType: TextInputType.text,
|
||||
@@ -229,10 +229,10 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
padding: const EdgeInsets.all(ShadcnTheme.spacing3),
|
||||
margin: const EdgeInsets.only(bottom: ShadcnTheme.spacing4),
|
||||
decoration: BoxDecoration(
|
||||
color: ShadcnTheme.destructive.withOpacity(0.1),
|
||||
color: ShadcnTheme.destructive.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(ShadcnTheme.radiusMd),
|
||||
border: Border.all(
|
||||
color: ShadcnTheme.destructive.withOpacity(0.3),
|
||||
color: ShadcnTheme.destructive.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -270,8 +270,13 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
// 테스트 로그인 버튼
|
||||
ShadcnButton(
|
||||
text: '테스트 로그인',
|
||||
onPressed: () {
|
||||
widget.onLoginSuccess();
|
||||
onPressed: () async {
|
||||
// 테스트 계정 정보 자동 입력
|
||||
widget.controller.idController.text = 'admin@superport.kr';
|
||||
widget.controller.pwController.text = 'admin123!';
|
||||
|
||||
// 실제 로그인 프로세스 실행
|
||||
await _handleLogin();
|
||||
},
|
||||
variant: ShadcnButtonVariant.secondary,
|
||||
size: ShadcnButtonSize.medium,
|
||||
@@ -298,7 +303,7 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
Container(
|
||||
padding: const EdgeInsets.all(ShadcnTheme.spacing2),
|
||||
decoration: BoxDecoration(
|
||||
color: ShadcnTheme.info.withOpacity(0.1),
|
||||
color: ShadcnTheme.info.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(ShadcnTheme.radiusMd),
|
||||
),
|
||||
child: Icon(
|
||||
@@ -323,7 +328,7 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
Text(
|
||||
'Copyright 2025 NatureBridgeAI. All rights reserved.',
|
||||
style: ShadcnTheme.bodySmall.copyWith(
|
||||
color: ShadcnTheme.foreground.withOpacity(0.7),
|
||||
color: ShadcnTheme.foreground.withValues(alpha: 0.7),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user