Files
Verde-Web/app/Http/Resources/CollectionTeamResource.php
Developer f5d520181e feat(admin/teams): add truck operational status badge
- Add truck_is_full computed field to CollectionTeamResource
  - true when current trip load >= truck capacity_kg
  - true when trip status is at_dumpsite (driver rerouted to dumpsite)
  - uses whenLoaded() guard, safe when currentTrip not eager-loaded

- Rework teams card badge layout (Admin UI)
  - H row: remove misleading 'Not Full' for standby teams; show Full/Incomplete for active only
  - Truck Load row: always rendered with 4 context-aware states
    - IDLE (standby teams)
    - READY (active, no current trip)
    - COLLECTING (active trip, under capacity)
    - TRUCK FULL (at capacity or at dumpsite)
2026-07-02 14:23:02 +08:00

1.9 KiB