adding yodlee vetndors.

This commit is contained in:
Bryce Covert
2019-04-16 06:30:24 -07:00
parent e81543b8af
commit 6b1252390b
10 changed files with 59 additions and 14 deletions

View File

@@ -7,6 +7,7 @@
[:vendor [:name :id]]
[:account [:id :name]]
:date
[:yodlee_merchant [:name :id]]
:post_date
:status
:description_original

View File

@@ -9,8 +9,11 @@
(re-frame/reg-event-db
::editing
(fn [db [_ which]]
(println which)
(-> db
(forms/start-form ::edit-transaction {:id (:id which)
:yodlee-merchant (:yodlee-merchant which)
:description-original (:description-original which)
:location (:location which)
:client-id (:id (:client which))
:account-id (:id (:account which))
@@ -69,7 +72,6 @@
(defn form [{:keys [edit-completed]}]
[forms/side-bar-form {:form ::edit-transaction }
(let [{:keys [data active? error id]} @(re-frame/subscribe [::forms/form ::edit-transaction])
data (assoc data :merchant-name "Hello") ;; TODO - just until merchant is added
locations @(re-frame/subscribe [::subs/locations-for-client (:client-id data)])
change-event [::forms/change ::edit-transaction]]
^{:key id}
@@ -78,6 +80,7 @@
(.stopPropagation e)
(.preventDefault e))
(re-frame/dispatch-sync [::saving edit-completed]))}
(println data)
[:h1.title.is-2 "Edit Transaction"]
(comment
@@ -90,7 +93,16 @@
[:div.control
[bind-field
[:input.input {:type "text"
:field [:merchant-name]
:field [:yodlee-merchant :name]
:disabled "disabled"
:subscription data}]]]]
[:div.field
[:p.help "Description"]
[:div.control
[bind-field
[:input.input {:type "text"
:field [:description-original]
:disabled "disabled"
:subscription data}]]]]

View File

@@ -77,14 +77,18 @@
[:tr
[:td {:col-span 5}
[:i.fa.fa-spin.fa-spinner]]]
(for [{:keys [client account vendor payment status bank-account description-original date amount id ] :as i} (:transactions @transaction-page)]
(for [{:keys [client account vendor payment status bank-account description-original date amount id yodlee-merchant ] :as i} (:transactions @transaction-page)]
^{:key id}
[:tr {:class (:class i)}
(when-not selected-client
[:td (:name client)])
[:td (if vendor
[:td (cond vendor
(:name vendor)
[:i.has-text-grey (str "Merchant '" "Hello" "'")])]
yodlee-merchant
[:i.has-text-grey (str "Merchant '" (:name yodlee-merchant) "'")]
:else
[:i.has-text-grey (str "Unknown Merchant")])]
#_[:td description-original]
[:td (date->str date) ]
[:td.has-text-right (nf amount )]