Commit 041266fe authored by Pierre Dittgen's avatar Pierre Dittgen

Group errors by line

parent 2f2089f4
......@@ -51,14 +51,20 @@
<div>
<h3>Erreurs de valeurs</h3>
{% set line = {'no': 0} %}
{% for err in report['tables'][0]['errors'] %}
{% if err.context == 'body' %}
{% if line.no != err['row-number'] %}
{% if line.update({'no': err['row-number']}) %}{% endif %}
<h4>Ligne {{ line.no - 1}}</h4>
{% endif %}
<div class="table-responsive-sm">
<table class="table-sm table-bordered table-striped table-hover">
<thead>
<th scope="col">#</th>
<table class="table-sm table-bordered">
<thead class="thead-light">
{% for h in report['tables'][0]['headers'] %}
<th scope="col">{{ h }}</th>
{% endfor %}
......@@ -66,7 +72,6 @@
<!-- TODO: regrouper les erreurs par ligne ? -->
<tbody>
<tr>
<th scope="row">{{ err['row-number'] - 1 }}</th>
{% for d in source_data.data_rows[err['row-number'] - 2] %}
{% if loop.index == err['column-number'] %}
<td class="table-danger">{{ d }}</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment