last refactoring before adding new accounts.

This commit is contained in:
Bryce Covert
2019-04-11 08:41:08 -07:00
parent c3199fb4cb
commit f6d0870f32
3 changed files with 31 additions and 42 deletions

View File

@@ -9,23 +9,14 @@
[auto-ap.views.components.sorter :refer [sorted-column]]
[auto-ap.views.pages.transactions.form :as edit]
[auto-ap.views.pages.transactions.table :as table]
[auto-ap.views.pages.transactions.common :refer [transaction-read]]
[auto-ap.utils :refer [replace-by]]
[auto-ap.views.pages.transactions.manual :as manual]
[auto-ap.views.utils :refer [bind-field date->str dispatch-event nf]]
[goog.string :as gstring]
[re-frame.core :as re-frame]))
(def transaction-read
[:id
:amount
[:vendor [:name :id]]
:date
:post_date
:status
:description_original
[:payment [:check_number :s3_url]]
[:client [:name :id]]
[:bank-account [:name :yodlee-account-id]]])
(re-frame/reg-event-db
::edit-completed
@@ -75,12 +66,6 @@
(assoc ::transaction-page (first (:transaction-page data)))
(assoc-in [:status :loading] false))))
(re-frame/reg-event-fx
::invalidated
(fn [cofx [_ params]]
{:dispatch [::params-change @(re-frame/subscribe [::params])]}))
(re-frame/reg-event-db
::change-selected-bank-account
(fn [db [_ key value]]
@@ -122,8 +107,9 @@
[:li (:description-original transaction) "-" (:details error)])]])))
[:div.is-pulled-right
[:div.buttons
[:button.button.is-danger {:on-click (dispatch-event [::manual/opening])}
"Manage Rules"]
(comment
[:button.button.is-danger {:on-click (dispatch-event [::manual/opening])}
"Manage Rules"])
[:button.button.is-danger {:on-click (dispatch-event [::manual/opening])}
"Manual Yodlee Import"]]]))
[table/table {:id :transactions