Skip to content

v0.6.44#232

Merged
roncodes merged 11 commits intomainfrom
dev-v0.6.44
Apr 22, 2026
Merged

v0.6.44#232
roncodes merged 11 commits intomainfrom
dev-v0.6.44

Conversation

@roncodes
Copy link
Copy Markdown
Member

  • Fixes the order import template download with correct template

roncodes and others added 11 commits April 6, 2026 02:01
This commit introduces full, industry-standard active geofencing capabilities
to FleetOps, transforming Zones and Service Areas from passive visual/pricing
constructs into live geofence triggers.

## Database Migrations (4 new)
- add_geofence_config_to_zones_table: trigger_on_entry, trigger_on_exit,
  dwell_threshold_minutes, speed_limit_kmh columns
- add_geofence_config_to_service_areas_table: same config columns
- create_driver_geofence_states_table: per-driver/geofence state machine
  (is_inside, entered_at, exited_at, dwell_job_id)
- create_geofence_events_log_table: persistent audit log with full indexing

## New Backend Classes
- GeofenceIntersectionService: spatial intersection engine using MySQL
  MBRContains (index-assisted bounding box pre-filter) + ST_Contains
  (exact polygon check) with per-driver state tracking
- GeofenceEntered / GeofenceExited / GeofenceDwelled: Laravel broadcast
  events with full industry-standard JSON webhook payloads
- HandleGeofenceEntered / HandleGeofenceExited / HandleGeofenceDwelled:
  queued listeners that write to the event log and send notifications
- CheckGeofenceDwell: delayed queue job that fires GeofenceDwelled if
  the driver is still inside after the configured threshold
- DriverArrivedAtGeofence: multi-channel notification (database, broadcast,
  mail) for geofence arrival alerts
- GeofenceController: REST API for event log, real-time inventory,
  dwell report, and per-driver history
- GeofenceEventLog: Eloquent model for the events log table

## Modified Backend Files
- DriverController@track: integrated GeofenceIntersectionService after
  every location ping; dispatches events and schedules dwell jobs
- Zone / ServiceArea models: added geofence config fields to fillable/casts
- EventServiceProvider: registered all three geofence event-listener pairs
- FleetOpsServiceProvider: singleton binding for GeofenceIntersectionService,
  registered DriverArrivedAtGeofence notification
- routes.php: added /geofences/* API route group

## New Frontend Files
- addon/services/geofence-event-bus.js: singleton service that subscribes
  to the company WebSocket channel and maintains a live event feed;
  exposes on/off pub-sub API and emits on the universe event bus
- addon/components/map/toolbar/geofence-events-panel.js/.hbs: live map
  toolbar panel showing a real-time stream of geofence events with
  colour-coded entry/exit/dwell badges

## Modified Frontend Files
- addon/components/zone/form.hbs: added Geofence Triggers ContentPanel
  with entry/exit toggles, dwell threshold, and speed limit inputs
- addon/components/service-area/form.hbs: same Geofence Triggers panel
- addon/components/map/leaflet-live-map.js: injected geofenceEventBus,
  subscribed to geofence.entered/exited universe events, added
  #handleGeofenceEntered / #handleGeofenceExited private methods that
  flash the matching polygon layer green/red on the live map
feat: Implement Active Geofencing — Entry, Exit & Dwell Events
@roncodes roncodes merged commit 1b9a792 into main Apr 22, 2026
7 checks passed
@roncodes roncodes deleted the dev-v0.6.44 branch April 22, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant