{% extends "base.html" %} {% load humanize %} {% block title %}{{ page_title }}{% endblock %} {% block content %} {% comment %} /erp/imports/crm// (phase5-importer.md 4.6, 4.9): one card per object type in step order. Coverage sits beside the state, never folded into it. {% endcomment %}

{{ job.source }}

{{ job.get_status_display }} · coverage {{ job.coverage }}{% if uncovered %} ({% for c in uncovered %}{{ c.plural|lower }} {{ c.coverage.coverage }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %} · created {{ job.created_at|date:"Y-m-d H:i" }}{% if job.created_by %} by {{ job.created_by.get_username }}{% endif %}

{% if job.previous_job_id %}

Re-imports over the previous job.

{% endif %}
Report All CRM imports {% if can_apply and can_undo_job %}
{% csrf_token %}
{% endif %} {% if can_apply and can_cancel %}
{% csrf_token %}
{% endif %}
{% if not can_apply %}

You can look at this import. Deciding rows, applying, retrying and undoing need the “Can apply and undo CRM imports” permission.

{% endif %} {% if applied_all and merge_hints %}
Applied. {{ merge_hints|intcomma }} imported {% if merge_hints == 1 %}record looks{% else %}records look{% endif %} like duplicates of each other: review them in the merge queue.
{% elif applied_all %}
Applied. Every row of this job is decided and written.
{% endif %}

Applying

{% for run in runs %}

Applying {{ run.object_type }}: chunk {{ run.chunk }} of {{ run.chunks }} ({{ run.done|intcomma }} of {{ run.total|intcomma }} rows)

{% endfor %}

Steps

Apply in step order: a step can start once every step it needs has no approved row left unapplied. Undo runs newest step first.

{% for c in cards %}

{{ c.step }}. {{ c.plural }}

{% if c.coverage.exact %}coverage complete{% else %}coverage {{ c.coverage.coverage }}{% endif %}
{% if not c.total %} {% if c.coverage.exact %}

The source has no {{ c.plural|lower }}.

{% else %}
{{ c.plural }}: coverage {{ c.coverage.coverage }} — the export could not read {% if c.coverage.coverage == "unknown" %}them{% else %}all of them{% endif %}{% if c.coverage.reason_text %} ({{ c.coverage.reason_text }}){% endif %}. 0 rows here does not mean the source has none.
{% endif %} {% else %}

{% if not c.coverage.exact %}≥ {% endif %}{{ c.total|intcomma }} rows · {{ c.decided_percent }}% decided

    {% for key, label, n, pct in c.bar %}
  • {{ label }} {{ n|intcomma }}
  • {% endfor %}
{% if not c.coverage.exact %}

Coverage {{ c.coverage.coverage }}{% if c.coverage.reason_text %}: {{ c.coverage.reason_text }}{% endif %}. Every count here is “at least”.

{% endif %} {% if c.gate %}

Waits for {{ c.gate|join:", " }} to be applied.

{% endif %}
{% if c.proposed %} Review {{ c.proposed|intcomma }} {% else %} Rows {% endif %} {% if can_apply %} {% if c.approved and not c.gate %}
{% csrf_token %}
{% endif %} {% if c.failed %}
{% csrf_token %}
{% endif %} {% if c.applied %}
{% csrf_token %}
{% if c.undo_first %}

Undo {{ c.undo_first|join:", " }} first.

{% endif %} {% endif %} {% endif %}
{% if c.too_big %}

More than {{ web_run_limit|intcomma }} rows: run manage.py crm_import run --job {{ job.pk }} --through {{ c.object_type }} on the server.

{% endif %} {% endif %}
{% endfor %}
{% endblock %} {% block javascripts %} {% endblock %}