hsa-app/internal/web/templates/manage.html
Jean-Michel Tremblay 8b7252dad4 Initial commit: HSA receipt tracker
Go app for capturing and archiving HSA-eligible receipts: OIDC/PKCE auth
against Authelia, SQLite storage with dual-write (filesystem + DB blob),
mobile-first upload, and DB export.

Adds AI receipt classification: a config.json catalog of people and
categories (seeded into the DB on startup), a prompt builder that derives
name-order/initial variants from the data (with same-surname ambiguity
handling), and an Anthropic tool-use client behind POST /classify. Tests
run against a mock endpoint; a live integration test is env-gated to the
cheapest model.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:40:12 -04:00

34 lines
1.2 KiB
HTML

{{define "title"}}Manage{{end}}
{{define "content"}}
<p><a href="/">← Back to upload</a></p>
<h1>Manage lists</h1>
<p><small>Rename fixes the label everywhere it's used (receipts reference these by id). Adding a new entry creates a fresh id.</small></p>
{{if .Error}}<div class="err">{{.Error}}</div>{{end}}
<h2>Categories</h2>
{{range .Categories}}
<form class="row" method="post" action="/manage/categories/rename">
<input type="hidden" name="id" value="{{.ID}}">
<input type="text" name="label" value="{{.Label}}">
<button type="submit">Save</button>
</form>
{{end}}
<form class="row add" method="post" action="/manage/categories">
<input type="text" name="label" placeholder="New category">
<button type="submit">Add</button>
</form>
<h2>Who</h2>
{{if not .People}}<p><small>No entries yet — add one below.</small></p>{{end}}
{{range .People}}
<form class="row" method="post" action="/manage/people/rename">
<input type="hidden" name="id" value="{{.ID}}">
<input type="text" name="label" value="{{.Label}}">
<button type="submit">Save</button>
</form>
{{end}}
<form class="row add" method="post" action="/manage/people">
<input type="text" name="label" placeholder="New person">
<button type="submit">Add</button>
</form>
{{end}}