Developer
1ee4a049dc
feat(trips): live mid-trip truck load input with Pusher broadcast
- Migration: add current_load_kg (nullable unsigned int) to trips table
- Trip model: add current_load_kg to fillable + integer cast
- New TruckLoadBroadcast event (ShouldBroadcastNow)
- Channel: private admin.live
- Event name: truck.load
- Payload: trip_id, team_id, truck_id, current_load_kg, capacity_kg, is_full
- DriverTripController::updateLoad()
- PATCH /api/v1/driver/trips/{trip}/update-load
- Validates status is in_progress, saves current_load_kg, fires broadcast
- Route: PATCH driver/trips/{trip}/update-load registered
- CollectionTeamResource: truck_is_full uses current_load_kg (live estimate)
with fallback to total_load_kg (authoritative dumpsite weight)
- TripResource: expose current_load_kg field
- Admin Teams card:
- data-team-id attribute added to each card for Echo targeting
- Load bar uses current_load_kg when available
- Echo listener for truck.load event patches load bar + badge in real-time
- truck-status-badge class added to Collecting/Truck Full spans
2026-07-02 15:01:44 +08:00
..
2026-06-29 15:02:52 +08:00
2026-06-29 15:02:52 +08:00
2026-06-29 15:02:52 +08:00
2026-06-29 15:02:52 +08:00
2026-07-02 13:55:34 +08:00
2026-05-01 22:57:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-30 00:11:22 +08:00
2026-07-02 13:55:34 +08:00
2026-06-29 15:02:52 +08:00
2026-05-01 22:57:56 +08:00
2026-04-29 23:59:56 +08:00
2026-05-01 22:38:35 +08:00
2026-06-29 15:02:52 +08:00
2026-05-01 22:57:56 +08:00
2026-05-01 14:01:38 +08:00
2026-06-29 15:02:52 +08:00
2026-07-02 13:47:49 +08:00
2026-06-29 15:02:52 +08:00
2026-04-29 23:59:56 +08:00
2026-07-02 13:57:39 +08:00
2026-06-29 16:56:33 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-06-29 15:02:52 +08:00
2026-04-30 02:25:04 +08:00
2026-04-29 23:59:56 +08:00
2026-06-29 15:02:52 +08:00
2026-07-02 12:03:50 +08:00
2026-07-02 13:55:34 +08:00
2026-04-29 23:59:56 +08:00
2026-07-02 12:03:50 +08:00
2026-07-02 13:57:39 +08:00
2026-07-01 16:38:49 +08:00
2026-06-29 16:56:33 +08:00
2026-07-02 13:55:08 +08:00
2026-07-02 15:01:44 +08:00
2026-06-29 15:02:52 +08:00
2026-07-01 13:23:39 +08:00
2026-06-29 15:02:52 +08:00
2026-05-01 14:01:38 +08:00
2026-07-02 11:44:31 +08:00
2026-06-29 15:02:52 +08:00