starting work on cash flow.
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
[cljs-time.format :as format]
|
||||
[goog.i18n.NumberFormat.Format]
|
||||
[cljs-time.core :as t]
|
||||
[clojure.string :as str])
|
||||
[clojure.string :as str]
|
||||
[goog.crypt.base64 :as base64])
|
||||
(:import
|
||||
(goog.i18n NumberFormat)
|
||||
(goog.i18n.NumberFormat Format)))
|
||||
@@ -327,8 +328,13 @@
|
||||
:before (fn [context]
|
||||
(-> context
|
||||
(assoc-in [:coeffects :is-admin?] (= "admin"
|
||||
(:user/role
|
||||
(get-in context [:coeffects :db :user]))))))))
|
||||
(-> (get-in context [:coeffects :db :user])
|
||||
(str/split #"\.")
|
||||
second
|
||||
(base64/decodeString )
|
||||
(#(.parse js/JSON % ))
|
||||
(js->clj :keywordize-keys true)
|
||||
:user/role)))))))
|
||||
|
||||
(defn query-params []
|
||||
(reduce-kv
|
||||
|
||||
Reference in New Issue
Block a user