fixing issues from staging.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
[vincit/venia "0.2.5"]
|
||||
[digest "1.4.10"]
|
||||
[clj-http "3.11.0" :exclusions [org.apache.httpcomponents/httpclient org.apache.httpcomponents/httpcore]]
|
||||
[clj-pdf "2.5.5"]
|
||||
[clj-pdf "2.2.33"]
|
||||
[org.clojure/core.async "1.3.610"]
|
||||
[fogus/ring-edn "0.3.0"]
|
||||
[buddy/buddy-auth "2.2.0"
|
||||
|
||||
@@ -444,12 +444,14 @@
|
||||
(into #{} (map :db/id (d-clients/get-all))))
|
||||
starting (java.util.Date.)]
|
||||
(log/info (count clients-needing-refresh) "Clients need their balance cache refreshed.")
|
||||
(reduce
|
||||
(fn [acc client]
|
||||
(log/info "Computing running balance cache for " (:client/code (d/entity (d/db conn) client)))
|
||||
(assoc acc client (running-balance-for client)))
|
||||
{}
|
||||
clients-needing-refresh)
|
||||
(swap! running-balance-cache
|
||||
merge
|
||||
(reduce
|
||||
(fn [acc client]
|
||||
(log/info "Computing running balance cache for " (:client/code (d/entity (d/db conn) client)))
|
||||
(assoc acc client (running-balance-for client)))
|
||||
{}
|
||||
clients-needing-refresh))
|
||||
(log/info "Done refreshing " (count clients-needing-refresh) " client caches")
|
||||
(reset! last-run-running-balance starting)))
|
||||
|
||||
@@ -459,7 +461,7 @@
|
||||
(lc/with-context {:source "running-balance-cache"}
|
||||
(try
|
||||
(log/info "Refreshing running balance cache")
|
||||
(reset! running-balance-cache (build-running-balance-cache))
|
||||
(build-running-balance-cache)
|
||||
(catch Exception e
|
||||
(log/error e)))))
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
[clojure.set :as set]
|
||||
[auto-ap.effects.forward :as forward]))
|
||||
|
||||
|
||||
(defn dropzone []
|
||||
(let [client (re-frame/subscribe [::subs/client])
|
||||
token (re-frame/subscribe [::subs/token])
|
||||
@@ -31,14 +32,15 @@
|
||||
:component-did-mount (fn [this]
|
||||
(dz. (rdom/dom-node this)
|
||||
(clj->js {:init (fn []
|
||||
(.on (js-this) "addedfiles"
|
||||
(fn []
|
||||
(re-frame/dispatch [::status/completed ::import])))
|
||||
(.on (js-this) "success" (fn [_ files]
|
||||
|
||||
(re-frame/dispatch [::invalidated])))
|
||||
(.on (js-this) "error" (fn [_ error]
|
||||
(re-frame/dispatch [::status/error ::import [(edn/read-string error)]]))))
|
||||
(let [^js/Dropzone t (js-this)]
|
||||
(.on t "addedfiles"
|
||||
(fn []
|
||||
(re-frame/dispatch [::status/completed ::import])))
|
||||
|
||||
(.on t "success" (fn [_ files]
|
||||
(re-frame/dispatch [::invalidated])))
|
||||
(.on t "error" (fn [_ error]
|
||||
(re-frame/dispatch [::status/error ::import [(edn/read-string error)]])))))
|
||||
:paramName "file"
|
||||
:headers {"Authorization" (str "Token " @token)}
|
||||
:url (str "/api/invoices/upload"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
:date-range (:date-range params)
|
||||
:amount-gte (:amount-gte (:amount-range params))
|
||||
:amount-lte (:amount-lte (:amount-range params))
|
||||
:check-number-like (:check-number-like params)
|
||||
:check-number-like (str (:check-number-like params))
|
||||
:invoice-number (:invoice-number params)}
|
||||
[[:payments [:id :status :amount :type :check_number :s3_url
|
||||
[:bank-account [:name]]
|
||||
|
||||
Reference in New Issue
Block a user