feat: 발송 통계 페이지 API 연동 (#39) #40

Merged
seonkyu.kim merged 1 commits from feature/SPMS-39-statistics-api-integration into develop 2026-03-02 02:54:14 +00:00
Owner

📋 작업 요약

  • 발송 통계 2개 페이지(통계 대시보드 + 발송 이력)를 Mock 데이터에서 실제 swagger API로 연동
  • 기기/메시지 관리와 동일한 패턴(loadData + useCallback + 서버 필터링) 적용

Closes #39

🛠️ 작업 내용 (Changes)

  • types.ts: Mock 데이터 7개 + SERVICE_FILTER_OPTIONS 삭제, swagger 기준 요청/응답 타입 15개 추가
  • statistics.api.ts: 신규 생성 (fetchDailyStats, fetchHourlyStats, fetchDeviceStats, fetchHistoryList, fetchHistoryDetail, exportHistory)
  • StatisticsPage.tsx: 4개 API 병렬 호출 + mapper 함수 6개로 차트 props 변환, fetchServices 서비스 필터 동적 로드
  • StatisticsHistoryPage.tsx: 서버 필터링, API 페이지네이션, 엑셀 blob 다운로드, 패널에 messageCode 전달
  • HistorySlidePanel.tsx: props를 messageCode로 변경, fetchHistoryDetail API 호출, 로딩 스켈레톤 추가

📢 리뷰어 참고 사항 (To Reviewers)

  • 차트 컴포넌트 6개(StatsSummaryCards, MonthlyTrendChart, PlatformDistribution, HourlyBarChart, RecentHistoryTable, OpenRateTop5)는 변경 없음 — mapper가 기존 props 형태로 변환
  • API 서버가 아직 없어 실제 동작 테스트는 미진행

체크리스트 (Self Checklist)

  • 빌드 성공 (tsc --noEmit 통과)
  • 테스트 통과 (API 서버 미연결로 미확인)
  • 불필요한 로그/주석 제거
  • 컨벤션 준수
  • 기밀 정보 하드코딩 없음

📸 스크린샷 / 테스트 로그 (Screenshots/Logs)

  • 없음
## 📋 작업 요약 - 발송 통계 2개 페이지(통계 대시보드 + 발송 이력)를 Mock 데이터에서 실제 swagger API로 연동 - 기기/메시지 관리와 동일한 패턴(loadData + useCallback + 서버 필터링) 적용 ## 🔗 관련 이슈 (Related Issues) Closes #39 ## 🛠️ 작업 내용 (Changes) - [x] `types.ts`: Mock 데이터 7개 + SERVICE_FILTER_OPTIONS 삭제, swagger 기준 요청/응답 타입 15개 추가 - [x] `statistics.api.ts`: 신규 생성 (fetchDailyStats, fetchHourlyStats, fetchDeviceStats, fetchHistoryList, fetchHistoryDetail, exportHistory) - [x] `StatisticsPage.tsx`: 4개 API 병렬 호출 + mapper 함수 6개로 차트 props 변환, fetchServices 서비스 필터 동적 로드 - [x] `StatisticsHistoryPage.tsx`: 서버 필터링, API 페이지네이션, 엑셀 blob 다운로드, 패널에 messageCode 전달 - [x] `HistorySlidePanel.tsx`: props를 messageCode로 변경, fetchHistoryDetail API 호출, 로딩 스켈레톤 추가 ## 📢 리뷰어 참고 사항 (To Reviewers) - 차트 컴포넌트 6개(StatsSummaryCards, MonthlyTrendChart, PlatformDistribution, HourlyBarChart, RecentHistoryTable, OpenRateTop5)는 변경 없음 — mapper가 기존 props 형태로 변환 - API 서버가 아직 없어 실제 동작 테스트는 미진행 ## ✅ 체크리스트 (Self Checklist) - [x] 빌드 성공 (tsc --noEmit 통과) - [ ] 테스트 통과 (API 서버 미연결로 미확인) - [x] 불필요한 로그/주석 제거 - [x] 컨벤션 준수 - [x] 기밀 정보 하드코딩 없음 ## 📸 스크린샷 / 테스트 로그 (Screenshots/Logs) - 없음
seonkyu.kim added 1 commit 2026-03-02 02:52:59 +00:00
- types.ts: Mock 데이터 7개 + SERVICE_FILTER_OPTIONS 삭제, swagger 기준 요청/응답 타입 15개 추가
- statistics.api.ts: 신규 생성 (fetchDailyStats, fetchHourlyStats, fetchDeviceStats, fetchHistoryList, fetchHistoryDetail, exportHistory)
- StatisticsPage.tsx: 4개 API 병렬 호출 + mapper 함수 6개로 차트 props 변환, fetchServices 서비스 필터 동적 로드
- StatisticsHistoryPage.tsx: 서버 필터링, API 페이지네이션, 엑셀 blob 다운로드, 패널에 messageCode 전달
- HistorySlidePanel.tsx: props를 messageCode로 변경, fetchHistoryDetail API 호출, 로딩 스켈레톤 추가

Closes #39
seonkyu.kim added the
Priority
Medium
Status
In Progress
Type
Feature
labels 2026-03-02 02:53:08 +00:00
seonkyu.kim self-assigned this 2026-03-02 02:53:16 +00:00
seonkyu.kim added this to the Phase 1 - 프로젝트 초기 설정 milestone 2026-03-02 02:53:18 +00:00
seonkyu.kim requested review from Owners 2026-03-02 02:53:29 +00:00
seonkyu.kim merged commit 683d0e6f30 into develop 2026-03-02 02:54:14 +00:00
seonkyu.kim deleted branch feature/SPMS-39-statistics-api-integration 2026-03-02 02:54:30 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-03-02 02:54:56 +00:00
Sign in to join this conversation.
No description provided.