diff --git a/src/clj/auto_ap/graphql.clj b/src/clj/auto_ap/graphql.clj index ad844674..c5617007 100644 --- a/src/clj/auto_ap/graphql.clj +++ b/src/clj/auto_ap/graphql.clj @@ -47,7 +47,8 @@ :check_number {:type 'Int} :name {:type 'String} :bank_code {:type 'String} - :bank_name {:type 'String}}} + :bank_name {:type 'String} + :yodlee_account_id {:type 'Int}}} :address {:fields {:street1 {:type 'String} :street2 {:type 'String} @@ -109,6 +110,8 @@ :description_original {:type 'String} :description_simple {:type 'String} :status {:type 'String} + :bank_account {:type :bank_account + :resolve :bank-account-for-check} :company {:type :company :resolve :get-company-for-transaction} :check {:type :check diff --git a/src/cljs/auto_ap/views/pages/transactions.cljs b/src/cljs/auto_ap/views/pages/transactions.cljs index bc0e360f..e4c97649 100644 --- a/src/cljs/auto_ap/views/pages/transactions.cljs +++ b/src/cljs/auto_ap/views/pages/transactions.cljs @@ -40,6 +40,7 @@ :post_date :status :description_original + [:bank-account [:name :yodlee-account-id]] [:check [:check_number :s3_url]] [:company [:name :id]]]] :total @@ -68,7 +69,7 @@ (let [{:keys [sort-by asc]} @state {:keys [transactions start end count total]} @transaction-page selected-company @(re-frame/subscribe [::subs/company]) - percentage-size (if selected-company "100%" "50%")] + percentage-size (if selected-company "25%" "33%")] [:div [paginator {:start start :end end :count count :total total :on-change (fn [p ] @@ -111,6 +112,8 @@ :sort-by sort-by :asc asc} "Status"] + [:th {:width percentage-size} "Bank account"] + [:th {:width percentage-size} "Yodlee bank account"] [:th {:style {:width "10em"}} "" ]]] @@ -119,7 +122,7 @@ [:tr [:td {:col-span 5} [: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} [:tr {:class (:class i)} @@ -129,6 +132,8 @@ [:td (date->str date) ] [:td (gstring/format "$%.2f" amount )] [:td status] + [:td (:name bank-account )] + [:td (:yodlee-account-id bank-account )] [:td