investigate progress.
This commit is contained in:
@@ -407,6 +407,7 @@
|
||||
{:report/name name
|
||||
:report/url url }))
|
||||
|
||||
;; TODO PRINT WARNING
|
||||
(defn export [request]
|
||||
(modal-response
|
||||
(com/modal {}
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
(when (:client-code request)
|
||||
[:client/code (:client-code request)]))
|
||||
args query-params
|
||||
#_#__ (clojure.pprint/pprint query-params)
|
||||
query
|
||||
(if (:exact-match-id args)
|
||||
{:query {:find '[?e]
|
||||
@@ -384,7 +383,7 @@
|
||||
[:amount-gte {:optional true} [:maybe :double]]
|
||||
[:amount-lte {:optional true} [:maybe :double]]
|
||||
[:client-id {:optional true} [:maybe entity-id]]
|
||||
[:numeric-code {:optional true :decode/string clojure.edn/read-string}
|
||||
[:numeric-code {:optional true :decode/string clojure.edn/read-string }
|
||||
[:maybe [:vector [:map [:from nat-int?]
|
||||
[:to nat-int?]]] ]]
|
||||
[:numeric-code-gte {:optional true} [:maybe nat-int?]]
|
||||
|
||||
@@ -5,33 +5,51 @@
|
||||
[auto-ap.routes.utils :refer [wrap-client-redirect-unauthenticated]]
|
||||
[auto-ap.ssr.components :as com]
|
||||
[auto-ap.ssr.grid-page-helper :refer [table*]]
|
||||
[auto-ap.ssr.hx :as hx]
|
||||
[auto-ap.ssr.ledger.common :refer [grid-page query-schema]]
|
||||
[auto-ap.ssr.utils :refer [apply-middleware-to-all-handlers
|
||||
modal-response wrap-merge-prior-hx
|
||||
wrap-schema-enforce]]))
|
||||
html-response modal-response
|
||||
wrap-merge-prior-hx wrap-schema-enforce]]))
|
||||
|
||||
(def altered-grid-page
|
||||
(assoc grid-page
|
||||
:id "yoho"
|
||||
:raw? true
|
||||
:check-boxes? false
|
||||
:route ::route/investigate-results))
|
||||
|
||||
(defn investigate-results [request]
|
||||
(html-response
|
||||
(table*
|
||||
altered-grid-page
|
||||
identity
|
||||
(assoc-in request [:query-params :sort] [{:sort-key "date" :asc? false}]))))
|
||||
|
||||
(defn investigate [request]
|
||||
(modal-response
|
||||
(com/modal {:class "h-[600px]"}
|
||||
(com/modal-card {}
|
||||
(com/modal {:class "max-h-[600px]"}
|
||||
(com/modal-card {:hx-vals (hx/json (update (:query-params request)
|
||||
:numeric-code pr-str))
|
||||
}
|
||||
[:div "Ledger entries"]
|
||||
[:div
|
||||
(table*
|
||||
grid-page
|
||||
identity
|
||||
request)]
|
||||
(table*
|
||||
altered-grid-page
|
||||
identity
|
||||
(assoc-in request [:query-params :sort] [{:sort-key "date" :asc? false}]))
|
||||
nil)
|
||||
)))
|
||||
|
||||
(def key->handler
|
||||
(apply-middleware-to-all-handlers
|
||||
(->
|
||||
{::route/investigate investigate }
|
||||
{::route/investigate investigate
|
||||
::route/investigate-results investigate-results}
|
||||
)
|
||||
(fn [h]
|
||||
(-> h
|
||||
(wrap-copy-qp-pqp)
|
||||
(wrap-merge-prior-hx)
|
||||
(wrap-schema-enforce :query-schema query-schema)
|
||||
(wrap-schema-enforce :hx-schema query-schema)
|
||||
(wrap-must {:activity :read :subject :ledger})
|
||||
(wrap-client-redirect-unauthenticated)))))
|
||||
(wrap-client-redirect-unauthenticated)))))
|
||||
|
||||
Reference in New Issue
Block a user