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:
3
app.py
3
app.py
@@ -278,7 +278,8 @@ def dashboard(page=1):
|
|||||||
current_page=page,
|
current_page=page,
|
||||||
total_pages=total_pages,
|
total_pages=total_pages,
|
||||||
total_projects=total_projects,
|
total_projects=total_projects,
|
||||||
per_page=per_page)
|
per_page=per_page,
|
||||||
|
is_admin=is_admin)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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('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('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>
|
<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>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="bg-slate-100 divide-y divide-slate-300">
|
<tbody class="bg-slate-100 divide-y divide-slate-300">
|
||||||
@@ -542,6 +545,13 @@
|
|||||||
{{ r.costs }}
|
{{ r.costs }}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
@@ -610,7 +620,8 @@
|
|||||||
'Matter Gate or Entry Code',
|
'Matter Gate or Entry Code',
|
||||||
'Date Possession Recovered',
|
'Date Possession Recovered',
|
||||||
'Attorney\'s Fees',
|
'Attorney\'s Fees',
|
||||||
'Costs'
|
'Costs',
|
||||||
|
'Last Synced'
|
||||||
],
|
],
|
||||||
selectAll: true,
|
selectAll: true,
|
||||||
visibleColumns: [],
|
visibleColumns: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user