IM3: 경쟁업체 InfoWindow 카카오맵 link + 전화번호 노출#187
Merged
Merged
Conversation
상권분석 페이지 경쟁업체 마커 클릭 시 InfoWindow 에서 매장명을 카카오맵 place 페이지(http://place.map.kakao.com/{kakao_id}) 로 연결. 전화번호도 함께 노출 (tel: 링크). 변경: - backend/src/services/commercial_intelligence.py analyze_competition SQL 의 SELECT 에 place_url, phone 컬럼 추가. samples dict 에 두 필드 자동 포함 (기존 row_dict 패턴). - backend/src/main.py _collect_all_competitor_locations 결과 dict 에 place_url, phone 추가. schemas/simulation_output.py 의 all_competitor_locations 는 list[dict] 이라 별도 schema 변경 불필요 (extra='allow'). - frontend/src/types/index.ts SimulationOutput.all_competitor_locations 항목에 place_url, phone, category 옵셔널 필드 추가. - frontend/.../MarketMap.tsx Competitor interface 확장 (place_url, phone). buildCompetitorInfoHtml: place_url 있으면 매장명을 a 태그로 감싸 target=_blank 새 창. phone 있으면 tel: 링크. escapeHtml 추가. - frontend/.../MapSection.tsx buildCompetitors 의 두 분기 (all_competitor_locations / competition_500m) 모두에서 place_url, phone 패스스루. 검증: - ruff format 통과 (commercial_intelligence.py) - prettier 통과 (3 frontend 파일) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
이전 commit (ac48834) 이 경쟁업체 (all_competitor_locations) 만 처리했고, 자사 매장 (same_brand_locations) 측 누락. 두 흐름이 별개 SQL/dict 변환 경로라 자사 측도 같은 패턴으로 보강. 변경: - backend/src/services/brand_mapping_resolver.py get_all_mapo_stores_by_brand SQL SELECT 에 place_url, phone 추가. - backend/src/main.py _collect_same_brand_locations 결과 dict 에 place_url, phone 추가. - frontend/src/types/index.ts SimulationOutput.same_brand_locations 항목에 place_url, phone 옵셔널 추가. - frontend/.../MarketMap.tsx SameBrandLocation interface 확장. 자사 매장 InfoWindow: place_url 있으면 brand_name + place_name 둘 다 카카오맵 새 창 link 로 표시. phone 있으면 tel: 링크. 경쟁업체 InfoWindow 와 동일 패턴. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
상권분석 페이지 경쟁업체 마커 클릭 시 InfoWindow 의 매장명을 카카오맵 place 페이지 로 연결. 전화번호도 함께 노출 (tel: 링크).
`kakao_store.place_url` / `kakao_store.phone` 컬럼이 이미 존재하지만 기존 SELECT 누락 → 응답 노출 안 되던 이슈.
변경
UX
Schema 변경 (Backend)
`schemas/simulation_output.py` 의 `all_competitor_locations: list[dict]` 이라 명시적 schema 변경 불필요. extra='allow' 패턴.
Test plan
영역
🤖 Generated with Claude Code