Browse Source

only show expiring accounts if any exist

Karl Hudgell 4 months ago
parent
commit
f97e04df55
1 changed files with 11 additions and 7 deletions
  1. 11 7
      templates/home.html

+ 11 - 7
templates/home.html

@@ -30,12 +30,14 @@
         </div>
     </nav>
 
-    <!-- Main Content -->
-    <div class="container mt-5">
-        <h1>Welcome {{ username }}!</h1>
-        <br>
-        <h2>You have {{accounts|length}} active accounts</h2>
-        <br>
+<!-- Main Content -->
+<div class="container mt-5">
+    <h1>Welcome {{ username }}!</h1>
+    <br>
+    <h2>You have {{ accounts|length }} active accounts</h2>
+    <br>
+    
+    {% if current_month_accounts %}
         <h3>Accounts Expiring This Month</h3>
         <table class="table table-bordered table-striped">
             <thead class="thead-dark">
@@ -55,7 +57,9 @@
                 {% endfor %}
             </tbody>
         </table>
-    </div>
+    {% endif %}
+</div>
+
 
     <footer class="bg-dark text-white text-center py-3 mt-5">
         <p>&copy; 2024 KTV Manager | All rights reserved</p>