06/01 Optimize codes
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
{% set has_filter = search or category_id or account_id or date_from or date_to %}
|
||||
<div class="pcard p-0">
|
||||
{% if transactions %}
|
||||
<table class="pfm-table">
|
||||
@@ -120,10 +121,22 @@
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<div class="text-center py-5">
|
||||
<i class="bi bi-inbox text-muted" style="font-size:2.5rem;"></i>
|
||||
<p class="text-muted mt-2 mb-3">No {{ tab }} transactions found.</p>
|
||||
<a href="{{ url_for('transactions.new', type=tab) }}" class="btn btn-sm btn-primary">Add {{ tab | title }}</a>
|
||||
<div class="text-center py-5 px-3">
|
||||
{% if has_filter %}
|
||||
<i class="bi bi-funnel text-muted" style="font-size:2.5rem;opacity:.4;"></i>
|
||||
<p class="fw-semibold mt-3 mb-1">No matching transactions</p>
|
||||
<p class="text-muted small mb-3">Try adjusting your filters or search term.</p>
|
||||
<a href="{{ url_for('transactions.index', tab=tab) }}" class="btn btn-sm btn-outline-secondary">
|
||||
<i class="bi bi-x-lg me-1"></i>Clear filters
|
||||
</a>
|
||||
{% else %}
|
||||
<i class="bi bi-arrow-left-right text-muted" style="font-size:2.5rem;opacity:.4;"></i>
|
||||
<p class="fw-semibold mt-3 mb-1">No {{ tab }} transactions yet</p>
|
||||
<p class="text-muted small mb-3">Record your first {{ tab }} to start tracking.</p>
|
||||
<a href="{{ url_for('transactions.new', type=tab) }}" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-plus-lg me-1"></i>Add {{ tab | title }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user