You can now kind of choose a yodlee merchant

This commit is contained in:
Bryce Covert
2019-05-16 09:19:22 -07:00
parent b488ad6302
commit 6d85c2d67c
8 changed files with 72 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
[auto-ap.views.pages.admin.rules.form :as form]
[auto-ap.views.pages.admin.rules.common :refer [default-read]]
[auto-ap.views.utils :refer [dispatch-event with-user]]
[auto-ap.events :as events]
[auto-ap.utils :refer [replace-by]]
[re-frame.core :as re-frame]))
@@ -99,7 +100,8 @@
:on-params-change (fn [params]
(re-frame/dispatch [::params-change params]))}]
]))
{:component-will-mount #(re-frame/dispatch-sync [::params-change {}]) }))
{:component-will-mount #(do (re-frame/dispatch-sync [::params-change {}])
(re-frame/dispatch [::events/yodlee-merchants-needed])) }))
(defn admin-rules-page []
(let [{:keys [active?]} @(re-frame/subscribe [::forms/form ::form/form])]

View File

@@ -217,6 +217,12 @@
:field [:bank-account]
:spec ::entity/bank-account}]]
[field "Yodlee Merchant"
[typeahead-entity {:matches @(re-frame/subscribe [::subs/yodlee-merchants])
:match->text #(str (:name %) " - " (:yodlee-id %))
:type "typeahead-entity"
:field [:yodlee-merchant]}]]
[field [:span "Description (" [:a {:href "https://regex101.com" :target "_new"} "regex tester"] ")" ]
[:input.input {:type "text"
:field [:description]