Merge branch 'staging'

This commit is contained in:
2024-04-15 18:36:08 -07:00
47 changed files with 663 additions and 415 deletions

View File

@@ -5,6 +5,7 @@
pull-many query2]]
[auto-ap.graphql.utils :refer [extract-client-ids]]
[auto-ap.logging :as alog]
[auto-ap.query-params :refer [wrap-copy-qp-pqp]]
[auto-ap.routes.admin.clients :as route]
[auto-ap.routes.indicators :as indicators]
[auto-ap.routes.queries :as q]
@@ -27,7 +28,7 @@
:refer [apply-middleware-to-all-handlers entity-id
form-validation-error html-response main-transformer
many-entity modal-response ref->enum-schema strip temp-id
wrap-entity wrap-schema-enforce]]
wrap-entity wrap-schema-enforce wrap-merge-prior-hx]]
[auto-ap.time :as atime]
[bidi.bidi :as bidi]
[cheshire.core :as cheshire]
@@ -77,7 +78,7 @@
(com/text-input {:name "name"
:id "name"
:class "hot-filter"
:value (:name (:parsed-query-params request))
:value (:name (:query-params request))
:placeholder "Best Restaurant LLC"
:size :small}))
@@ -85,14 +86,14 @@
(com/text-input {:name "code"
:id "code"
:class "hot-filter"
:value (:code (:parsed-query-params request))
:value (:code (:query-params request))
:placeholder "BRLC"
:size :small}))
(com/field {:label "Group"}
(com/text-input {:name "group"
:id "group"
:class "hot-filter"
:value (:group (:parsed-query-params request))
:value (:group (:query-params request))
:placeholder "NTG"
:size :small}))
(com/field {:label "Select"}
@@ -150,7 +151,7 @@
:client/location-matches [:location-match/matches :location-match/location :db/id]}])
(defn fetch-ids [db request]
(let [query-params (:parsed-query-params request)
(let [query-params (:query-params request)
valid-clients (extract-client-ids #_(:clients request)
(map first (dc/q '[:find ?c :where [?c :client/code]] (dc/db conn)))
(:client-id query-params)
@@ -1842,8 +1843,8 @@
(def key->handler
(apply-middleware-to-all-handlers
{::route/page (helper/page-route grid-page)
::route/table (helper/table-route grid-page)
{::route/page (helper/page-route grid-page :parse-query-params? false)
::route/table (helper/table-route grid-page :parse-query-params? false)
::route/new-location (add-new-primitive-handler [:step-params :client/locations]
""
location-row)
@@ -1904,7 +1905,10 @@
(mm/wrap-wizard client-wizard))}
(fn [h]
(-> h
(wrap-copy-qp-pqp)
(wrap-apply-sort grid-page)
(wrap-merge-prior-hx)
(wrap-schema-enforce :query-schema query-schema)
(wrap-schema-enforce :hx-schema query-schema)
(wrap-admin)
(wrap-client-redirect-unauthenticated)))))

View File

@@ -243,7 +243,7 @@
(base-page
request
(com/page {:nav com/admin-aside-nav
:client-selection (:client-selection (:session request))
:client-selection (:client-selection request)
:clients (:clients request)
:client (:client request)
:identity (:identity request)

View File

@@ -166,8 +166,9 @@
(some-> route-params (get :entity-id) Long/parseLong))]
(base-page request
(com/page {:nav com/admin-aside-nav
:client-selection (:client-selection (:session request))
:client-selection (:client-selection request)
:client (:client request)
:clients (:clients request)
:identity (:identity request)
:request request
:app-params {:hx-get (bidi/path-for ssr-routes/only-routes