dfce9e5c02
PWA 본인 프로필:
- Profile.tsx 신규 (phone 자기수정 Dialog + 비밀번호 변경 + 로그아웃)
- TabBar 에 "내정보" 탭 추가 (총 5탭)
- 백엔드 PUT /api/mobile/me/profile/phone (MobileMeService.updateMyPhone, 토큰에서 userId 강제)
- 비밀번호 변경은 기존 /api/auth/password 재사용
PWA 출금 신청 취소:
- 백엔드 POST /api/mobile/me/withdraw-requests/{id}/cancel
· 본인 agentId 검증 후 기존 WithdrawRequestService.cancel 호출
· REQUESTED 상태에서만 가능 (기존 검증 재사용)
- WithdrawList 행을 SwipeAction 으로 감싸 "취소" 액션 노출
· REQUESTED 상태 행만 SwipeAction 활성
출금 SETTLED/FAILED 본인 알림 자동 발행:
- WithdrawBankSettleService 가 SETTLED/FAILED 전이 시 user_notification INSERT
- 신청자(requestedBy) 에게 RefType=WITHDRAW, refId=requestId 로 발행
- 알림 발행 실패해도 동기화 흐름 비차단 (warn 로그만)
- PWA NoticeList 의 "내 알림" 탭에서 즉시 확인 가능
검증:
- ga-api compileJava + ga-frontend/ga-mobile-pwa tsc PASS
- PUT /api/mobile/me/profile/phone (admin) → 200, GET /api/auth/me 의 phone 변경 확인
- POST /api/mobile/me/withdraw-requests/1/cancel (admin) → E403 (agentId null 보안 강제)
- POST /api/internal/bank-settle → 200 data=0 (이번엔 ACCEPTED 잔여 없음, 알림 발행 경로 코드상 검증)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ga-mobile-pwa
설계사 전용 모바일 셀프 조회 PWA 스캐폴드.
스택
- Vite + React 18 + TypeScript
- antd-mobile@5 (모바일 UI)
- vite-plugin-pwa (manifest + service worker autoUpdate)
- React Query (서버 상태) + Zustand (인증)
- 백엔드: 기존
ga-api(8082) 그대로 재사용. 로그인 후/api/auth/me의agentId로 본인 데이터 필터링.
화면
| 경로 | 화면 | 백엔드 API |
|---|---|---|
/login |
로그인 | POST /api/auth/login, GET /api/auth/me |
/ |
홈 (요약 카드 + 메뉴) | 위 3개 카운트 |
/statement |
정산 명세서 | GET /api/statements?agentId=… |
/withdraw |
출금 신청 이력 | GET /api/withdraw-requests?agentId=… |
/notice |
공지사항 | GET /api/notices/active |
실행
cd ga-mobile-pwa
npm install
npm run dev # http://localhost:3001
vite.config.ts 의 /api 프록시가 localhost:8082 로 전달하므로 ga-api 가 가동 중이어야 한다.
빌드 / 프리뷰
npm run build # tsc --noEmit + vite build (dist/)
npm run preview # 3001 에서 production 번들 서빙
PWA
manifest.webmanifest자동 생성 (vite-plugin-pwa)- 서비스워커:
registerType=autoUpdate. 신규 빌드 시 사용자 새로고침 시점에 갱신. - 런타임 캐시:
/api/**NetworkFirst, 5초 타임아웃, 5분 유효 (오프라인 시 직전 응답 반환) - 아이콘:
public/pwa-{192,512}.svg(스캐폴드 — 본 배포 시 PNG 권장)
잔여 작업 (스캐폴드 이후)
- 로그인 응답에서 직접 profile 추출 (현재
/me추가 호출) - 백엔드
/api/mobile/me/*전용 endpoint — 본인 agentId 자동 필터 (현 클라이언트 필터는 변조 가능) - 출금 신청 작성 화면 (현재 이력 조회만)
- 정산 명세서 상세 + PDF 다운로드
- 공지 상세 + 본인 알림(
user_notification) 표시 - 토큰 만료 자동 refresh (
/api/auth/refresh) - 푸시 알림 (FCM 등) — 외부 채널 결정 후
- 실 아이콘 PNG (192/512/512 maskable)