Improve Rolodex imports, display, and add repair script

This commit is contained in:
HotSwapp
2025-10-13 15:00:13 -05:00
parent 2e2380552e
commit 84c3dac83a
6 changed files with 344 additions and 18 deletions

View File

@@ -59,7 +59,13 @@
</div>
<div class="col-md-3">
<div class="text-muted small">Email</div>
<div>{{ client.email or '' }}</div>
<div>
{% if client.email %}
<a href="mailto:{{ client.email }}">{{ client.email }}</a>
{% else %}
<span class="text-muted">No email</span>
{% endif %}
</div>
</div>
<div class="col-md-3">
<div class="text-muted small">DOB</div>
@@ -77,7 +83,13 @@
</div>
<div class="col-md-9">
<div class="text-muted small">Memo / Notes</div>
<div>{{ client.memo or '' }}</div>
<div>
{% if client.memo %}
{{ client.memo }}
{% else %}
<span class="text-muted">No notes available</span>
{% endif %}
</div>
</div>
</div>
@@ -171,8 +183,9 @@
</tr>
</thead>
<tbody>
{% if client.cases and client.cases|length > 0 %}
{% for c in client.cases %}
{% set sorted_cases = client.cases | sort(attribute='open_date', reverse=True) %}
{% if sorted_cases and sorted_cases|length > 0 %}
{% for c in sorted_cases %}
{% if status_filter == 'all' or (status_filter == 'open' and (c.status != 'closed')) or (status_filter == 'closed' and c.status == 'closed') %}
<tr>
<td>{{ c.file_no }}</td>
@@ -184,7 +197,7 @@
<span class="badge bg-success">Open</span>
{% endif %}
</td>
<td>{{ c.open_date.strftime('%Y-%m-%d') if c.open_date else '' }}</td>
<td>{{ c.open_date.strftime('%Y-%m-%d') if c.open_date else '' }}</td>
<td class="text-end">
<a class="btn btn-sm btn-outline-primary" href="/case/{{ c.id }}">
<i class="bi bi-folder2-open"></i>
@@ -197,7 +210,7 @@
{% endif %}
{% endfor %}
{% else %}
<tr><td colspan="5" class="text-center text-muted py-3">No related cases.</td></tr>
<tr><td colspan="5" class="text-center text-muted py-3">No related cases linked.</td></tr>
{% endif %}
</tbody>
</table>