{% extends 'planner/base.html' %}{% load static %} {% block title %}Inventory review · Tasknest{% endblock %} {% block content %}
← Kitchen inventory

{% if state == 'processing' %}Processing scan items{% elif state == 'deferred' %}Deferred scan items{% else %}Additional Review Required{% endif %}

{{ review_count }} product{{ review_count|pluralize }} {% if state == 'processing' %}are queued or being enriched.{% elif state == 'deferred' %}deferred for later. Fetched and entered information remains saved.{% else %}need review. Fetched and entered information is kept on each staged item.{% endif %}

{% if state != 'processing' %}{% endif %} {% if state != 'processing' %}
{% csrf_token %}
Processing and review counts
{% endif %} {% if approved_count %}

{{ approved_count }} product{{ approved_count|pluralize }} added to inventory.

{% endif %} {% if review_error %}{% endif %} {% if mode == 'individual' or state == 'processing' %}
{% for item in items %}

{{ item.get_status_display }} · {{ item.location.name }}

{{ item.product_name|default:'Product details needed' }}

{{ item.brand }}{% if item.brand %} · {% endif %}Barcode {{ item.barcode }}

{% if item.last_error %}

{{ item.last_error }}

{% endif %}

{{ item.package_count }} package{{ item.package_count|pluralize }}{% if item.package_amount %} · {{ item.package_amount }} {{ item.package_unit }}{% endif %}

{% if state != 'processing' %}Review product{% endif %}
{% empty %}

{% if state == 'processing' %}No items processing{% else %}Nothing needs review{% endif %}

{% if state == 'processing' %}Submitted scan batches will appear here while the worker enriches them.{% else %}Products that could not be matched or need corrections will appear here.{% endif %}

{% endfor %}
{% elif state != 'processing' %}
{% csrf_token %}

{% if preview %}Preview selected products{% else %}Select products to review together{% endif %}

{% if preview %}Review the affected rows before adding them to inventory. Individual product fields and nutrition stay unchanged.{% else %}Apply a shared storage location or category, then preview the exact products before approval.{% endif %}

{% if preview %} {% for item in preview_items %}
{{ item.product_name|default:'Product details needed' }}{{ item.barcode }} · {{ item.package_count }} package{{ item.package_count|pluralize }}
{{ shared_location_name|default:item.location.name }}{% if shared_category %} · {{ shared_category }}{% elif item.category_name %} · {{ item.category_name }}{% endif %}
{% endfor %}
Back to selection
{% else %}
Select staged products{% for item in items %}{% empty %}

No staged products need review.

{% endfor %}
{% endif %}
{% endif %}
{% endblock %}