hsa-app/internal/web/templates/ai_review.html

39 lines
1.4 KiB
HTML
Raw Permalink Normal View History

{{define "title"}}Review misread{{end}}
{{define "content"}}
<header>
<span><a href="/ai">← AI</a></span>
<span>classified by {{.Model}} · {{.When}}</span>
</header>
<h1>Review misread</h1>
<p><a href="/receipt/{{.ReceiptID}}/file" target="_blank">Open the receipt image ↗</a></p>
<table class="tally">
<thead><tr><th>Field</th><th>AI guessed</th><th>You entered</th></tr></thead>
<tbody>
{{range .Fields}}
<tr{{if .Overridden}} class="miss"{{end}}>
<th>{{.Field}}</th>
<td>{{.Suggested}}</td>
<td>{{.Final}}{{if .Overridden}} ✎{{end}}</td>
</tr>
{{end}}
</tbody>
</table>
<p><small>Rows marked ✎ are where you overrode the AI.</small></p>
<form method="post" action="/ai/review/{{.ReceiptID}}">
<h2>What fixed it?</h2>
{{if .SinceNotes}}
<p><small>Notes added since this receipt was classified — tick any that address this misread:</small></p>
{{range .SinceNotes}}
<label class="check"><input type="checkbox" name="fix" value="{{.ID}}"> {{.Text}}</label>
{{end}}
{{else}}
<p><small>No notes were added after this receipt was classified. Add a correction note on the <a href="/ai">AI page</a> first if one would help, then come back — or close this as unresolved.</small></p>
{{end}}
<button type="submit" class="primary">Done reviewing</button>
<p><small>Ticking one or more notes marks this as fixed; ticking none closes it as unresolved.</small></p>
</form>
{{end}}