119 lines
4.9 KiB
HTML
119 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Review Queue</title>
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
</head>
|
|
<body>
|
|
<div class="app-shell" id="app-shell">
|
|
{% include "partials/sidebar.html" %}
|
|
|
|
<main class="main">
|
|
<div class="topbar">
|
|
<div>
|
|
<h1 class="page-title">Review Queue</h1>
|
|
<p class="page-subtitle">Work through OCR review and field extraction in order.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="button-row">
|
|
{% if next_ocr %}
|
|
<a class="button-link primary" href="/documents/{{ next_ocr.document_id }}?queue=ocr">Next needing OCR review</a>
|
|
{% endif %}
|
|
{% if next_fields %}
|
|
<a class="button-link" href="/documents/{{ next_fields.document_id }}?queue=fields">Next needing field extraction</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Needs OCR review ({{ needs_ocr_review|length }})</h2>
|
|
{% if needs_ocr_review %}
|
|
<div class="table-wrap">
|
|
<table>
|
|
<thead><tr><th>Document</th><th>Type</th><th>Review status</th><th>Updated</th></tr></thead>
|
|
<tbody>
|
|
{% for doc in needs_ocr_review %}
|
|
<tr>
|
|
<td><a href="/documents/{{ doc.document_id }}?queue=ocr">{{ doc.document_id }}</a></td>
|
|
<td>{{ doc.document_type }}</td>
|
|
<td><span class="badge pending">{{ doc.review_status }}</span></td>
|
|
<td>{{ doc.updated_at }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<p class="empty-state">No documents currently need OCR review.</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Needs field extraction ({{ needs_field_extraction|length }})</h2>
|
|
{% if needs_field_extraction %}
|
|
<div class="table-wrap">
|
|
<table>
|
|
<thead><tr><th>Document</th><th>Type</th><th>Review status</th><th>Updated</th></tr></thead>
|
|
<tbody>
|
|
{% for doc in needs_field_extraction %}
|
|
<tr>
|
|
<td><a href="/documents/{{ doc.document_id }}?queue=fields">{{ doc.document_id }}</a></td>
|
|
<td>{{ doc.document_type }}</td>
|
|
<td><span class="badge reviewed">{{ doc.review_status }}</span></td>
|
|
<td>{{ doc.updated_at }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<p class="empty-state">No reviewed documents are waiting on field extraction.</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2 class="card-title">Recently updated</h2>
|
|
{% if recently_updated %}
|
|
<div class="table-wrap">
|
|
<table>
|
|
<thead><tr><th>Document</th><th>Type</th><th>Review status</th><th>Current path</th><th>Updated</th></tr></thead>
|
|
<tbody>
|
|
{% for doc in recently_updated %}
|
|
<tr>
|
|
<td><a href="/documents/{{ doc.document_id }}?queue=recent">{{ doc.document_id }}</a></td>
|
|
<td>{{ doc.document_type }}</td>
|
|
<td><span class="badge {% if doc.review_status == 'reviewed' %}reviewed{% else %}pending{% endif %}">{{ doc.review_status }}</span></td>
|
|
<td>{{ doc.current_path }}</td>
|
|
<td>{{ doc.updated_at }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
const appShell = document.getElementById("app-shell");
|
|
const menuToggle = document.getElementById("menu-toggle");
|
|
if (!appShell || !menuToggle) return;
|
|
menuToggle.addEventListener("click", function () {
|
|
appShell.classList.toggle("nav-open");
|
|
});
|
|
menuToggle.addEventListener("keydown", function (e) {
|
|
if (e.key === "Enter" || e.key === " ") {
|
|
e.preventDefault();
|
|
appShell.classList.toggle("nav-open");
|
|
}
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|