From 8b9e6170627881fe446e5fa5843af30fa10afcd7 Mon Sep 17 00:00:00 2001 From: Bryce Date: Tue, 9 Apr 2024 14:21:58 -0700 Subject: [PATCH] highlights filters just a little bit better --- src/clj/auto_ap/ssr/admin/clients.clj | 23 ++++++++++++----------- src/clj/auto_ap/ssr/invoices.clj | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/clj/auto_ap/ssr/admin/clients.clj b/src/clj/auto_ap/ssr/admin/clients.clj index 5db650fc..1ff2b337 100644 --- a/src/clj/auto_ap/ssr/admin/clients.clj +++ b/src/clj/auto_ap/ssr/admin/clients.clj @@ -51,18 +51,19 @@ ;; TOOD check pinecone (def query-schema (mc/schema - [:maybe [:map + [:maybe [:map [:sort {:optional true} [:maybe [:any]]] [:per-page {:optional true :default 25} [:maybe :int]] [:start {:optional true :default 0} [:maybe :int]] [:code {:optional true} [:maybe {:decode/string strip} :string]] [:name {: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 + "" "all" "only-mine"]]]]])) + - - [:enum - "" "all" "only-mine"]]] ]])) (defn filters [request] [:form {"hx-trigger" "change delay:500ms, keyup changed from:.hot-filter delay:1000ms" @@ -96,12 +97,12 @@ :size :small})) (com/field {:label "Select"} (com/radio-card {:size :small - :name "select" - :value (:select (:query-params request)) - :options [{:value "" - :content "All"} - {:value "only-mine" - :content "Only mine"} ]}))]]) + :name "select" + :value (:select (:query-params request)) + :options [{:value "" + :content "All"} + {:value "only-mine" + :content "Only mine"}]}))]]) (def default-read '[:db/id :client/name diff --git a/src/clj/auto_ap/ssr/invoices.clj b/src/clj/auto_ap/ssr/invoices.clj index edd09cbd..1f87c5fd 100644 --- a/src/clj/auto_ap/ssr/invoices.clj +++ b/src/clj/auto_ap/ssr/invoices.clj @@ -89,14 +89,14 @@ :id "check-number" :class "hot-filter" :value (:check-number (:query-params request)) - :placeholder "10001" + :placeholder "e.g., 10001" :size :small})) (com/field {:label "Invoice #"} (com/text-input {:name "invoice-number" :id "invoice-number" :class "hot-filter" :value (:invoice-number (:query-params request)) - :placeholder "10001" + :placeholder "e.g., ABC-456" :size :small})) (com/field {:label "Amount"}