Some nice-to-haves

This commit is contained in:
Bryce Covert
2018-08-24 08:41:01 -07:00
parent e0f7b5f128
commit b17d564cdf
2 changed files with 11 additions and 3 deletions

View File

@@ -47,7 +47,8 @@
:check_number {:type 'Int} :check_number {:type 'Int}
:name {:type 'String} :name {:type 'String}
:bank_code {:type 'String} :bank_code {:type 'String}
:bank_name {:type 'String}}} :bank_name {:type 'String}
:yodlee_account_id {:type 'Int}}}
:address :address
{:fields {:street1 {:type 'String} {:fields {:street1 {:type 'String}
:street2 {:type 'String} :street2 {:type 'String}
@@ -109,6 +110,8 @@
:description_original {:type 'String} :description_original {:type 'String}
:description_simple {:type 'String} :description_simple {:type 'String}
:status {:type 'String} :status {:type 'String}
:bank_account {:type :bank_account
:resolve :bank-account-for-check}
:company {:type :company :company {:type :company
:resolve :get-company-for-transaction} :resolve :get-company-for-transaction}
:check {:type :check :check {:type :check

View File

@@ -40,6 +40,7 @@
:post_date :post_date
:status :status
:description_original :description_original
[:bank-account [:name :yodlee-account-id]]
[:check [:check_number :s3_url]] [:check [:check_number :s3_url]]
[:company [:name :id]]]] [:company [:name :id]]]]
:total :total
@@ -68,7 +69,7 @@
(let [{:keys [sort-by asc]} @state (let [{:keys [sort-by asc]} @state
{:keys [transactions start end count total]} @transaction-page {:keys [transactions start end count total]} @transaction-page
selected-company @(re-frame/subscribe [::subs/company]) selected-company @(re-frame/subscribe [::subs/company])
percentage-size (if selected-company "100%" "50%")] percentage-size (if selected-company "25%" "33%")]
[:div [:div
[paginator {:start start :end end :count count :total total [paginator {:start start :end end :count count :total total
:on-change (fn [p ] :on-change (fn [p ]
@@ -111,6 +112,8 @@
:sort-by sort-by :sort-by sort-by
:asc asc} :asc asc}
"Status"] "Status"]
[:th {:width percentage-size} "Bank account"]
[:th {:width percentage-size} "Yodlee bank account"]
[:th {:style {:width "10em"}} "" ]]] [:th {:style {:width "10em"}} "" ]]]
@@ -119,7 +122,7 @@
[:tr [:tr
[:td {:col-span 5} [:td {:col-span 5}
[:i.fa.fa-spin.fa-spinner]]] [:i.fa.fa-spin.fa-spinner]]]
(for [{:keys [company check status description-original date amount id ] :as i} (:transactions @transaction-page)] (for [{:keys [company check status bank-account description-original date amount id ] :as i} (:transactions @transaction-page)]
^{:key id} ^{:key id}
[:tr {:class (:class i)} [:tr {:class (:class i)}
@@ -129,6 +132,8 @@
[:td (date->str date) ] [:td (date->str date) ]
[:td (gstring/format "$%.2f" amount )] [:td (gstring/format "$%.2f" amount )]
[:td status] [:td status]
[:td (:name bank-account )]
[:td (:yodlee-account-id bank-account )]
[:td [:td