enormous refactor but simplified much!
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
[re-frame.core :as re-frame]
|
||||
[reagent.core :as reagent]
|
||||
[vimsical.re-frame.fx.track :as track]
|
||||
[auto-ap.status :as status]))
|
||||
[auto-ap.status :as status]
|
||||
[clojure.string :as str]))
|
||||
|
||||
|
||||
|
||||
@@ -134,12 +135,21 @@
|
||||
{:id ::manual-import
|
||||
:events #{::manual/import-completed}
|
||||
:event-fn (fn [[_ {:keys [imported errors] :as result}]]
|
||||
[::status/info ::manual-import (str "Successfully imported " imported " transactions"
|
||||
|
||||
(when (seq errors)
|
||||
(str
|
||||
", " (count errors) " errors. "
|
||||
"Example: '" (str (:info (first (:errors (first errors))))) "'")))])}]}))
|
||||
(println result)
|
||||
[::status/info ::manual-import
|
||||
(str "Successfully "
|
||||
(str/join ", "
|
||||
[(when-let [imported (:import-batch/imported result)]
|
||||
(str "imported " imported))
|
||||
(when-let [extant (:import-batch/extant result)]
|
||||
(str "extant " extant))
|
||||
(when-let [suppressed (:import-batch/suppressed result)]
|
||||
(str "suppressed " suppressed))
|
||||
(when-let [error (:validation-error result)]
|
||||
(str "errored " error))])
|
||||
" transactions."
|
||||
(when (:sample-error result)
|
||||
(str " Sample error: " (:info (:sample-error result)))))])}]}))
|
||||
|
||||
|
||||
(defn content []
|
||||
|
||||
Reference in New Issue
Block a user