fixing issues from staging.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user