last change before going and trying out new yodlee
This commit is contained in:
@@ -46,12 +46,6 @@
|
||||
#'auto-ap.background.invoices/close-auto-invoices-worker
|
||||
#'gq-clients/current-balance-worker
|
||||
|
||||
#'yodlee/import-worker
|
||||
#'yodlee2/import-worker
|
||||
#'yodlee2/account-worker
|
||||
#'intuit/import-worker
|
||||
#'intuit/account-worker
|
||||
#'plaid/import-worker
|
||||
|
||||
#'migrate/migrate-start]))]
|
||||
(log/info "starting without " without)
|
||||
@@ -59,3 +53,12 @@
|
||||
(add-shutdown-hook! shutdown-mount)
|
||||
(start-server :port 9000 :bind "0.0.0.0" #_#_:handler (cider-nrepl-handler))
|
||||
(apply mount/start-without without)))
|
||||
|
||||
(comment
|
||||
#'yodlee/import-worker
|
||||
#'yodlee2/import-worker
|
||||
#'yodlee2/account-worker
|
||||
#'intuit/import-worker
|
||||
#'intuit/account-worker
|
||||
#'plaid/import-worker
|
||||
)
|
||||
|
||||
@@ -94,6 +94,22 @@
|
||||
}}))
|
||||
|
||||
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::success-plaid
|
||||
(fn [db [_ n]]
|
||||
(assoc db ::msg (str "Your job " (:request-import n) " has been scheduled." ))))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::request-plaid
|
||||
[with-user ]
|
||||
(fn [{:keys [db user] :as cofx} [_ params]]
|
||||
{:graphql {:token user
|
||||
:owns-state {:single ::plaid}
|
||||
:query "mutation RequestIntuitImport{request_import(which: \":plaid\")}"
|
||||
:on-success [::success-plaid]}}))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::mounted
|
||||
(fn [{:keys [db]}]
|
||||
@@ -117,6 +133,7 @@
|
||||
intuit-request-import-status @(re-frame/subscribe [::status/single ::intuit])
|
||||
yodlee-request-import-status @(re-frame/subscribe [::status/single ::yodlee])
|
||||
yodlee2-request-import-status @(re-frame/subscribe [::status/single ::yodlee2])
|
||||
plaid-request-import-status @(re-frame/subscribe [::status/single ::plaid])
|
||||
message @(re-frame/subscribe [::msg])]
|
||||
[:div
|
||||
[:h1.title "Import Batches"]
|
||||
@@ -126,25 +143,31 @@
|
||||
[:div
|
||||
[:div.is-pulled-right
|
||||
[:div.buttons
|
||||
[:button.button.is-primary-two.is-medium {:aria-haspopup true
|
||||
[:button.button.is-primary-two {:aria-haspopup true
|
||||
:type "button"
|
||||
:on-click (dispatch-event [::request-yodlee])
|
||||
:disabled (status/disabled-for yodlee-request-import-status)
|
||||
:class (status/class-for yodlee-request-import-status)}
|
||||
|
||||
"Start Yodlee Import"]
|
||||
[:button.button.is-primary-two.is-medium {:aria-haspopup true
|
||||
[:button.button.is-primary-two {:aria-haspopup true
|
||||
:type "button"
|
||||
:on-click (dispatch-event [::request-yodlee2])
|
||||
:disabled (status/disabled-for yodlee2-request-import-status)
|
||||
:class (status/class-for yodlee2-request-import-status)}
|
||||
"Start Yodlee2 Import"]
|
||||
[:button.button.is-primary-two.is-medium {:aria-haspopup true
|
||||
[:button.button.is-primary-two {:aria-haspopup true
|
||||
:type "button"
|
||||
:on-click (dispatch-event [::request-intuit])
|
||||
:disabled (status/disabled-for intuit-request-import-status)
|
||||
:class (status/class-for intuit-request-import-status)}
|
||||
"Start Intuit Import"]]]
|
||||
"Start Intuit Import"]
|
||||
[:button.button.is-primary-two {:aria-haspopup true
|
||||
:type "button"
|
||||
: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
|
||||
:data-page ::page}]])]))
|
||||
{:component-did-mount (dispatch-event [::mounted ])
|
||||
|
||||
Reference in New Issue
Block a user