장비 이력 상세보기 지원 및 상태/선택 동기화 개선
- EquipmentHistoryDialog: 좌우 분할 상세 패널(데스크톱) + 하단 시트(모바일) 추가 • 거래일/유형/수량/창고/장비/회사/비고/생성·수정일 표시 • 리스트 항목 선택 하이라이트, ID 복사 기능 - EquipmentListController: 이력 최신순 정렬 후 상태/일자 결정(오래된 순 가정 제거) - EquipmentList(ShadTable): 체크박스 선택 시 컨트롤러 선택집합과 동기화 - ResponseInterceptor: equipment-history는 transaction_type 로깅, 장비 목록은 status 로깅으로 혼동 제거
This commit is contained in:
@@ -11,12 +11,22 @@ class ResponseInterceptor extends Interceptor {
|
||||
debugPrint('[ResponseInterceptor] 상태 코드: ${response.statusCode}');
|
||||
debugPrint('[ResponseInterceptor] 응답 데이터 타입: ${response.data.runtimeType}');
|
||||
|
||||
// 장비 관련 API 응답 상세 로깅
|
||||
if (response.requestOptions.path.contains('equipment')) {
|
||||
debugPrint('[ResponseInterceptor] 장비 API 응답 전체: ${response.data}');
|
||||
// 장비/이력 관련 API 응답 상세 로깅 (혼동 방지용)
|
||||
if (response.requestOptions.path.contains('equipment-history')) {
|
||||
if (response.data is List && (response.data as List).isNotEmpty) {
|
||||
final firstItem = (response.data as List).first;
|
||||
debugPrint('[ResponseInterceptor] 첫 번째 장비 상태: ${firstItem['status']}');
|
||||
debugPrint('[ResponseInterceptor] equipment-history 첫 항목 transaction_type: ${firstItem['transaction_type']}');
|
||||
} else if (response.data is Map && (response.data as Map).containsKey('data')) {
|
||||
final data = (response.data as Map)['data'];
|
||||
if (data is List && data.isNotEmpty) {
|
||||
debugPrint('[ResponseInterceptor] equipment-history 첫 항목 transaction_type: ${data.first['transaction_type']}');
|
||||
}
|
||||
}
|
||||
} else if (response.requestOptions.path.contains('equipment')) {
|
||||
debugPrint('[ResponseInterceptor] 장비 API 응답 도메인: ${response.requestOptions.path}');
|
||||
if (response.data is List && (response.data as List).isNotEmpty) {
|
||||
final firstItem = (response.data as List).first;
|
||||
debugPrint('[ResponseInterceptor] 장비 첫 항목 status 필드: ${firstItem['status']}');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,4 +122,4 @@ class ResponseInterceptor extends Interceptor {
|
||||
|
||||
return !hasMetaKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user