Receipt Viewer Widget
Component Detail
User Interface
medium complexity
Shared Component
frontend
1
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Overlay modal that displays receipt images fetched via signed URLs from object storage, preventing unauthorized direct access to receipt files. Supports zoom, pan, and download for coordinators verifying claimed amounts. Handles loading states and graceful errors when signed URLs have expired.
receipt-viewer-widget
Responsibilities
- Open a modal overlay displaying the receipt image from a signed URL
- Support pinch-to-zoom and pan gestures for image inspection
- Handle expired or invalid signed URLs with a re-fetch trigger
- Provide a download button for saving the receipt locally
- Close on backdrop click or keyboard Escape
Interfaces
open(signedUrl, metadata)
close()
onDownload(signedUrl)
requestFreshUrl(receiptId)
renderLoadingState()
renderErrorState(error)