slightly improved excel import.

This commit is contained in:
Bryce Covert
2019-03-20 22:35:43 -07:00
parent 2727573a96
commit a55e6d890f
3 changed files with 56 additions and 35 deletions

View File

@@ -56,9 +56,11 @@
(re-frame/reg-event-db
::save-error
(fn [db [_ form result]]
(-> db
(assoc-in [::forms form :status] :error)
(assoc-in [::forms form :error] (:message (first result))))))
(assoc-in [::forms form :error] (or (:message (first result))
result)))))
(defn side-bar-form [{:keys [form]} children]
[:div [:a.delete.is-pulled-right {:on-click (dispatch-event [::form-closing form])}] [:div children]])
@@ -67,3 +69,8 @@
(-> db
(assoc-in [::forms id :status] :loading)
(assoc-in [::forms id :error] nil)))
(defn save-succeeded [db id]
(-> db
(assoc-in [::forms id :status] nil)
(assoc-in [::forms id :error] nil)))