highlights filters just a little bit better

This commit is contained in:
Bryce
2024-04-09 14:21:58 -07:00
parent d34059a9a3
commit 8b9e617062
2 changed files with 14 additions and 13 deletions

View File

@@ -58,11 +58,12 @@
[:code {:optional true} [:maybe {:decode/string strip} :string]] [:code {:optional true} [:maybe {:decode/string strip} :string]]
[:name {:optional true} [:maybe {:decode/string strip} :string]] [:name {:optional true} [:maybe {:decode/string strip} :string]]
[:group {:optional true} [:maybe {:decode/string strip} :string]] [:group {:optional true} [:maybe {:decode/string strip} :string]]
[:select {:optional true :default "all"} [:maybe [:select {:optional true :default "all"}
[:maybe
[:enum [:enum
"" "all" "only-mine"]]] ]])) "" "all" "only-mine"]]]]]))
(defn filters [request] (defn filters [request]
[:form {"hx-trigger" "change delay:500ms, keyup changed from:.hot-filter delay:1000ms" [:form {"hx-trigger" "change delay:500ms, keyup changed from:.hot-filter delay:1000ms"
@@ -101,7 +102,7 @@
:options [{:value "" :options [{:value ""
:content "All"} :content "All"}
{:value "only-mine" {:value "only-mine"
:content "Only mine"} ]}))]]) :content "Only mine"}]}))]])
(def default-read '[:db/id (def default-read '[:db/id
:client/name :client/name

View File

@@ -89,14 +89,14 @@
:id "check-number" :id "check-number"
:class "hot-filter" :class "hot-filter"
:value (:check-number (:query-params request)) :value (:check-number (:query-params request))
:placeholder "10001" :placeholder "e.g., 10001"
:size :small})) :size :small}))
(com/field {:label "Invoice #"} (com/field {:label "Invoice #"}
(com/text-input {:name "invoice-number" (com/text-input {:name "invoice-number"
:id "invoice-number" :id "invoice-number"
:class "hot-filter" :class "hot-filter"
:value (:invoice-number (:query-params request)) :value (:invoice-number (:query-params request))
:placeholder "10001" :placeholder "e.g., ABC-456"
:size :small})) :size :small}))
(com/field {:label "Amount"} (com/field {:label "Amount"}