diff --git a/frontend/components/dashboard/widgets/CustomMetricTestWidget.tsx b/frontend/components/dashboard/widgets/CustomMetricTestWidget.tsx index 1aa36559..6a5f235c 100644 --- a/frontend/components/dashboard/widgets/CustomMetricTestWidget.tsx +++ b/frontend/components/dashboard/widgets/CustomMetricTestWidget.tsx @@ -74,12 +74,6 @@ export default function CustomMetricTestWidget({ element }: CustomMetricTestWidg const config = element?.customMetricConfig; - console.log("๐Ÿ“Š [CustomMetricTestWidget] ๋ Œ๋”๋ง:", { - element, - config, - dataSource: element?.dataSource, - }); - useEffect(() => { loadData(); @@ -207,7 +201,6 @@ export default function CustomMetricTestWidget({ element }: CustomMetricTestWidg } } } catch (err) { - console.error("๋ฐ์ดํ„ฐ ๋กœ๋“œ ์‹คํŒจ:", err); setError(err instanceof Error ? err.message : "๋ฐ์ดํ„ฐ๋ฅผ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค"); } finally { setLoading(false); diff --git a/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx b/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx index 50f203d5..e23d32c1 100644 --- a/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx +++ b/frontend/components/dashboard/widgets/MapTestWidgetV2.tsx @@ -128,7 +128,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { return { markers: [], polygons: [] }; } catch (err: any) { - console.error(`โŒ ๋ฐ์ดํ„ฐ ์†Œ์Šค "${source.name || source.id}" ๋กœ๋”ฉ ์‹คํŒจ:`, err); return { markers: [], polygons: [] }; } }), @@ -151,8 +150,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { if (value.polygons && Array.isArray(value.polygons)) { allPolygons.push(...value.polygons); } - } else if (result.status === "rejected") { - console.error(`โŒ ๋ฐ์ดํ„ฐ ์†Œ์Šค ${index} ์‹คํŒจ:`, result.reason); } }); @@ -160,22 +157,9 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { const markersWithHeading = allMarkers.map((marker) => { const prevMarker = prevMarkersRef.current.find((pm) => pm.id === marker.id); - console.log("๐Ÿ” ๋งˆ์ปค ๋น„๊ต:", { - id: marker.id, - ํ˜„์žฌ์œ„์น˜: `[${marker.lat}, ${marker.lng}]`, - ์ด์ „์œ„์น˜: prevMarker ? `[${prevMarker.lat}, ${prevMarker.lng}]` : "์—†์Œ", - ๊ฐ™์€์ง€: prevMarker ? prevMarker.lat === marker.lat && prevMarker.lng === marker.lng : "N/A", - }); - if (prevMarker && (prevMarker.lat !== marker.lat || prevMarker.lng !== marker.lng)) { // ์ด๋™ํ–ˆ์œผ๋ฉด ๋ฐฉํ–ฅ ๊ณ„์‚ฐ const heading = calculateHeading(prevMarker.lat, prevMarker.lng, marker.lat, marker.lng); - console.log("๐Ÿงญ ๋ฐฉํ–ฅ ๊ณ„์‚ฐ:", { - id: marker.id, - from: `[${prevMarker.lat.toFixed(4)}, ${prevMarker.lng.toFixed(4)}]`, - to: `[${marker.lat.toFixed(4)}, ${marker.lng.toFixed(4)}]`, - heading: `${heading.toFixed(1)}ยฐ`, - }); return { ...marker, heading, @@ -185,7 +169,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { } // ์ด๋™ํ•˜์ง€ ์•Š์•˜๊ฑฐ๋‚˜ ์ด์ „ ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์œผ๋ฉด ๊ธฐ์กด heading ์œ ์ง€ (๋˜๋Š” 0) - console.log("โธ๏ธ ์ด๋™ ์—†์Œ:", { id: marker.id, heading: marker.heading || prevMarker?.heading || 0 }); return { ...marker, heading: marker.heading || prevMarker?.heading || 0, @@ -197,7 +180,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { setPolygons(allPolygons); setLastRefreshTime(new Date()); } catch (err: any) { - console.error("โŒ ๋ฐ์ดํ„ฐ ๋กœ๋”ฉ ์ค‘ ์˜ค๋ฅ˜:", err); setError(err.message); } finally { setLoading(false); @@ -359,7 +341,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { return results; } catch (error) { - console.error(" โŒ XML ํŒŒ์‹ฑ ์‹คํŒจ:", error); return []; } }; @@ -404,13 +385,11 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { obj.name = obj.subRegion || obj.region || obj.code; result.push(obj); - // console.log(` โœ… ํŒŒ์‹ฑ ์„ฑ๊ณต:`, obj); } } return result; } catch (error) { - console.error(" โŒ ํ…์ŠคํŠธ ํŒŒ์‹ฑ ์˜ค๋ฅ˜:", error); return []; } }; @@ -444,7 +423,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { // coordinates๊ฐ€ [lat, lng] ๋ฐฐ์—ด์˜ ๋ฐฐ์—ด์ธ์ง€ ํ™•์ธ const firstCoord = row.coordinates[0]; if (Array.isArray(firstCoord) && firstCoord.length === 2) { - // console.log(` โ†’ ํด๋ฆฌ๊ณค์œผ๋กœ ์ฒ˜๋ฆฌ:`, row.name); polygons.push({ id: row.id || row.code || `polygon-${index}`, name: row.name || row.title || `์˜์—ญ ${index + 1}`, @@ -487,7 +465,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { if (coords) { lat = coords.lat; lng = coords.lng; - // console.log(` โ†’ ๋ณ€ํ™˜ ์„ฑ๊ณต: (${lat}, ${lng})`); } } @@ -498,7 +475,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { if (coords) { lat = coords.lat; lng = coords.lng; - // console.log(` โ†’ ๋ณ€ํ™˜ ์„ฑ๊ณต: (${lat}, ${lng})`); } } @@ -506,7 +482,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { if (mapDisplayType === "polygon") { const regionName = row.name || row.subRegion || row.region || row.area; if (regionName) { - // console.log(` ๐Ÿ”ท ๊ฐ•์ œ ํด๋ฆฌ๊ณค ๋ชจ๋“œ: ${regionName} โ†’ ํด๋ฆฌ๊ณค์œผ๋กœ ์ถ”๊ฐ€ (GeoJSON ๋งค์นญ)`); polygons.push({ id: `${sourceName}-polygon-${index}-${row.code || row.id || Date.now()}`, // ๊ณ ์œ  ID ์ƒ์„ฑ name: regionName, @@ -516,8 +491,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { source: sourceName, color: dataSource?.polygonColor || getColorByStatus(row.status || row.level), }); - } else { - // console.log(` โš ๏ธ ๊ฐ•์ œ ํด๋ฆฌ๊ณค ๋ชจ๋“œ์ง€๋งŒ ์ง€์—ญ๋ช… ์—†์Œ - ์Šคํ‚ต`); } return; // ํด๋ฆฌ๊ณค์œผ๋กœ ์ฒ˜๋ฆฌํ–ˆ์œผ๋ฏ€๋กœ ๋งˆ์ปค๋กœ๋Š” ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์Œ } @@ -540,7 +513,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { // ์œ„๋„/๊ฒฝ๋„๊ฐ€ ์—†๋Š” ์œก์ง€ ์ง€์—ญ โ†’ ํด๋ฆฌ๊ณค์œผ๋กœ ์ถ”๊ฐ€ (GeoJSON ๋งค์นญ์šฉ) const regionName = row.name || row.subRegion || row.region || row.area; if (regionName) { - // console.log(` ๐Ÿ“ ์œ„๋„/๊ฒฝ๋„ ์—†์ง€๋งŒ ์ง€์—ญ๋ช… ์žˆ์Œ: ${regionName} โ†’ ํด๋ฆฌ๊ณค์œผ๋กœ ์ถ”๊ฐ€ (GeoJSON ๋งค์นญ)`); polygons.push({ id: `${sourceName}-polygon-${index}-${row.code || row.id || Date.now()}`, // ๊ณ ์œ  ID ์ƒ์„ฑ name: regionName, @@ -550,9 +522,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { source: sourceName, color: dataSource?.polygonColor || getColorByStatus(row.status || row.level), }); - } else { - // console.log(` โš ๏ธ ์œ„๋„/๊ฒฝ๋„ ์—†๊ณ  ์ง€์—ญ๋ช…๋„ ์—†์Œ - ์Šคํ‚ต`); - // console.log(` ๋ฐ์ดํ„ฐ:`, row); } } }); @@ -938,7 +907,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { const nameColumn = columns.find((col) => /^(name|title|์ด๋ฆ„|๋ช…์นญ|location)$/i.test(col)); if (!latColumn || !lngColumn) { - console.warn("โš ๏ธ ์œ„๋„/๊ฒฝ๋„ ์ปฌ๋Ÿผ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."); return []; } @@ -974,7 +942,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { const data = await response.json(); setGeoJsonData(data); } catch (err) { - console.error("โŒ GeoJSON ๋กœ๋“œ ์‹คํŒจ:", err); + // GeoJSON ๋กœ๋“œ ์‹คํŒจ ์ฒ˜๋ฆฌ } }; loadGeoJsonData(); @@ -1073,14 +1041,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { {/* ํด๋ฆฌ๊ณค ๋ Œ๋”๋ง */} {/* GeoJSON ๋ Œ๋”๋ง (์œก์ง€ ์ง€์—ญ ๊ฒฝ๊ณ„์„ ) */} - {(() => { - // console.log(`๐Ÿ—บ๏ธ GeoJSON ๋ Œ๋”๋ง ์กฐ๊ฑด ์ฒดํฌ:`, { - // geoJsonData: !!geoJsonData, - // polygonsLength: polygons.length, - // polygonNames: polygons.map(p => p.name), - // }); - return null; - })()} {geoJsonData && polygons.length > 0 ? ( p.id))} // ํด๋ฆฌ๊ณค ๋ณ€๊ฒฝ ์‹œ ์žฌ๋ Œ๋”๋ง @@ -1095,31 +1055,25 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { // ์ •ํ™•ํ•œ ๋งค์นญ if (p.name === sigName) { - // console.log(`โœ… ์ •ํ™• ๋งค์นญ: ${p.name} === ${sigName}`); return true; } if (p.name === ctpName) { - // console.log(`โœ… ์ •ํ™• ๋งค์นญ: ${p.name} === ${ctpName}`); return true; } // ๋ถ€๋ถ„ ๋งค์นญ (GeoJSON ์ง€์—ญ๋ช…์— ํด๋ฆฌ๊ณค ์ด๋ฆ„์ด ํฌํ•จ๋˜๋Š”์ง€) if (sigName && sigName.includes(p.name)) { - // console.log(`โœ… ๋ถ€๋ถ„ ๋งค์นญ: ${sigName} includes ${p.name}`); return true; } if (ctpName && ctpName.includes(p.name)) { - // console.log(`โœ… ๋ถ€๋ถ„ ๋งค์นญ: ${ctpName} includes ${p.name}`); return true; } // ์—ญ๋ฐฉํ–ฅ ๋งค์นญ (ํด๋ฆฌ๊ณค ์ด๋ฆ„์— GeoJSON ์ง€์—ญ๋ช…์ด ํฌํ•จ๋˜๋Š”์ง€) if (sigName && p.name.includes(sigName)) { - // console.log(`โœ… ์—ญ๋ฐฉํ–ฅ ๋งค์นญ: ${p.name} includes ${sigName}`); return true; } if (ctpName && p.name.includes(ctpName)) { - // console.log(`โœ… ์—ญ๋ฐฉํ–ฅ ๋งค์นญ: ${p.name} includes ${ctpName}`); return true; } @@ -1209,11 +1163,7 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { } }} /> - ) : ( - <> - {/* console.log(`โš ๏ธ GeoJSON ๋ Œ๋”๋ง ์•ˆ ๋จ: geoJsonData=${!!geoJsonData}, polygons=${polygons.length}`) */} - - )} + ) : null} {/* ํด๋ฆฌ๊ณค ๋ Œ๋”๋ง (ํ•ด์ƒ ๊ตฌ์—ญ๋งŒ) */} {polygons @@ -1315,8 +1265,6 @@ export default function MapTestWidgetV2({ element }: MapTestWidgetV2Props) { const L = require("leaflet"); const heading = marker.heading || 0; - console.log("๐ŸŽจ ๋งˆ์ปค ๋ Œ๋”๋ง:", { id: marker.id, heading: `${heading.toFixed(1)}ยฐ`, type: markerType }); - if (markerType === "arrow") { // ํ™”์‚ดํ‘œ ๋งˆ์ปค markerIcon = L.divIcon({