Skip to content

feat(dashboard): add a latest proof of delivery photos widget - #388

Merged
roncodes merged 1 commit into
release/v0.6.72from
feat/proof-of-delivery-widget
Oct 12, 2026
Merged

roncodes merged 1 commit into
release/v0.6.72from
feat/proof-of-delivery-widget

Conversation

@roncodes

Copy link
Copy Markdown
Member

Adds a dashboard tile showing the latest proof of delivery photos.

Endpoint

GET /int/v1/fleet-ops/proofs/recent?limit=12 (ProofController@recent). It returns the session company's proofs that:

  • are attached to an order
  • have a file of type photo, so signatures and QR scans are excluded

Results are newest first, with order.customer and file eager-loaded. limit defaults to 12 and is clamped to 1–24.

Each item has id, order_id, customer_name, remarks, url (the file's signed URL) and captured_at. The route is registered in the proofs group callback, which fleetbaseRoutes adds before the REST routes, so recent isn't taken as an id.

Widget

widget/proof-of-delivery, registered as fleet-ops-proof-of-delivery-widget (Operations, 4×9). It shows:

  • a 3-column photo grid; each photo opens full size in a new tab, and the order id links to the order details page
  • time ago for each photo
  • loading, error and empty states

It's not added to the default dashboard layout.

Tests

  • Pest: ProofControllerRecentTest (5 tests) covers company scoping, photo-only filtering, ordering, the payload, limit bounds and sessions with no company. Every new controller line is covered. It and ProofControllerContractsTest exit 0.
  • Ember: 8 unit tests for the widget pass in headless Chrome. eslint, prettier and template-lint are clean.
  • Not done yet: the tile hasn't been checked visually in a running console, and there are no rendering tests.

Adds a Proof of Delivery dashboard tile showing the latest delivery photos
in a grid, each linking to its order, with loading and empty states.

Backed by GET /int/v1/fleet-ops/proofs/recent, which returns the session
company's latest photo proofs (file type 'photo') on orders, newest first,
with order public_id, customer name, capture time and a signed photo url.
The limit defaults to 12 and is capped between 1 and 24.
@roncodes
roncodes merged commit 3864a8c into release/v0.6.72 Oct 12, 2026
4 of 6 checks passed
@roncodes
roncodes deleted the feat/proof-of-delivery-widget branch October 12, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant