Skip to content

feat(report): api 호출#53

Merged
onohesey merged 2 commits into
devfrom
feat/report-api
Jun 3, 2026
Merged

feat(report): api 호출#53
onohesey merged 2 commits into
devfrom
feat/report-api

Conversation

@onohesey

@onohesey onohesey commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

작업내용

src/app/api/report.ts 추가

  • Report, ReportPet, ReportMedical, ReportLifestyle, ReportVaccination, ReportAlert 타입 정의
  • VaccinationCode / AlertType 유니온 타입
  • ReportApiError / ReportNetworkError 에러 클래스
  • getReport(petId) — GET /api/report?petId={petId}, JWT Authorization 헤더 자동 첨부

src/app/components/HealthReport.tsx 수정

  • 하드코딩 제거
  • loading 상태: 스피너 + "리포트 불러오는 중..."
  • error 상태 : 404 → "등록된 반려동물이 없습니다", 기타 → 재시도 안내
  • 진료 현황 : totalVisitCount 표시, 진료과 breakdown 제거
  • 생활 기록 : 산책(weeklyAverageWalkMinutes) + 체중(latestWeightKg/weightChangeKg), 음수량 제거
  • 예방접종 : 백신별 주기(HEARTWORM 30일, PARASITE 90일, 나머지 365일) 계산 → 접종완료/이번달접종필요/기한초과 상태 표시
  • 알림 : ALERT_INFO 테이블로 영문 type → 한글 문구 + 아이콘 매핑, 미등록 type은 alert.message 원문 fallback
  • pet 정보 : profileImageUrl 있으면 이미지, 없으면 이모지. ageYears null이면 나이 미표시

@onohesey onohesey requested a review from dhkdxh June 3, 2026 08:08
@onohesey onohesey merged commit 2d4d0e5 into dev Jun 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant