adds yodlee2 accounts
This commit is contained in:
@@ -536,7 +536,8 @@
|
||||
:mutations
|
||||
{:request_import
|
||||
{:type 'String
|
||||
:args {:which {:type 'String}}
|
||||
:args {:which {:type 'String}
|
||||
:args {:type 'String}}
|
||||
:resolve :mutation/request-import}
|
||||
|
||||
:delete_transaction_rule
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
[auto-ap.jobs.core :refer [execute]]
|
||||
[auto-ap.yodlee.core2 :as client2]))
|
||||
|
||||
(defn accounts-only []
|
||||
(execute "yodlee2-accounts" client2/upsert-accounts))
|
||||
|
||||
(defn -main [& _]
|
||||
(execute "import-yodlee" (fn []
|
||||
(client2/upsert-accounts)
|
||||
|
||||
@@ -100,6 +100,9 @@
|
||||
(= job "yodlee2")
|
||||
(job-yodlee2/-main)
|
||||
|
||||
(= job "yodlee2_accounts")
|
||||
(job-yodlee2/accounts-only)
|
||||
|
||||
(= job "plaid")
|
||||
(job-plaid/-main)
|
||||
|
||||
|
||||
@@ -85,6 +85,15 @@
|
||||
:query "mutation RequestIntuitImport{request_import(which: \":plaid\")}"
|
||||
:on-success [::success-plaid]}}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::request-yodlee2-accounts
|
||||
[with-user ]
|
||||
(fn [{:keys [user]} [_ _]]
|
||||
{:graphql {:token user
|
||||
:owns-state {:single ::yodlee2-accounts}
|
||||
:query "mutation RequestIntuitImport{request_import(which: \":yodlee2-accounts\")}"
|
||||
:on-success [::success-yodlee2-accounts]}}))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::mounted
|
||||
@@ -108,6 +117,7 @@
|
||||
(let [user @(re-frame/subscribe [::subs/user])
|
||||
intuit-request-import-status @(re-frame/subscribe [::status/single ::intuit])
|
||||
yodlee2-request-import-status @(re-frame/subscribe [::status/single ::yodlee2])
|
||||
yodlee2-accounts-request-import-status @(re-frame/subscribe [::status/single ::yodlee2-accounts])
|
||||
plaid-request-import-status @(re-frame/subscribe [::status/single ::plaid])
|
||||
message @(re-frame/subscribe [::msg])]
|
||||
[:div
|
||||
@@ -136,8 +146,14 @@
|
||||
:on-click (dispatch-event [::request-plaid])
|
||||
:disabled (status/disabled-for plaid-request-import-status)
|
||||
:class (status/class-for plaid-request-import-status)}
|
||||
"Start Plaid Import"]]]
|
||||
[table/table {:id :import-batches
|
||||
"Start Plaid Import"]
|
||||
[:button.button.is-primary-two {:aria-haspopup true
|
||||
:type "button"
|
||||
:on-click (dispatch-event [::request-yodlee2-accounts])
|
||||
:disabled (status/disabled-for yodlee2-accounts-request-import-status)
|
||||
:class (status/class-for yodlee2-accounts-request-import-status)}
|
||||
"Start Yodlee Accounts"]]]
|
||||
[table/table {:id :import-batches
|
||||
:data-page ::page}]])]))
|
||||
{:component-did-mount (dispatch-event [::mounted ])
|
||||
:component-will-unmount #(re-frame/dispatch-sync [::unmounted])}))
|
||||
|
||||
Reference in New Issue
Block a user