refactor: modularize road management modules

This commit is contained in:
2026-06-17 13:31:25 +05:30
parent 9bb740e446
commit 182d4ac293
41 changed files with 2386 additions and 1894 deletions

View File

@@ -8,7 +8,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { ChainageSummaryData } from '@/types';
import { projectService } from '@/services/api';
import { projectSummaryService } from '@/services/api';
import { getDetectionModeConfig } from '@/constants/detectionModeConfig';
// Dynamically import MapModal with SSR disabled (Leaflet requires window object)
@@ -37,7 +37,10 @@ const DetailedSummarySection = ({
const fetchSummary = async () => {
setLoading(true);
try {
const data = await projectService.getProjectSummaryByVideo(projectId, videoId);
const data = await projectSummaryService.getProjectSummaryByVideo<ChainageSummaryData>(
projectId,
videoId,
);
setSummaryData(data);
} catch (err) {
console.error('Failed to fetch summary:', err);