feat(dashboard): add admin-only Last Synced column

Adds a "Last Synced" column visible only to admins, positioned as the
last column. Displays the sync timestamp formatted as YYYY-MM-DD.
Includes the column in the visibility toggle modal.
This commit is contained in:
2026-05-12 23:57:26 -07:00
parent 616ffde402
commit 8dd7ae8c95
2 changed files with 14 additions and 2 deletions

3
app.py
View File

@@ -278,7 +278,8 @@ def dashboard(page=1):
current_page=page,
total_pages=total_pages,
total_projects=total_projects,
per_page=per_page)
per_page=per_page,
is_admin=is_admin)

View File

@@ -167,6 +167,9 @@
<th style="background-color: rgb(89, 121, 142);" class="px-4 py-3 w-32 sticky top-0 z-[40]" :class="{'hidden': !isColumnVisible('Date Possession Recovered')}">Date Possession Recovered</th>
<th style="background-color: rgb(89, 121, 142);" class="px-4 py-3 w-32 sticky top-0 z-[40]" :class="{'hidden': !isColumnVisible('Attorney\'s Fees')}">Attorney's Fees</th>
<th style="background-color: rgb(89, 121, 142);" class="px-4 py-3 w-32 sticky top-0 z-[40]" :class="{'hidden': !isColumnVisible('Costs')}">Costs</th>
{% if is_admin %}
<th style="background-color: rgb(89, 121, 142);" class="px-4 py-3 w-32 sticky top-0 z-[40]" :class="{'hidden': !isColumnVisible('Last Synced')}">Last Synced</th>
{% endif %}
</tr>
</thead>
<tbody class="bg-slate-100 divide-y divide-slate-300">
@@ -542,6 +545,13 @@
{{ r.costs }}
{% endcall %}
</td>
{% if is_admin %}
<td class="px-4 py-3 text-sm" :class="{'hidden': !isColumnVisible('Last Synced')}">
{% call expander() %}
{% if r.last_synced_at %}{{ r.last_synced_at.split('T')[0] }}{% endif %}
{% endcall %}
</td>
{% endif %}
</tr>
{% else %}
<tr>
@@ -610,7 +620,8 @@
'Matter Gate or Entry Code',
'Date Possession Recovered',
'Attorney\'s Fees',
'Costs'
'Costs',
'Last Synced'
],
selectAll: true,
visibleColumns: [],