{% load i18n %}
{% load humanize %}
{% load price_formats %}

<div id="tab-untracked" class="tab-pane fade card card-default border-0" role="tabpanel" aria-labelledby="tab-untracked">
    <div class="card-body">
        <table class="table table-striped table-hover no-footer w-100" id="dashboard-recent-fatlinks">
            <thead>
                <tr>
                    <th >{% trans "Issuer" %}</th>
                    <th >{% trans "Assignee" %}</th>
                    <th >{% trans "Location" %}</th>
                    <th >{% trans "Date issued" %}</th>
                    <th >{% trans "Time pending" %}</th>
                    <th >{% trans "Status" %}</th>
                    <th >{% trans "Tracking #" %}</th>
                    <th >{% trans "Price" %}</th>
                    <th>{% trans "Notes" %}</th>
                    <th>{% trans "Action" %}</th>
                </tr>
            </thead>

            <tbody>
                {% if BUYBACKPROGRAM_TRACK_PREFILL_CONTRACTS %}
                    {% for contract in untracked_contracts %}
                        {% if contract.status == 'outstanding' %}
                            <tr>
                                <td>{{contract.issuer_name}}</td>
                                <td>{{contract.assignee_name}}</td>
                                <td>{{contract.location_name}}</td>
                                <td>{{contract.date_issued}}</td>
                                <td>{{contract.date_issued|timesince }}</td>
                                <td>{{contract.status}}</td>
                                <td>{{contract.title}}</td>
                                <td>{{contract.price|custom_number_format:2|price}}</td>

                                <td colspan="2">
                                    {% for note in contract.notes %}
                                    <i style="color: {{note.color}};" class="fas {{note.icon}}" title="{{note.message}}"></i>
                                    {% endfor %}
                                </td>


                            </tr>
                        {% endif %}
                    {% endfor %}
                {% endif %}
            </tbody>

            <tfoot>
            </tfoot>
        </table>
    </div>
</div>
<thead>
