ReceiptCameraWidget
Component Detail
User Interface
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Mobile UI widget that lets peer mentors capture or select a receipt photo from the device camera or photo library. It compresses the image client-side before handing it off to the upload service, and displays upload progress and success or error states without blocking the expense registration form.
receipt-camera-widget
Sources & reasoning
Line 69 explicitly specifies receipt photo capture for expenses over 100 kr for HLF. The parent area is Fase 2 in the priority matrix at line 148, mapping to v1.0 by ordinal phase position.
-
docs/source/likeperson.md · line 69Kvitteringsbilde for utlegg over 100 kr (HLF).
-
docs/source/likeperson.md · line 148Reiserefusjon / utleggsregistrering | - | - | ✓ | ✓ | ✓ | SHOULD HAVE | 2
Responsibilities
- Present camera capture and photo library selection options to the user
- Compress selected images to a target size before upload
- Show non-blocking upload progress, success, and error feedback
- Integrate with the expense item form to attach the receipt reference on completion
- Enforce upload gating based on the organisation-configured reimbursement threshold
Interfaces
openCamera(): Promise<CompressedImage>
openLibrary(): Promise<CompressedImage>
compressImage(image: RawImage, targetKb: number): CompressedImage
onUploadStateChange(state: UploadState): void