{% extends "base.html" %}
{% block title %}Plaid Update Result - BiweeklyBudget{% endblock %}
{% block body %}
{% include 'notifications.html' %}
            <div class="row" id="content-row">
                <div class="col-lg-12">
                    <div class="panel panel-default" id="panel-plaid-accounts">
                        <div class="panel-heading">Plaid Update Result</div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover table-striped" id="table-accounts-plaid">
                                    <thead>
                                        <tr>
                                            <th>Item</th>
                                            <th>Updated</th>
                                            <th>Added</th>
                                            <th>Exception?</th>
                                            <th>Statement IDs</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    {% for pur in results %}
                                        <tr>
                                            <td>{{ pur.item.institution_name }} ({{ pur.item.item_id }})</a></td>
                                            <td>{{ pur.updated }}</td>
                                            <td>{{ pur.added}} </td>
                                            <td>{{ pur.exc }}</td>
                                            <td>{{ pur.stmt_id }}</td>
                                        </tr>
                                    {% endfor %}
                                        <tr>
                                            <td><strong>Total</strong></td>
                                            <td>{{ num_updated }}</td>
                                            <td>{{ num_added}} </td>
                                            {% if num_failed > 0 %}
                                            <td><strong>{{ num_failed }} Failed</strong></td>
                                            {% else %}
                                            <td>&nbsp;</td>
                                            {% endif %}
                                            <td>&nbsp</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
{% include 'modal.html' %}
{% endblock %}
{% block extra_foot_script %}
{% endblock %}
