feat: implement trip incident dashboard, drop-off geofence validation, and calendar updates
- **Trip Incidents**: Created the `AdminTripController@incidents` API endpoint, built the `incidents.blade.php` view, enabled the incidents sidebar link, and added test coverage (`TripIncidentDashboardTest.php`). - **Drop-off Points (LGU Geofence)**: Added a Barangay (LGU) dropdown to the drop-off point form. Integrated `Turf.js` to render the LGU boundary polygon on Leaflet and restrict pin placement (clicks, drags, and address search) to within the selected boundary. - **Trip Calendar**: Changed the shortcut for opening the Daily Digest from Ctrl+Click to Shift+Click on calendar dates. - **API fixes**: Corrected the Barangay fetch endpoint to `/api/v1/geo/barangays` in the Drop-off points view.
This commit is contained in:
@@ -21,6 +21,14 @@ class TripTimelineEventResource extends JsonResource
|
||||
'id' => $this->recordedBy?->uuid,
|
||||
'name' => $this->recordedBy?->full_name,
|
||||
]),
|
||||
'trip' => $this->whenLoaded('trip', fn () => [
|
||||
'id' => $this->trip?->id,
|
||||
'trip_number' => $this->trip?->trip_number,
|
||||
'route_name' => $this->trip?->route?->name,
|
||||
'team_name' => $this->trip?->team?->name,
|
||||
'driver_name' => $this->trip?->team?->driver?->full_name,
|
||||
'truck_plate' => $this->trip?->truck?->plate_number,
|
||||
]),
|
||||
'related_type' => $this->related_type,
|
||||
'related_id' => $this->related_id,
|
||||
'metadata' => $this->metadata,
|
||||
|
||||
Reference in New Issue
Block a user