Commit Graph

76 Commits

Author SHA1 Message Date
ramram1515
79e8ce2286 fix: improve 403 error message in StorePortalController and link demo stores to LGU 2026-07-02 15:43:15 +08:00
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
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
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
Developer
6b39cf645a fix: restore Endroid Builder::create() fix in StorePortalController 2026-07-02 13:57:40 +08:00
Developer
ba30a5fcdf fix: QrCode relation bug and Endroid create() error 2026-07-02 13:57:39 +08:00
Developer
d9495be0e0 feat: Implement segmented toggle for Resident/Household sales, Cash Only badge, and user_id in StoreSale 2026-07-02 13:57:39 +08:00
Developer
f517b77377 style: fix linting issues with Laravel Pint 2026-07-02 13:55:34 +08:00
Developer
c4cbdb42c7 feat(store): complete partner store overhaul with mapping, household search, financial analytics, and resident notification system 2026-07-02 13:55:08 +08:00
ramram1515
7ced07b323 feat: Relax barangay_id requirement for resident registration 2026-07-02 13:22:33 +08:00
ramram1515
ec6b9e61a3 feat: implement Live Truck Radar caching 2026-07-02 13:02:29 +08:00
Developer
a1470eb85e feat: implement team standby status, helper persistence, and store portal foundations 2026-07-02 12:03:50 +08:00
ramram1515
a9a1df93bd feat(driver): Add assigned truck details to profile screen 2026-07-02 11:44:31 +08:00
Developer
4a4b88ffe4 feat: partner store financial settlements, qr replacements, and tenant resolution fix 2026-07-01 16:38:49 +08:00
Developer
62bcf68bdb feat: add partner store analytics, history logs, and global SRP validation 2026-07-01 15:02:43 +08:00
Developer
cc4fd8ba17 feat: early dumping detour mode backend logic 2026-07-01 13:23:39 +08:00
Developer
70741a3c24 feat: live tracking setup and map parsing fixes 2026-07-01 13:04:51 +08:00
Developer
7a63d2c680 Merge branch 'main' of https://gitea-qzlf.srv1050180.hstgr.cloud/admin/Verde-Web 2026-06-30 16:10:43 +08:00
ramram1515
2467633b1b Config 2026-06-30 16:10:19 +08:00
Developer
d66d6e3396 fix: resolve tenant_id scoping issue on QR code batch generation 2026-06-30 15:59:03 +08:00
Developer
6c83d99fd7 Merge branch 'main' of https://gitea-qzlf.srv1050180.hstgr.cloud/admin/Verde-Web 2026-06-30 15:33:50 +08:00
Developer
5959f74746 chore: clean up 2026-06-30 15:32:01 +08:00
Developer
cfb09fd5fb feat: add void and delete endpoints for qr batches, fix batch list status counts 2026-06-30 15:03:25 +08:00
Developer
7452848cf9 fix: resolve duplicate entry error when adding a soft-deleted member back to a household 2026-06-30 14:48:23 +08:00
Developer
bb9825a86b feat: add batch activation endpoint and fix batch generation sequence bug 2026-06-30 14:27:17 +08:00
ramram1515
b8c56585bc UI enhancements and Actionable Notifications 2026-06-30 14:06:21 +08:00
Developer
a4e0fd3408 Merge branch 'main' of https://gitea-qzlf.srv1050180.hstgr.cloud/admin/Verde-Web 2026-06-30 13:35:28 +08:00
Developer
92f8ee95fc feat: Add Geofence Leaflet drawing tool for DOPs and Dumpsites 2026-06-30 13:31:36 +08:00
ramram1515
88caf14aa1 fix(api): force Manila timezone for upcoming pickups evaluation 2026-06-30 13:21:56 +08:00
Developer
7601d721d2 feat(api): add active-trip endpoint for helper and enable Vite dev server CORS 2026-06-30 11:25:31 +08:00
Developer
64d442ec2e feat: add proof of residency upload option during admin household creation 2026-06-30 10:27:49 +08:00
Super Admin
cfd7166a24 feat: implement drop-off points & dumpsites edit/delete and status transition logic 2026-06-29 23:15:55 +08:00
Super Admin
f2c1573f00 feat: Implement Truck edit, delete, and automatic trip cancellation when moved to maintenance/retired status 2026-06-29 22:59:47 +08:00
Super Admin
7a8fe3e7c3 feat: Add mapping, boundaries, and tabbed slide-over management to Partner Stores 2026-06-29 22:32:59 +08:00
Super Admin
31b9bbb026 feat: Implement tabbed slide-over edit modal for households 2026-06-29 19:42:16 +08:00
ramram1515
1b7cabef4c Implement missing proof of residency tests 2026-06-29 17:03:05 +08:00
Developer
7dc074e3c3 Implement household, QR sale, team helpers assignment, and helper endpoints 2026-06-29 16:56:33 +08:00
Developer
b85fc255cf feat: implement barangay and household management with associated tests 2026-06-29 15:02:52 +08:00
ramram1515
9ac2ea7bda chore: apply code review checklist and web design guidelines fixes 2026-06-29 13:54:14 +08:00
Developer
2c7c3528e4 feat: implement interactive Barangay polygon map selector in Service Areas 2026-06-29 13:22:45 +08:00
Developer
171271b447 fix: resolve Unauthenticated response when downloading QR code batch print PDF by passing token in query 2026-06-29 13:05:30 +08:00
Developer
4d8ccd3cd4 Merge branch 'main' of https://gitea-qzlf.srv1050180.hstgr.cloud/admin/Verde-Web 2026-06-29 12:45:13 +08:00
Developer
8dbc87b44f feat: add super admin LGU management and global user creator dashboard screens 2026-06-29 12:45:07 +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
ramram1515
e76eec1fbd Merge branch 'main' of https://gitea-qzlf.srv1050180.hstgr.cloud/admin/Verde-Web 2026-06-29 12:21:48 +08:00
ramram1515
4b483c093b fix: increase per_page validation limit to 500 on admin endpoints to allow drop-down populating 2026-06-29 12:17:34 +08:00
Developer
82dc044e1a merge: resolve conflicts in EnsureUserHasRole.php and echo.js 2026-06-29 12:05:52 +08:00
ramram1515
8638a80067 feat: implement interactive map location picker and address search with autocomplete suggestions 2026-06-29 11:54:39 +08:00
Developer
167abdc6ad fix: resolve super_admin login, echo crash and GD extension test failures 2026-06-29 11:43:40 +08:00
63a2cfa5c0 feat(mobile-scanner): scaffold + Phase 1 — full scan flow
Flutter app for scanner staff at drop-off points, package
ph.verde.verde_scanner. Built on the same foundation as
mobile-driver — Riverpod 2, Dio, go_router, secure_storage —
plus mobile_scanner for native MLKit-backed QR/Code-128 detection.

