diff --git a/replit.md b/replit.md index 0edf34f..2ebce6f 100644 --- a/replit.md +++ b/replit.md @@ -35,7 +35,12 @@ The database supports managing users, guards, certifications, sites, shifts, shi - **Multi-Sede Operational Planning**: Location-first approach for shift planning, filtering resources by selected branch. - **Service Type Classification**: Classifies services as "fisso" (fixed posts) or "mobile" (patrols, inspections) to route sites to appropriate planning modules. - **Planning Fissi**: Weekly planning grid for fixed posts, enabling shift creation with guard availability checks. Includes weekly shift duplication feature with confirmation dialog and automatic navigation. -- **Planning Mobile**: Guard-centric interface for mobile services, displaying guard availability and hours, with an interactive Leaflet map showing sites. Includes patrol sequence list view and duplication/modification dialog. +- **Planning Mobile**: Guard-centric interface for mobile services, displaying guard availability and hours, with an interactive Leaflet map showing sites. Features include: + - **Smart Site Assignment Indicators**: Sites already in patrol routes display "Assegnato a [Guard Name]" button with scroll-to functionality; unassigned sites show "Non assegnato" text + - **Drag-and-Drop Reordering**: Interactive drag-and-drop using @dnd-kit library for patrol route stops with visual feedback and automatic sequenceOrder persistence + - **Route Optimization**: OSRM API integration with TSP (Traveling Salesman Problem) nearest neighbor algorithm; displays total distance (km) and estimated travel time in dedicated dialog + - **Patrol Sequence List View**: Daily view of planned patrol routes with stops visualization + - **Duplication/Modification Dialog**: Copy routes to different dates or modify assigned guard - **Customer Management**: Full CRUD operations for customer details and customer-centric reporting with CSV export. - **Dashboard Operativa**: Live KPIs and real-time shift status. - **Gestione Guardie**: Complete profiles with skill matrix, certification management, and badge numbers. @@ -67,4 +72,6 @@ The system handles timezone conversions for shift times, converting Italy local - **Wouter**: For client-side routing. - **date-fns**: For date manipulation and formatting. - **Leaflet**: Interactive map library with react-leaflet bindings and OpenStreetMap tiles. -- **Nominatim**: OpenStreetMap geocoding API for automatic address-to-coordinates conversion. \ No newline at end of file +- **Nominatim**: OpenStreetMap geocoding API for automatic address-to-coordinates conversion. +- **OSRM (Open Source Routing Machine)**: Public API (router.project-osrm.org) for distance matrix calculation and route optimization in Planning Mobile. No authentication required. +- **@dnd-kit**: Drag-and-drop library (@dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities) for interactive patrol route reordering. \ No newline at end of file