One modal to rule them all.
This commit is contained in:
@@ -115,28 +115,6 @@
|
||||
(assoc-in db (into location field) value)
|
||||
(update-in db (into location (butlast field)) dissoc (last field)))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::modal-status
|
||||
(fn [db [_ id state]]
|
||||
(println "changing modal status" id "to")
|
||||
(-> db
|
||||
(update-in [:modal-state id] #(merge % state))
|
||||
#_(dissoc :auto-ap.forms/forms)
|
||||
)))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::modal-failed
|
||||
(fn [db [_ id message]]
|
||||
(-> db
|
||||
(assoc-in [:modal-state id :saving?] false)
|
||||
(assoc-in [:modal-state id :error-message] message))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::modal-completed
|
||||
(fn [db [_ id state]]
|
||||
(-> db
|
||||
(update-in [:modal-state] #(dissoc % id))
|
||||
(update :auto-ap.forms/forms dissoc id))))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::set-active-page
|
||||
|
||||
Reference in New Issue
Block a user