Backend:
- DropOffPointResource now exposes db_id alongside the public uuid.
  The /scanner/scan endpoint takes the integer drop_off_point_id, so
  the picker screen needs both to resolve a tap → scan target.

Auth + tenancy (mirrors driver app):
- Tenant gate at /tenant with the same SAN-PASCUAL-BAT shortcut.
- Login validates user.role ∈ { scanner, admin } and stashes the
  bearer in keychain.
- ResolveTenant headers attached automatically on every request.

DOP picker (new):
- /dop screen lists drop-off points within 50 km of current GPS,
  sorted by distance. Pick one → stored in secure storage as the
  active session DOP. The router redirects authenticated scanners
  here until they pick.
- GPS prompt screen if location services / permission are missing,
  with retry.

Home screen (new):
- "STATIONED AT" banner showing the active DOP with a Change link
  that returns to the picker.
- Premium gradient "Start scanning" CTA. Disabled until a DOP is
  picked.
- Two stat counters (accepted / total) for the current session.
- Recent scans list with outcome-colored icons.

Camera scan screen (new):
- mobile_scanner with QR + Code-128 formats and noDuplicates speed.
- Verde reticle overlay with corner brackets, dimmed surroundings.
- Bottom translucent banner shows active DOP + accepted count.
- Full-screen toast overlay on every scan: green "Accepted" / amber
  "Duplicate" / red "Expired" / red "Invalid" / gray "Network
  error". Haptic + system click on accept. 1.5 s cooldown so the
  same code can't pump.
- Torch + camera-flip controls top-right.

Data layer:
- DopRepository: GET /drop-off-points/nearby, returns DopOption with
  both id and uuid.
- ScanRepository: POST /scanner/scan with current GPS, maps the
  backend's "rejected: reason[]" response onto a typed ScanOutcome
  (accepted / duplicate / expired / invalid / networkError).
- RecentScansController: in-memory ring buffer capped at 50.
  Phase 2 will persist + add an offline buffer.

Permissions:
- iOS Info.plist: NSCameraUsageDescription + NSLocationWhenInUseUsageDescription.
- Android manifest: CAMERA + ACCESS_FINE_LOCATION + INTERNET +
  uses-feature camera.

Tests: TenantScreen builds. flutter analyze: 6 style infos, no errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 23:49:20 +08:00