opened yodlee up.
This commit is contained in:
2
.clj-kondo/metosin/malli/config.edn
Normal file
2
.clj-kondo/metosin/malli/config.edn
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
{:lint-as {malli.experimental/defn schema.core/defn}
|
||||||
|
:linters {:unresolved-symbol {:exclude [(malli.core/=>)]}}}
|
||||||
2
resources/sass/bulma.scss
vendored
2
resources/sass/bulma.scss
vendored
@@ -1,4 +1,4 @@
|
|||||||
@charset "utf-8";
|
@/charset "utf-8";
|
||||||
/* latin */
|
/* latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Calibri';
|
font-family: 'Calibri';
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
(ns auto-ap.graphql.yodlee2
|
(ns auto-ap.graphql.yodlee2
|
||||||
(:require [auto-ap.graphql.utils :refer [->graphql <-graphql assert-can-see-client assert-admin enum->keyword]]
|
(:require
|
||||||
[auto-ap.datomic.yodlee2 :as d-yodlee2]
|
[auto-ap.datomic.yodlee2 :as d-yodlee2]
|
||||||
[auto-ap.time :refer [parse iso-date]]
|
[auto-ap.graphql.utils :refer [->graphql <-graphql assert-admin]]))
|
||||||
[auto-ap.utils :refer [dollars=]]
|
|
||||||
[datomic.api :as d]
|
|
||||||
[auto-ap.datomic :refer [uri remove-nils audit-transact conn]]
|
|
||||||
[clj-time.coerce :as coerce]
|
|
||||||
[clj-time.core :as time]
|
|
||||||
[clojure.set :as set]
|
|
||||||
[clojure.tools.logging :as log]))
|
|
||||||
|
|
||||||
(defn get-yodlee-provider-account-page [context args value]
|
(defn get-yodlee-provider-account-page [context args value]
|
||||||
(assert-admin (:id context))
|
|
||||||
(let [args (assoc args :id (:id context))
|
(let [args (assoc args :id (:id context))
|
||||||
[yodlee-provider-accounts cnt] (d-yodlee2/get-graphql (<-graphql (assoc args :id (:id context))))]
|
[yodlee-provider-accounts cnt] (d-yodlee2/get-graphql (<-graphql (assoc args :id (:id context))))]
|
||||||
{:yodlee_provider_accounts (map ->graphql yodlee-provider-accounts)
|
{:yodlee_provider_accounts (map ->graphql yodlee-provider-accounts)
|
||||||
@@ -21,9 +13,9 @@
|
|||||||
:end (+ (:start args 0) (count yodlee-provider-accounts))}))
|
:end (+ (:start args 0) (count yodlee-provider-accounts))}))
|
||||||
|
|
||||||
(defn get-all-yodlee-provider-accounts [context args value]
|
(defn get-all-yodlee-provider-accounts [context args value]
|
||||||
(assert-admin (:id context))
|
(let [args (assoc args :id (:id context))]
|
||||||
(map
|
(map
|
||||||
->graphql
|
->graphql
|
||||||
(first (d-yodlee2/get-graphql (assoc (<-graphql args)
|
(first (d-yodlee2/get-graphql (assoc (<-graphql args)
|
||||||
:count Integer/MAX_VALUE)))))
|
:count Integer/MAX_VALUE))))))
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
:headers {"Content-Type" "application/json"}
|
:headers {"Content-Type" "application/json"}
|
||||||
:body "{}"})
|
:body "{}"})
|
||||||
(POST "/event" request
|
(POST "/event" request
|
||||||
|
;; {"id" "bf3dcf5c-a68f-42d9-9084-049133e03d3d", "parent_type" "Caterer", "parent_id" "91541331-d7ae-4634-9e8b-ccbbcfb2ce70", "entity_type" "Order", "entity_id" "9ab05fee-a9c5-483b-a7f2-14debde4b7a8", "key" "accepted", "occurred_at" "2022-07-21T19:21:07.549Z"}
|
||||||
(log/info (str "POST EVENT " (body-string request) request))
|
(log/info (str "POST EVENT " (body-string request) request))
|
||||||
{:status 200
|
{:status 200
|
||||||
:headers {"Content-Type" "application/json"}
|
:headers {"Content-Type" "application/json"}
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
(ns auto-ap.routes.yodlee2
|
(ns auto-ap.routes.yodlee2
|
||||||
(:require
|
(:require
|
||||||
[auto-ap.yodlee.core2 :as yodlee]
|
[auto-ap.datomic :refer [conn]]
|
||||||
[auto-ap.graphql.utils :refer [assert-admin]]
|
[auto-ap.datomic.clients :as d-clients]
|
||||||
|
[auto-ap.graphql.utils :refer [assert-admin assert-can-see-client]]
|
||||||
[auto-ap.routes.utils :refer [wrap-secure]]
|
[auto-ap.routes.utils :refer [wrap-secure]]
|
||||||
[compojure.core :refer [GET POST context defroutes wrap-routes]]
|
[auto-ap.yodlee.core2 :as yodlee]
|
||||||
[config.core :refer [env]]
|
|
||||||
[clojure.tools.logging :as log]
|
[clojure.tools.logging :as log]
|
||||||
[auto-ap.datomic.clients :as d-clients]))
|
[compojure.core :refer [context defroutes GET POST wrap-routes]]
|
||||||
|
[config.core :refer [env]]
|
||||||
|
[datomic.api :as d]))
|
||||||
|
|
||||||
(defroutes routes
|
(defroutes routes
|
||||||
(wrap-routes
|
(wrap-routes
|
||||||
(context "/yodlee2" []
|
(context "/yodlee2" []
|
||||||
(GET "/fastlink" {:keys [query-params identity] :as request}
|
(GET "/fastlink" {:keys [query-params identity] :as request}
|
||||||
(assert-admin identity)
|
(assert-can-see-client identity (d/pull (d/db conn) [:db/id] [:client/code (get query-params "client")]))
|
||||||
|
|
||||||
(let [token (if-let [client-id (get query-params "client-id")]
|
(let [token (if-let [client-id (get query-params "client-id")]
|
||||||
(-> client-id
|
(-> client-id
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"import-batches" :admin-import-batches
|
"import-batches" :admin-import-batches
|
||||||
"vendors" :admin-vendors
|
"vendors" :admin-vendors
|
||||||
"excel-import" :admin-excel-import
|
"excel-import" :admin-excel-import
|
||||||
"yodlee2" :admin-yodlee2}
|
}
|
||||||
"invoices/" {"" :invoices
|
"invoices/" {"" :invoices
|
||||||
"import" :import-invoices
|
"import" :import-invoices
|
||||||
"unpaid" :unpaid-invoices
|
"unpaid" :unpaid-invoices
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
"excluded" :excluded-transactions}
|
"excluded" :excluded-transactions}
|
||||||
"reports/" {"" :reports}
|
"reports/" {"" :reports}
|
||||||
"plaid" :plaid
|
"plaid" :plaid
|
||||||
|
"yodlee2" :yodlee2
|
||||||
"ledger/" {"" :ledger
|
"ledger/" {"" :ledger
|
||||||
"profit-and-loss" :profit-and-loss
|
"profit-and-loss" :profit-and-loss
|
||||||
"balance-sheet" :balance-sheet
|
"balance-sheet" :balance-sheet
|
||||||
|
|||||||
@@ -47,10 +47,7 @@
|
|||||||
[:span {:class "name"} "Rules"]]]
|
[:span {:class "name"} "Rules"]]]
|
||||||
|
|
||||||
|
|
||||||
[:li.menu-item
|
|
||||||
[:a {:href (bidi/path-for routes/routes :admin-yodlee2), :class (str "item" (active-when ap = :admin-yodlee2))}
|
|
||||||
[:span {:class "icon icon-saving-bank-1" :style {:font-size "25px"}}]
|
|
||||||
[:span {:class "name"} "Yodlee 2 Link"]]]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
[auto-ap.views.pages.admin.excel-import :refer [admin-excel-import-page]]
|
[auto-ap.views.pages.admin.excel-import :refer [admin-excel-import-page]]
|
||||||
[auto-ap.views.pages.admin.users :refer [admin-users-page]]
|
[auto-ap.views.pages.admin.users :refer [admin-users-page]]
|
||||||
[auto-ap.views.pages.admin.import-batches :refer [import-batches-page]]
|
[auto-ap.views.pages.admin.import-batches :refer [import-batches-page]]
|
||||||
[auto-ap.views.pages.admin.yodlee2 :as yodlee2]
|
[auto-ap.views.pages.company.yodlee2 :as yodlee2]
|
||||||
[auto-ap.views.pages.company.plaid :as plaid]))
|
[auto-ap.views.pages.company.plaid :as plaid]))
|
||||||
|
|
||||||
(defmulti page (fn [active-page] active-page))
|
(defmulti page (fn [active-page] active-page))
|
||||||
@@ -109,8 +109,8 @@
|
|||||||
(defmethod page :admin-import-batches [_]
|
(defmethod page :admin-import-batches [_]
|
||||||
[import-batches-page])
|
[import-batches-page])
|
||||||
|
|
||||||
(defmethod page :admin-yodlee2 [_]
|
(defmethod page :yodlee2 [_]
|
||||||
(yodlee2/admin-yodle-provider-accounts-page))
|
(yodlee2/admin-yodlee-provider-accounts-page))
|
||||||
|
|
||||||
(defmethod page :plaid [_]
|
(defmethod page :plaid [_]
|
||||||
(plaid/plaid-page))
|
(plaid/plaid-page))
|
||||||
|
|||||||
@@ -18,4 +18,8 @@
|
|||||||
[:li.menu-item
|
[:li.menu-item
|
||||||
[:a {:href (bidi/path-for routes/routes :plaid), :class (str "item" (active-when ap = :plaid))}
|
[:a {:href (bidi/path-for routes/routes :plaid), :class (str "item" (active-when ap = :plaid))}
|
||||||
[:span {:class "icon icon-saving-bank-1" :style {:font-size "25px"}}]
|
[:span {:class "icon icon-saving-bank-1" :style {:font-size "25px"}}]
|
||||||
[:span {:class "name"} "Plaid Link"]]]]))
|
[:span {:class "name"} "Plaid Link"]]]
|
||||||
|
[:li.menu-item
|
||||||
|
[:a {:href (bidi/path-for routes/routes :yodlee2), :class (str "item" (active-when ap = :yodlee2))}
|
||||||
|
[:span {:class "icon icon-saving-bank-1" :style {:font-size "25px"}}]
|
||||||
|
[:span {:class "name"} "Yodlee Link"]]]]))
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
(ns auto-ap.views.pages.admin.yodlee2
|
(ns auto-ap.views.pages.company.yodlee2
|
||||||
(:require
|
(:require
|
||||||
[auto-ap.effects.forward :as forward]
|
[auto-ap.effects.forward :as forward]
|
||||||
[auto-ap.status :as status]
|
[auto-ap.status :as status]
|
||||||
[auto-ap.subs :as subs]
|
[auto-ap.subs :as subs]
|
||||||
[auto-ap.views.components.admin.side-bar :refer [admin-side-bar]]
|
|
||||||
[auto-ap.views.components.grid :as grid]
|
[auto-ap.views.components.grid :as grid]
|
||||||
[auto-ap.views.components.layouts :refer [side-bar-layout]]
|
[auto-ap.views.components.layouts :refer [side-bar-layout]]
|
||||||
[auto-ap.views.pages.admin.yodlee2.table :as table]
|
[auto-ap.views.pages.company.side-bar :refer [company-side-bar]]
|
||||||
[auto-ap.views.utils :refer [dispatch-event]]
|
[auto-ap.views.pages.company.yodlee2.table :as table]
|
||||||
|
[auto-ap.views.utils :refer [dispatch-event with-user]]
|
||||||
[re-frame.core :as re-frame]
|
[re-frame.core :as re-frame]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]
|
||||||
|
[vimsical.re-frame.cofx.inject :as inject]))
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
::authentication
|
::authentication
|
||||||
@@ -27,11 +28,6 @@
|
|||||||
(fn [db]
|
(fn [db]
|
||||||
(::yodlee-provider-accounts db)))
|
(::yodlee-provider-accounts db)))
|
||||||
|
|
||||||
(re-frame/reg-event-fx
|
|
||||||
::params-change
|
|
||||||
(fn [_ [_ params]]
|
|
||||||
{:set-uri-params params}))
|
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
::page
|
::page
|
||||||
:<- [::params]
|
:<- [::params]
|
||||||
@@ -42,10 +38,11 @@
|
|||||||
|
|
||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::data-requested
|
::data-requested
|
||||||
(fn [{:keys [db]} _]
|
[with-user (re-frame/inject-cofx ::inject/sub [::subs/client])]
|
||||||
{:graphql {:token (:user db)
|
(fn [{:keys [user] ::subs/keys [client]} _]
|
||||||
|
{:graphql {:token user
|
||||||
:owns-state {:single ::page}
|
:owns-state {:single ::page}
|
||||||
:query-obj {:venia/queries [[:yodlee-provider-account-page {:client-id (:id @(re-frame/subscribe [::subs/client]))}
|
:query-obj {:venia/queries [[:yodlee-provider-account-page {:client-id (:id client)}
|
||||||
[[:yodlee-provider-accounts [:id :last-updated :status :detailed-status
|
[[:yodlee-provider-accounts [:id :last-updated :status :detailed-status
|
||||||
[:client [:id]]
|
[:client [:id]]
|
||||||
[:accounts [:id :name :number :available-balance]]]]
|
[:accounts [:id :name :number :available-balance]]]]
|
||||||
@@ -58,20 +55,21 @@
|
|||||||
{:dispatch [::data-requested]
|
{:dispatch [::data-requested]
|
||||||
::forward/register {:id ::yodlee-account-refreshed
|
::forward/register {:id ::yodlee-account-refreshed
|
||||||
:events #{::table/refreshed ::table/provider-account-deleted}
|
:events #{::table/refreshed ::table/provider-account-deleted}
|
||||||
:event-fn (fn [[_ query-result]]
|
:event-fn (fn [[_ _]]
|
||||||
[::data-requested])}
|
[::data-requested])}
|
||||||
:db (dissoc db ::authentication)}))
|
:db (dissoc db ::authentication)}))
|
||||||
|
|
||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::unmounted
|
::unmounted
|
||||||
(fn [{:keys [db]} _]
|
(fn [_ _]
|
||||||
{::forward/dispose {:id ::yodlee-account-refreshed}}))
|
{::forward/dispose {:id ::yodlee-account-refreshed}}))
|
||||||
|
|
||||||
|
|
||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::authenticate-with-yodlee
|
::authenticate-with-yodlee
|
||||||
(fn [{:keys [db]} [_ client]]
|
[with-user]
|
||||||
{:http {:token (:user db)
|
(fn [{:keys [user]} [_ client]]
|
||||||
|
{:http {:token user
|
||||||
:method :get
|
:method :get
|
||||||
:headers {"Content-Type" "application/edn"}
|
:headers {"Content-Type" "application/edn"}
|
||||||
:uri (str "/api/yodlee2/fastlink?client=" client)
|
:uri (str "/api/yodlee2/fastlink?client=" client)
|
||||||
@@ -110,7 +108,6 @@
|
|||||||
#js {"fastLinkURL" (:url authentication)
|
#js {"fastLinkURL" (:url authentication)
|
||||||
"accessToken" (:token authentication)
|
"accessToken" (:token authentication)
|
||||||
"params" #js { "configName" "Aggregation"}}
|
"params" #js { "configName" "Aggregation"}}
|
||||||
|
|
||||||
"fa-spot")
|
"fa-spot")
|
||||||
)}
|
)}
|
||||||
[:span [:span.icon [:i.fa.fa-external-link]] " Go to yodlee"]]]
|
[:span [:span.icon [:i.fa.fa-external-link]] " Go to yodlee"]]]
|
||||||
@@ -131,11 +128,14 @@
|
|||||||
[yodlee-link-button]])
|
[yodlee-link-button]])
|
||||||
|
|
||||||
|
|
||||||
(defn admin-yodle-provider-accounts-page []
|
(defn admin-yodlee-provider-accounts-page []
|
||||||
(reagent/create-class
|
(let [user (re-frame/subscribe [::subs/user])]
|
||||||
{:component-will-unmount #(re-frame/dispatch [::unmounted])
|
(reagent/create-class
|
||||||
:component-did-mount #(re-frame/dispatch [::mounted])
|
{:component-will-unmount #(re-frame/dispatch [::unmounted])
|
||||||
:reagent-render (fn []
|
:component-did-mount #(re-frame/dispatch [::mounted])
|
||||||
[side-bar-layout {:side-bar [admin-side-bar {}]
|
:reagent-render (fn []
|
||||||
:main [admin-yodlee-provider-accounts-content]}])}))
|
(if (not= "manager" (:user/role @user))
|
||||||
|
[side-bar-layout {:side-bar [company-side-bar {}]
|
||||||
|
:main [admin-yodlee-provider-accounts-content]}]
|
||||||
|
[:div "Not authorized"]))})))
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
(ns auto-ap.views.pages.admin.yodlee2.form
|
(ns auto-ap.views.pages.company.yodlee2.form
|
||||||
(:require
|
(:require
|
||||||
[auto-ap.views.components.modal :as modal]
|
[auto-ap.views.components.modal :as modal]
|
||||||
[re-frame.core :as re-frame]
|
[re-frame.core :as re-frame]
|
||||||
@@ -1,25 +1,24 @@
|
|||||||
(ns auto-ap.views.pages.admin.yodlee2.table
|
(ns auto-ap.views.pages.company.yodlee2.table
|
||||||
(:require [auto-ap.status :as status]
|
(:require [auto-ap.status :as status]
|
||||||
[auto-ap.subs :as subs]
|
[auto-ap.subs :as subs]
|
||||||
[auto-ap.views.components.buttons :as buttons]
|
[auto-ap.views.components.buttons :as buttons]
|
||||||
[auto-ap.views.components.grid :as grid]
|
[auto-ap.views.components.grid :as grid]
|
||||||
[auto-ap.views.components.modal :as modal]
|
[auto-ap.views.components.modal :as modal]
|
||||||
[auto-ap.views.pages.admin.yodlee2.form :as form]
|
[auto-ap.views.pages.company.yodlee2.form :as form]
|
||||||
[auto-ap.views.utils :refer [->$ action-cell-width date->str with-user dispatch-event]]
|
[auto-ap.views.utils :refer [->$ action-cell-width date->str with-user dispatch-event]]
|
||||||
[re-frame.core :as re-frame]
|
[re-frame.core :as re-frame]))
|
||||||
[auto-ap.forms :as forms]))
|
|
||||||
|
|
||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::refreshed
|
::refreshed
|
||||||
[with-user ]
|
[with-user ]
|
||||||
(fn [{:keys [user db]} [_ provider-account ]]
|
(fn [_ _]
|
||||||
;; this is tracked in yodlee main, for refreshing
|
;; this is tracked in yodlee main, for refreshing
|
||||||
{}))
|
{}))
|
||||||
|
|
||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::request-refresh
|
::request-refresh
|
||||||
[with-user ]
|
[with-user ]
|
||||||
(fn [{:keys [user db]} [_ provider-account client-id ]]
|
(fn [{:keys [user]} [_ provider-account client-id ]]
|
||||||
{:http {:token user
|
{:http {:token user
|
||||||
:method :post
|
:method :post
|
||||||
:headers {"Content-Type" "application/edn"}
|
:headers {"Content-Type" "application/edn"}
|
||||||
@@ -32,7 +31,7 @@
|
|||||||
|
|
||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::provider-account-deleted
|
::provider-account-deleted
|
||||||
(fn [{:keys [db]} [_ i result]]
|
(fn [_ _]
|
||||||
{:dispatch [::modal/modal-closed ]}))
|
{:dispatch [::modal/modal-closed ]}))
|
||||||
|
|
||||||
|
|
||||||
@@ -52,8 +51,7 @@
|
|||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::delete-provider-account
|
::delete-provider-account
|
||||||
[with-user ]
|
[with-user ]
|
||||||
(fn [{:keys [user db]} [_ provider-account-id ]]
|
(fn [{:keys [user]} [_ provider-account-id ]]
|
||||||
(comment :on-error [::forms/save-error [::delete-provider-account provider-account-id] ])
|
|
||||||
{:http {:token user
|
{:http {:token user
|
||||||
:method :post
|
:method :post
|
||||||
:owns-state {:single ::delete-provider-account}
|
:owns-state {:single ::delete-provider-account}
|
||||||
@@ -67,7 +65,7 @@
|
|||||||
(re-frame/reg-event-fx
|
(re-frame/reg-event-fx
|
||||||
::delete-requested
|
::delete-requested
|
||||||
[with-user]
|
[with-user]
|
||||||
(fn [{:keys [user db]} [_ account-id]]
|
(fn [_ [_ account-id]]
|
||||||
{:dispatch
|
{:dispatch
|
||||||
[::modal/modal-requested {:title "Delete Provider account "
|
[::modal/modal-requested {:title "Delete Provider account "
|
||||||
:body [:div "Are you sure you want to delete provider account " account-id "?"]
|
:body [:div "Are you sure you want to delete provider account " account-id "?"]
|
||||||
@@ -91,7 +89,8 @@
|
|||||||
(defn table [{:keys [status page]}]
|
(defn table [{:keys [status page]}]
|
||||||
(let [params @(re-frame/subscribe [::params])
|
(let [params @(re-frame/subscribe [::params])
|
||||||
statuses @(re-frame/subscribe [::status/multi ::refresh])
|
statuses @(re-frame/subscribe [::status/multi ::refresh])
|
||||||
login-statuses @(re-frame/subscribe [::status/multi ::request-login-form])]
|
login-statuses @(re-frame/subscribe [::status/multi ::request-login-form])
|
||||||
|
is-admin? @(re-frame/subscribe [::subs/is-admin?])]
|
||||||
[grid/grid {:status status
|
[grid/grid {:status status
|
||||||
:on-params-change (fn [p]
|
:on-params-change (fn [p]
|
||||||
(re-frame/dispatch [::params-changed p]))
|
(re-frame/dispatch [::params-changed p]))
|
||||||
@@ -121,13 +120,14 @@
|
|||||||
^{:key (:id a)}
|
^{:key (:id a)}
|
||||||
[:li (:name a) " - " (:number a) [:div.tag (->$ (:available-balance a))]])]]
|
[:li (:name a) " - " (:number a) [:div.tag (->$ (:available-balance a))]])]]
|
||||||
[grid/cell {}
|
[grid/cell {}
|
||||||
[:div.buttons
|
(when is-admin?
|
||||||
[buttons/fa-icon {:event
|
[:div.buttons
|
||||||
[::request-login-form (:id c) (:id (:client c))]
|
[buttons/fa-icon {:event
|
||||||
:class (status/class-for (get login-statuses (:id c)))
|
[::request-login-form (:id c) (:id (:client c))]
|
||||||
:icon "fa-pencil"}]
|
:class (status/class-for (get login-statuses (:id c)))
|
||||||
[buttons/fa-icon {:event [::request-refresh (:id c) (:id (:client c))]
|
:icon "fa-pencil"}]
|
||||||
:class (status/class-for (get statuses (:id c)))
|
[buttons/fa-icon {:event [::request-refresh (:id c) (:id (:client c))]
|
||||||
:icon "fa-refresh"}]
|
:class (status/class-for (get statuses (:id c)))
|
||||||
[buttons/fa-icon {:event [::delete-requested (:id c)]
|
:icon "fa-refresh"}]
|
||||||
:icon "fa-times"}]]]])]]]))
|
[buttons/fa-icon {:event [::delete-requested (:id c)]
|
||||||
|
:icon "fa-times"}]])]])]]]))
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
:component-will-unmount #(re-frame/dispatch [::unmounted])
|
:component-will-unmount #(re-frame/dispatch [::unmounted])
|
||||||
:reagent-render
|
:reagent-render
|
||||||
(fn []
|
(fn []
|
||||||
|
(println "ROLE" (:user/role @user))
|
||||||
(if (not= "manager" (:user/role @user))
|
(if (not= "manager" (:user/role @user))
|
||||||
[side-bar-layout
|
[side-bar-layout
|
||||||
{:side-bar [company-side-bar {:data-page ::page}]
|
{:side-bar [company-side-bar {:data-page ::page}]
|
||||||
|
|||||||
Reference in New Issue
Block a user