Warehouse Floor Plan Module
SVG-based zone layout visualization and management.
Features
- Admin-only floor plan editor with SVG upload
- Interactive zone drawing and editing (rectangles, polygons)
- Real-time driver overlay with GPS mapping
- Heatmap visualization based on analytics
- Read-only viewer for workers with pick route highlighting
- Pan & zoom functionality
- Export/import JSON for floor plan backup
- Integration with Pick & Pack for route visualization
Permissions
- Admin: Full access (editor)
- Worker: Read-only access (viewer)
- Driver: No access
Database Schema
Tables
floorplans: Floor plan master data with SVG contentfloorplan_zones: Zone shapes and positions on floor plan
Key Functions
createFloorplan(): Create new floor planupdateFloorplan(): Update floor plancreateZoneFromRect(): Create zone from rectangleupdateZoneShape(): Update zone shapegetFloorplanWithZones(): Get floor plan with zonescomputeHeatmap(): Compute heatmap valuesmapGeoToSvg(): Map GPS coordinates to SVG coordinates
Integration
- Pick & Pack: Highlights pick route on floor plan
- Driver Locations: Shows real-time driver positions
- Safety: Shows safety risk overlay
- Equipment Tracking: Shows equipment positions