(cloud) Made search work consistently

This commit is contained in:
2023-05-04 21:02:03 -07:00
parent e42fe2189c
commit 4e7e19da97
12 changed files with 308 additions and 186 deletions

View File

@@ -43,6 +43,10 @@
(= "transaction" m)
"type:transaction"
(= "journal-entry" m)
"type:journal-entry"
:else
(str "_text_:\"" (try-parse-number (try-cleanse-date m)) ""\"))))))))
@@ -69,7 +73,13 @@
[:div.card-header-icon.icon-accounting-invoice-mail]
(= "payment" (:type doc))
[:div.card-header-icon.icon-check-payment-sign])
[:div.card-header-icon.icon-check-payment-sign]
(= "journal-entry" (:type doc))
[:div.card-header-icon.icon-receipt]
:else
nil)
[:div.card-header-title (clojure.string/capitalize (:type doc))
" "
" "
@@ -86,6 +96,10 @@
(:type doc))
"transactions"
(= "journal-entry"
(:type doc))
"ledger"
:else
"payments") "/?exact-match-id=" (:id doc))
:target "_blank"}]
@@ -121,6 +135,7 @@
:hx-indicator "#search"
:value (:q (:params request))
:autofocus true}]]
[:i "Try dates, numbers, vendors. To filter to specific entity type, use 'invoice', 'transaction', 'journal-entry', 'payment'."]
[:style
".htmx-request #search-results {display: none} .htmx-request .htmx-indicator { display: block !important; }"]
[:div#search-results