{% extends "layout.html" %} {% block title %}{% endblock %} {% block content %}

🦐 LaksyaShrimp {{ current_product_name }}


Chain History (Total Blocks: {{ full_chain_history | length }})

{% if dashboard_batch_id %} Dashboard → {% endif %}
{% if block_groups %}
{% for group in block_groups %}

{{ group.name }}

{% if group.entries %}
{% for block_data in group.entries %} {% endfor %}
# Block / Stage Unique ID / Batch Mined At Previous Hash Block QR Feedback QR Rating
{{ block_data.block.index if block_data.block.index is not none else loop.index }} {% if block_data.block_sub_label %}Block #{{ block_data.block_sub_label }} - {{ block_data.block.stage }}{% else %}{{ block_data.block.stage }}{% endif %} {% if block_data.packet_labels_url %} Consumer packets ({{ block_data.packet_count }} × {{ block_data.packet_size }} kg) {% endif %} {{ block_data.batch_id or '-' }} {{ block_data.block.timestamp }} {{ block_data.block.prev_hash[:12] }}... {% if block_data.qr_img %} Block QR {% else %} N/A {% endif %} {% if block_data.feedback_qr_img %} Feedback QR {% else %} N/A {% endif %} {% if block_data.avg_rating_text %} {{ block_data.avg_rating_value | round(1) }}/5 {{ block_data.avg_rating_text }} {% else %} No ratings {% endif %}
{% else %}

No entries for this block yet.

{% endif %}
{% endfor %}
{% elif full_chain_history %}

No block groups available.

{% else %}

The blockchain is empty, only the Genesis Block exists.

{% endif %} {% if selected_product_id == 'vannamei_2025' %}

🔗 Full Lineage Traces

Scan a QR below to view the complete supply chain lineage for each batch (Broodstock → Hatchery → Grow-out → Feed)

{% set lineage_defs = [ ('a', 'Lineage A', '1a → 2a(N/A) → 3a → 4a'), ('b', 'Lineage B', '1b → 2b(N/A) → 3b → 4b'), ('c', 'Lineage C', '1c → 2c(N/A) → 3c → 4c'), ('d', 'Lineage D', '1d → 2d(N/A) → 3d → 4d'), ('e', 'Lineage E', '1e → 2e → 3e → 4e'), ] %} {% for lid, title, flow in lineage_defs %} {% endfor %}
{% endif %} {% endblock %}