Developer
aa8fdaa5aa
fix(scanner): add team_id to collection_logs for robust stats tracking
...
- Created a database migration to add `team_id` to `collection_logs`.
- Created a database migration to backfill `team_id` for past scans using `trip_id` and scanner's active team.
- Updated `ScanService` to lookup the scanner's active team and store the `team_id` directly on the `CollectionLog`.
- Modified the `CollectionTeam` model's `collectionLogs()` relation to be a direct `HasMany` using the new `team_id` instead of routing through `Trip`.
- Updated `AdminTeamReportController` to query metrics directly from `collection_logs.team_id`, ensuring all past and future scans (including those done without an active trip) correctly increment team stats and daily charts.
2026-07-06 16:00:01 +08:00
..
2026-04-29 14:34:40 +08:00
2026-04-29 14:34:40 +08:00
2026-04-29 14:34:40 +08:00
2026-04-29 14:34:40 +08:00
2026-04-29 14:34:40 +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-04-29 21:46:53 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-29 23:59:56 +08:00
2026-04-30 00:06:37 +08:00
2026-04-30 00:06:37 +08:00
2026-06-29 15:02:52 +08:00
2026-04-30 00:11:22 +08:00
2026-04-30 00:11:22 +08:00
2026-04-30 00:39:14 +08:00
2026-04-30 00:39:14 +08:00
2026-04-30 02:12:41 +08:00
2026-04-30 02:12:41 +08:00
2026-04-30 02:25:04 +08:00
2026-04-30 02:25:04 +08:00
2026-04-30 02:48:40 +08:00
2026-04-30 02:48:40 +08:00
2026-04-30 02:48:40 +08:00
2026-04-30 02:48:40 +08:00
2026-04-30 02:51:52 +08:00
2026-04-30 02:51:52 +08:00
2026-04-30 02:51:52 +08:00
2026-04-30 02:51:52 +08:00
2026-04-30 02:53:25 +08:00
2026-04-30 02:55:29 +08:00
2026-04-30 02:55:29 +08:00
2026-04-30 02:58:09 +08:00
2026-05-01 14:01:38 +08:00
2026-05-01 14:01:38 +08:00
2026-05-01 14:01:38 +08:00
2026-06-29 15:02:52 +08:00
2026-05-01 22:38:35 +08:00
2026-05-01 22:38:35 +08:00
2026-05-01 22:38:35 +08:00
2026-05-01 22:57:56 +08:00
2026-06-29 16:56:33 +08:00
2026-06-29 16:56:33 +08:00
2026-06-30 13:31:36 +08:00
2026-07-01 16:38:49 +08:00
2026-07-01 16:38:49 +08:00
2026-07-01 16:38:49 +08:00
2026-07-02 13:55:08 +08:00
2026-07-02 13:57:39 +08:00
2026-07-02 13:57:39 +08:00
2026-07-02 15:01:44 +08:00
2026-07-02 17:12:28 +08:00
2026-07-02 12:03:50 +08:00
2026-07-02 12:03:50 +08:00
2026-07-02 13:56:02 +08:00
2026-07-02 12:03:50 +08:00
2026-07-03 14:22:13 +08:00
2026-07-04 18:36:38 +08:00
2026-07-04 18:36:38 +08:00
2026-07-06 13:20:15 +08:00
2026-07-06 16:00:01 +08:00
2026-07-06 16:00:01 +08:00