cleans up grids

This commit is contained in:
2024-11-18 19:41:54 -08:00
parent ad06418a69
commit a8c7c7eb8e
31 changed files with 842 additions and 714 deletions

View File

@@ -668,10 +668,7 @@
(with-precision 2
(double (.setScale (bigdec d) 2 java.math.RoundingMode/HALF_UP))))
(defn or-0 [x]
(if (nil? x)
0.0
x))
(defn wrap-implied-route-param [handler & {:as route-params}]
(fn [request]
@@ -701,4 +698,11 @@
(= "A" location))
(throw (ex-info "Exception." {:type "'A' not allowed"})))
true))
true))
(def default-grid-fields-schema
[
[:sort {:optional true} [:maybe [:any]]]
[:per-page {:optional true :default 25} [:maybe :int]]
[:start {:optional true :default 0} [:maybe :int]]
[:exact-match-id {:optional true} [:maybe entity-id]]])