Commit Graph

10 Commits (21b10c4ec1ed4066db265fa8720d85770290fec0)

Author SHA1 Message Date
Dustin 21b10c4ec1 backend: Attach photo to Journal ID
Firefly attachments are related to transaction journal entries rather
than the transactions themselves.  In other words, they're attached to
splits.
2025-03-08 20:13:10 -06:00
Dustin ff043631fa ui: Move camera action buttons below image viewer
On mobile, the screen is too narrow to put the action buttons to the
right of the image viewer.
2025-03-08 20:12:20 -06:00
Dustin 1f8584e164 ui: Select environment camera if possible
Apparently, Firefox/Android defaults to using the front camera, and
does not provide any native UI for selecting a different one.  We can
request the back camera by indiciting that the "environment" camera is
"ideal."
2025-03-08 20:10:50 -06:00
Dustin ab4b443a2d Fix path to static resources
In production deployments, the static assets are stored in
`/usr/local/share/receipts/static`.  The working directory is
`/usr/local/share/receipts`, so using a relative path of `static` is
sufficient.  We can use the same path in development with a symlink
pointing to the `esbuild` output directory.
2025-03-08 20:09:13 -06:00
Dustin 62e040836a Attach receipts to Firefly transactions
And now we come to the meat of the thing: the ability to update
transactions and attach receipts.  Most of this is straightforward,
except for changing the amount of split transactions.  Hopefully, this
won't come up too often, since I can't really split transactions without
a receipt.  Just to be on the safe side, attempting to change the amount
of a split transaction will return an error.
2025-03-08 20:08:14 -06:00
Dustin 5169758c23 Fetch transactions from Firefly III
This is all pretty straightforward.  The only real problem is that
the search results only contain matching transactions *splits*.  Since
transactions themselves do not have an amount, the value shown in the
_Amount_ column on the transaction list may be incorrect if a
transaction contains multiple splits and some of them do not match the
search query.
2025-03-08 16:01:08 -06:00
Dustin ec2e477fcd Implement basic page navigation w/ mock data
Obviously, we'll replace the mock `Database` with a Firefly III API
client, but this is here for now to support the UI interactions.
2025-03-08 11:16:35 -06:00
Dustin 7c6e993c1b fixup! Initial commit 2025-03-08 11:16:13 -06:00
Dustin 660a882971 js: Initial UI implementation
I've implemented the UI using TypeScript and Shoelace.  I originally
started with Pico CSS, but I didn't really like its visuals.  Since
capturing photos using the camera requires JavaScript, and that's
basically the entire point of this application, Shoelace's JavaScript
dependency (for WebComponents), is acceptable.

The photo capture uses the Media Capture Web API, which exposes the
camera directly as a video stream.  We capture a frame from this stream
and save it in a canvas, which we then pass to Cropper.js to let the
user select only the relevant portion of the picture containing the
receipt itself.
2025-03-08 11:11:42 -06:00
Dustin 63ced69e31 Initial commit 2025-03-05 18:02:52 -06:00