{% extends "base.html" %} {% block title %}Review Queue — NFR{% endblock %} {% block content %}
{{ total_count }} pending item{{ "s" if total_count != 1 }} — sorted oldest first
| # | Filename | Source | Reason | Project | Proposed Destination | Confidence | Age | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ item.id }} | {# Filename #}{{ rec.original_filename if rec else "—" }} | {# Source #}{{ rec.ingest_source if rec else "—" }} | {# Reason #}
{% if item.review_reason == "LOW_CONFIDENCE_MATCH" %}
Low confidence match
{% elif item.review_reason == "NO_PROJECT_MATCH" %}
No project match
{% elif item.review_reason == "LOW_CONFIDENCE_ROUTE" %}
Low confidence route
{% elif item.review_reason == "SECURITY_VIOLATION_BLOCKED" %}
Security violation
{% else %}
{{ item.review_reason }}
{% endif %}
{% if item.reason_detail %}
{{ item.reason_detail[:80] }}
{% endif %}
|
{# Proposed project #}
{% set proj = project_map.get(item.proposed_project_id) if item.proposed_project_id else None %}
{% if proj %}
{{ proj.project_number }} {{ proj.project_name[:40] }}{% if proj.project_name|length > 40 %}…{% endif %} {% else %} — {% endif %} |
{# Proposed destination #}
{% if item.proposed_destination %} {{ item.proposed_destination }} {% else %} — {% endif %} | {# Confidence #}{% if item.proposed_confidence %} {% set pct = (item.proposed_confidence * 100) | int %} {% if pct >= 80 %} {{ pct }}% {% elif pct >= 60 %} {{ pct }}% {% else %} {{ pct }}% {% endif %} {% else %} — {% endif %} | {# Age #}{{ item.created_at.strftime("%Y-%m-%d %H:%M") if item.created_at else "—" }} | {# Action buttons #}
Details
{% if item.proposed_destination and item.proposed_project_id %}
{# Quick-accept form — only shown when a valid proposed routing exists #}
{% endif %}
|