12 Commits

Author SHA1 Message Date
ramram1515
76b70d3aea Fix missing LGU/tenant relations and display in tables; Add LGU hierarchy tests 2026-07-07 12:03:24 +08:00
Developer
6f5327bbcd 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.
2026-07-06 12:39:51 +08:00
Azure
f45b016215 feat: Implement interactive Trip Calendar, auto-scheduling suggestions, dumpsite geofence bounds, and household head details editing 2026-07-06 11:14:31 +08:00
ramram1515
8e93b889ee feat: implement trip handover logic and tests 2026-07-03 15:54:26 +08:00
ramram1515
24665a9594 feat: Add handed_off trip status handling and fix trips dashboard 2026-07-03 14:22:13 +08:00
Developer
9123ffe099 Implement trip continuation and driver history 2026-07-02 17:12:28 +08:00
Developer
3beafa3ac2 feat(admin/trips): surface dumpsite release records in trip detail panel
- Eager-load dumpsiteReleases.dumpsite + dumpsiteReleases.releasedByDriver
  in AdminTripController::show()
- Add releases[] array to TripResource via whenLoaded('dumpsiteReleases')
  - Fields: weight_kg, released_at, dumpsite_name, driver_name,
    gate_pass_number, dumpsite_attendant, notes
- Admin Trips detail panel now shows a 'Dumpsite Releases' section
  below the timeline with per-release cards
- Load row updated to show release count e.g. '450 kg (2 releases)'
2026-07-02 15:01:23 +08:00
Developer
f517b77377 style: fix linting issues with Laravel Pint 2026-07-02 13:55:34 +08:00
Developer
70741a3c24 feat: live tracking setup and map parsing fixes 2026-07-01 13:04:51 +08:00
ramram1515
91df4d05f0 fix: increase per_page validation limit to 500 across all remaining admin endpoints 2026-06-29 12:26:37 +08:00
58a7d3680a feat(backend): hardening sprint — docs, schedulers, validation, email + pickup
1. API docs via dedoc/scramble at /docs/api (scoped to api/v1).
   Linked from the admin sidebar Settings group.

2. Scheduled commands registered in routes/console.php:
   - reports:aggregate (02:00) — daily/weekly/monthly aggregations
   - qr:expire (02:30) — flips past-due allocated/active codes to expired
   - trucks:prune-locations (03:00) — drops history older than retention
     window (default 7 days, config('verde.location_retention_days'))
   All idempotent + withoutOverlapping. --dry flags on qr:expire and
   trucks:prune-locations for safe inspection.

3. Trip double-booking validation: AdminTripController::store rejects
   new trips when the team or truck already has a non-cancelled trip on
   the same date. override_conflicts: true bypasses for emergencies.
   Cancelled trips don't block rebooking.

4a. Email verification: User implements MustVerifyEmail.
    VerifyEmailNotification overrides verificationUrl() for our
    namespaced route. Register sends the link automatically (best
    effort, won't block signup). POST /auth/email/resend (auth) +
    GET /auth/email/verify/{id}/{hash} (signed URL).

4b. Password change while logged in: POST /me/password validates
    current_password, requires the new password to differ, revokes
    every other active token on success — current session stays.

5a. PickupImminent notification: when TripStop -> arrived,
    TripExecutor::notifyAssignedHouseholds() finds households whose
    assigned_drop_off_point_id matches and sends DB + SMS.

5b. Auto-geofence on truck location: TruckTracker::record() now
    auto-fires TripExecutor::arriveAtDumpsite() when an in-progress
    trip's truck pings inside its dumpsite boundary. The executor's
    status guard prevents duplicate timeline events if the driver also
    presses arrive-dumpsite manually.

190 feature tests passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 17:13:00 +08:00
13148fab97 feat(backend): complete Module 10 (trips + timeline)
trips, trip_stops, trip_timeline_events. Admin: schedule/show/cancel.
Driver: start, arrive/depart/skip stops, report incident, arrive at
dumpsite, release load (creates dumpsite_release row + tallies trip
load), complete. Every action writes a typed timeline event with GPS.
Trip number auto-generated TRIP-YYYYMMDD-NNN. Promotes
dumpsite_releases.trip_id to a real FK now that trips exists.

148 feature tests passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 02:51:52 +08:00