Skip to content

Commit 9b240a4

Browse files
Merge pull request #70 from pirogramming/feat-sy
feat:위치 설정 안 된 경우 메시지 표시
2 parents 479a008 + 6ae7310 commit 9b240a4

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

backend-core/static/missions/js/mission_detail.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,33 @@
5555
}
5656
}
5757

58+
/**
59+
* 위치 정보 없음 메시지 표시
60+
*/
61+
function showNoLocationMessage() {
62+
const container = document.getElementById('map');
63+
if (!container) return;
64+
65+
container.innerHTML = `
66+
<div style="
67+
display: flex;
68+
flex-direction: column;
69+
align-items: center;
70+
justify-content: center;
71+
height: 300px;
72+
background-color: #f8f9fa;
73+
border-radius: 8px;
74+
color: #6c757d;
75+
gap: 12px;
76+
">
77+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" class="bi bi-geo-alt-fill" viewBox="0 0 16 16">
78+
<path d="M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10m0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6"/>
79+
</svg>
80+
<div style="font-size: 16px; font-weight: 500;">장소 설정 없음</div>
81+
</div>
82+
`;
83+
}
84+
5885
// ==================== 이미지 갤러리 ====================
5986

6087
/**
@@ -211,6 +238,9 @@
211238
// 2. 지도 표시 (좌표가 있을 때만, 상태 포함)
212239
if (mission.location_lat && mission.location_lng) {
213240
initMap(mission.location_lat, mission.location_lng, mission.status);
241+
} else {
242+
// ✨ 위치 정보가 없으면 "장소 설정 없음" 메시지 표시
243+
showNoLocationMessage();
214244
}
215245

216246
// 3. 작성자인 경우 햄버거 버튼 표시

0 commit comments

Comments
 (0)