undid mistake

This commit is contained in:
2025-01-31 19:35:32 -08:00
parent ac0dbef961
commit c863d36836

View File

@@ -626,32 +626,31 @@
:render (fn [i] :render (fn [i]
(link-dropdown (link-dropdown
(into [] (into []
(repeat 5 (concat (->> i
(concat (->> i :invoice/payments
:invoice/payments (map :invoice-payment/payment)
(map :invoice-payment/payment) (filter (fn [p]
(filter (fn [p] (not= :payment-status/voided
(not= :payment-status/voided (:payment/status p))))
(:payment/status p)))) (mapcat (fn [p]
(mapcat (fn [p] (cond-> [{:link (hu/url (bidi/path-for ssr-routes/only-routes
(cond-> [{:link (hu/url (bidi/path-for ssr-routes/only-routes ::payment-route/all-page)
::payment-route/all-page) {:exact-match-id (:db/id p)})
{:exact-match-id (:db/id p)}) :content (str (format "$%,.2f" (:payment/amount p))
:content (str (format "$%,.2f" (:payment/amount p)) (some-> (:payment/date p) coerce/to-date-time (atime/unparse-local atime/normal-date) (#(str " payment on " %))))}]
(some-> (:payment/date p) coerce/to-date-time (atime/unparse-local atime/normal-date) (#(str " payment on " %))))}] (:payment/transaction p) (conj {:link (hu/url (bidi/path-for client-routes/routes :transactions)
(:payment/transaction p) (conj {:link (hu/url (bidi/path-for client-routes/routes :transactions) {:exact-match-id (:db/id (first (:payment/transaction p)))})
{:exact-match-id (:db/id (first (:payment/transaction p)))}) :color :secondary
:color :secondary :content "Transaction"})))))
:content "Transaction"}))))) (when (:invoice/journal-entry i)
(when (:invoice/journal-entry i) [{:link (hu/url (bidi/path-for client-routes/routes :ledger)
[{:link (hu/url (bidi/path-for client-routes/routes :ledger) {:exact-match-id (:db/id (first (:invoice/journal-entry i)))})
{:exact-match-id (:db/id (first (:invoice/journal-entry i)))}) :color :yellow
:color :yellow :content "Ledger entry"}])
:content "Ledger entry"}]) (when (:invoice/source-url i)
(when (:invoice/source-url i) [{:link (:invoice/source-url i)
[{:link (:invoice/source-url i) :color :secondary
:color :secondary :content "File"}])))))}]}))
:content "File"}]))))))}]}))
(def row* (partial helper/row* grid-page)) (def row* (partial helper/row* grid-page))