progress on linkage

This commit is contained in:
Bryce Covert
2021-01-23 17:27:41 -08:00
parent 2d8483f2e3
commit 88b0dcde3b
2 changed files with 24 additions and 3 deletions

View File

@@ -14,6 +14,6 @@
[:forecast-match [:id :identifier]]
:status
:description_original
[:payment [:check_number :s3_url]]
[:payment [:check_number :s3_url :id]]
[:client [:name :id]]
[:bank-account [:name :yodlee-account-id]]])

View File

@@ -13,7 +13,10 @@
[re-frame.core :as re-frame]
[auto-ap.views.components.buttons :as buttons]
[auto-ap.status :as status]
[auto-ap.views.pages.data-page :as data-page]))
[auto-ap.views.pages.data-page :as data-page]
[bidi.bidi :as bidi]
[cemerick.url :as url]
[auto-ap.routes :as routes]))
(re-frame/reg-event-fx
::editing-matches-found
@@ -111,6 +114,24 @@
:class (status/class-for (get states id))
:icon "fa-pencil"}]
(when payment
[:a.tag {:href (:s3-url payment) :target "_new"}
[:a.button {:href (str (bidi/path-for routes/routes :payments )
"?"
(url/map->query {:exact-match-id (:id payment)}))}
[:span.icon
[:i.fa.fa-money]]
#_(if (:check-number (:payment payment))
(str "Check " (:check-number (:payment payment))
" (" (gstring/format "$%.2f" (:amount payment) ) ")"
(when (= :cleared (:status (:payment payment)))
(str " - " (:post-date (:transaction (:payment payment))))))
(str "Debit (" (gstring/format "$%.2f" (:amount payment) ) ") "
(when (= :cleared (:status (:payment payment)))
(str " - " (:post-date (:transaction (:payment payment)))))
(when (= :cleared (:status (:payment payment)))
(str " - " (:post-date (:transaction (:payment payment))))))) ]
#_[:a.tag {:href (:s3-url payment) :target "_new"}
[:span.icon [:i.fa.fa-money]]
(str " " (:check-number payment) " (" (gstring/format "$%.2f" amount ) ")")])]]])]]]))