Adds manager type, blocks certain permissions
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
%))
|
||||
(assoc :vendor-id (:id (:vendor data)))
|
||||
(assoc :yodlee-merchant-id (:id (:yodlee-merchant data)))
|
||||
(update :description (fn [d] (when d (str/replace d #"\\" "\\\\"))))
|
||||
(update :accounts (fn [as]
|
||||
(map #(-> %
|
||||
(update :id (fn [i] (if (some-> i (str/starts-with? "new-"))
|
||||
@@ -99,6 +100,7 @@
|
||||
:dom-lte
|
||||
:dom-gte
|
||||
:note])
|
||||
(update :description (fn [d] (when d (str/replace d #"\\" "\\\\"))))
|
||||
(assoc :yodlee-merchant-id (:id (:yodlee-merchant data)))
|
||||
(assoc :client-id (:id (:client data)))
|
||||
(assoc :bank-account-id (:id (:bank-account data))))}
|
||||
|
||||
@@ -149,10 +149,11 @@
|
||||
:subscription editing}
|
||||
[:option {:value ":none"} "None"]
|
||||
[:option {:value ":user"} "User"]
|
||||
[:option {:value ":manager"} "Manager"]
|
||||
[:option {:value ":admin"} "Admin"]]]]]]
|
||||
|
||||
|
||||
(when (= ":user" (:role (:user editing)))
|
||||
(when (#{":user" ":manager"} (:role (:user editing)))
|
||||
[horizontal-field
|
||||
[:label.label "Clients"]
|
||||
[:div.control
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
(re-frame/reg-event-db
|
||||
::save-error
|
||||
(fn [db [_ vendor]]
|
||||
(println "ERROR?")
|
||||
(-> db
|
||||
(assoc-in [:admin :vendor :error] true)
|
||||
(assoc-in [:admin :vendor :saving?] false))))
|
||||
@@ -78,7 +77,6 @@
|
||||
(re-frame/reg-event-db
|
||||
::change
|
||||
(fn [db [_ path value]]
|
||||
(println path value)
|
||||
(assoc-in db (concat [:admin :vendor] path)
|
||||
value)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user