patx/projectpay

search by status on index.html

Commit 376f036 · patx · 2026-06-28T16:50:34-04:00

Changeset
376f0363587b3a373f3d7bbd942bcc8bca949499
Parents
51e81c8b1ab4a867613bfbca8d24ed699b39fb63

View source at this commit

Comments

No comments yet.

Log in to comment

Diff

diff --git a/app.py b/app.py
index 40dcaf9..284e362 100644
--- a/app.py
+++ b/app.py
@@ -532,6 +532,7 @@ class InvoiceApp(App):
         if q:
             clauses: List[Dict[str, Any]] = [
                 {"project_number": {"$regex": q, "$options": "i"}},
+                {"status": {"$regex": q, "$options": "i"}},
                 {"customer_name": {"$regex": q, "$options": "i"}},
             ]
             oid = object_id(q)
diff --git a/templates/index.html b/templates/index.html
index 4467967..a4ac465 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -13,7 +13,7 @@
     <div class="sticky-index-search-inner">
       <div class="searchbar">
         <div class="search-field">
-          <input id="project-search" name="q" value="{{ q }}" placeholder="Search project number, id, or customer" autocomplete="off">
+          <input id="project-search" name="q" value="{{ q }}" placeholder="Search project number, status, or customer" autocomplete="off">
           <button class="search-clear" id="clear-search" type="button" aria-label="Clear search" hidden>&times;</button>
         </div>
       </div>