{% extends "indy_hub/base.html" %} {% load i18n %} {% load static %} {% load humanize %} {% block page_title %}{% trans "My Copy Requests" %}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
{# Metric tiles #}

{% trans "Waiting for Builders" %}

{{ metrics.open|default:0 }}

{% trans "Requests with no confirmed provider yet." %}

{% trans "Your Action" %}

{{ metrics.action_required|default:0 }}

{% trans "Conditional proposals or agreements waiting on you." %}

{% trans "In Delivery" %}

{{ metrics.awaiting_delivery|default:0 }}

{% trans "Accepted requests now moving toward completion." %}

{% trans "Completed" %}

{{ metrics.delivered|default:0 }}

{% trans "Delivered blueprint copy requests." %}
{# Tabs #}
{# ── Active tab ──────────────────────────────────────────────── #}
{% if my_requests %}
{% for req in my_requests %}
{# Header strip #}
{{ req.type_name }}

{{ req.type_name }}

ME {{ req.material_efficiency }} TE {{ req.time_efficiency }} {{ req.copies_requested }} {% trans "copies" %} · {{ req.runs_requested }} {% trans "runs" %} {{ req.status_label }}
{% trans "Opened" %} {{ req.created_at|naturaltime }}
{% trans "Threads" %} {{ req.chat_actions|length }}
{% trans "Stage" %} {{ req.status_hint }}
{# Body: thread col | panel col #}
{# Thread list column (left) #}
{% if req.chat_actions %} {% with req_id=req.id|stringformat:"s" first_chat=req.chat_actions.0.chat %} {% with chat_shell_id="bpChatInline-"|add:req_id chat_input_id="bpChatInput-"|add:req_id %}
{% trans "Conversation auto-refreshes every 10 seconds." %}
{% trans "Current proposal" %}
ISK
{% endwith %} {% endwith %} {% else %}

{% trans "No builder thread yet" %}

{% trans "When a provider makes a conditional offer or confirms your request, the negotiation thread will appear here." %}

{% endif %}
{# Panel column (right) #}
{# Actions #}

{% trans "Request" %}

{% trans "Status and actions" %}

{{ req.status_hint }}

{% if req.accepted_offer %}
{% trans "Accepted builder" %} {% blocktrans with owner=req.accepted_offer.owner_username %}{{ owner }} is currently assigned to this request. Use the conversation panel to finalise the agreement and delivery details.{% endblocktrans %}
{% endif %} {% if req.chat_actions %} {% with first_chat=req.chat_actions.0.chat %} {% if first_chat.decision_url %}
{% if req.cond_waiting_buyer %} {% trans "Builder proposed an amount. Review the active conversation and confirm the agreement if it works for you." %} {% elif req.cond_waiting_builder %} {% trans "You already responded in chat. Waiting for the builder to confirm from the same conversation." %} {% elif req.cond_offers %} {% blocktrans count count=req.cond_offers|length %}Use the conversation panel below to review the open negotiation and answer it.{% plural %}Use the conversation panel below to review the {{ count }} open negotiations and answer them.{% endblocktrans %} {% endif %}
{% endif %} {% endwith %} {% endif %}
{% if req.chat_actions %} {% with first_chat=req.chat_actions.0.chat %} {% if first_chat.decision_url %}
{% csrf_token %}
{% csrf_token %}
{% endif %} {% endwith %} {% endif %} {% if req.can_cancel %}
{% csrf_token %}
{% endif %}
{# Overview snapshot #}

{% trans "Snapshot" %}

{% trans "Request overview" %}

{% trans "Live" %}
{% trans "Requested" %} {{ req.created_at|date:"Y-m-d H:i" }}
{% trans "Copies" %} {{ req.copies_requested }}
{% trans "Runs / copy" %} {{ req.runs_requested }}
{% trans "Negotiations" %} {{ req.chat_actions|length }}
{# Offer state #}

{% trans "Offer state" %}

{% trans "Status" %} {{ req.status_label }}
{% trans "Builder" %} {% if req.accepted_offer %}{{ req.accepted_offer.owner_username }}{% else %}{% trans "None yet" %}{% endif %}
{% trans "Pending offers" %} {{ req.cond_offers|length }}
{% trans "Delivery" %} {% if req.delivered %}{% trans "Completed" %}{% elif req.status_key == 'awaiting_delivery' %}{% trans "In progress" %}{% else %}{% trans "Not started" %}{% endif %}
{% endfor %}
{% else %}

{% trans "No active requests" %}

{% trans "Create a new copy request to get started." %}

{% endif %}
{# ── History tab ─────────────────────────────────────────────── #}
{% if history_requests %}
{% for req in history_requests %}
{# Header strip #}
{{ req.type_name }}

{{ req.type_name }}

ME {{ req.material_efficiency }} TE {{ req.time_efficiency }} {{ req.copies_requested }} {% trans "copies" %} · {{ req.runs_requested }} {% trans "runs" %} {{ req.status_label }}
{% trans "Closed" %} {{ req.closed_at|naturaltime }}
{% trans "Copies" %} {{ req.copies_requested }}
{% trans "Runs / copy" %} {{ req.runs_requested }}
{# Body #}
{% trans "Closed at" %} {{ req.closed_at|date:"Y-m-d H:i" }}
{% trans "Delivered package" %} {{ req.copies_requested }} {% trans "copies" %} · {{ req.runs_requested }} {% trans "runs / copy" %}
{% trans "Completion note" %} {{ req.status_hint }}

{% trans "Reference" %}

{% trans "Delivered request" %}

{% trans "Archive" %}
{% trans "Type" %} {{ req.type_name }}
{% trans "ME / TE" %} ME {{ req.material_efficiency }} · TE {{ req.time_efficiency }}
{% trans "Copies" %} {{ req.copies_requested }}
{% trans "Runs" %} {{ req.runs_requested }}
{% trans "Closed" %} {{ req.closed_at|date:"Y-m-d H:i" }}
{% endfor %}
{% else %}

{% trans "No history" %}

{% trans "Completed requests will appear here once deliveries close." %}

{% endif %}
{% endblock %} {% block extra_javascript %} {{ block.super }} {% endblock %}