You can now print and pay

This commit is contained in:
Bryce Covert
2019-02-21 22:22:36 -08:00
parent 9c6fbaf963
commit 00e2c64317
7 changed files with 197 additions and 60 deletions

View File

@@ -8,10 +8,18 @@
(fn [db [_ x]]
(-> db ::forms x)))
(re-frame/reg-sub
::is-loading?
(fn [db [_ x]]
(if (#{"loading" :loading} (get-in db [::forms x :status]) )
true
false)))
(re-frame/reg-sub
::loading-class
(fn [db [_ x]]
(if (= (get-in db [::forms x :status]) "loading")
(if (#{"loading" :loading} (get-in db [::forms x :status]) )
"is-loading"
"")))
@@ -54,3 +62,8 @@
(defn side-bar-form [{:keys [form]} children]
[:div [:a.delete.is-pulled-right {:on-click (dispatch-event [::form-closing form])}] [:div children]])
(defn loading [db id]
(-> db
(assoc-in [::forms id :status] :loading)
(assoc-in [::forms id :error] nil)))