Makes link dropdown not get cut off

This commit is contained in:
2025-01-31 19:22:24 -08:00
parent 2826fd5099
commit ac0dbef961
3 changed files with 32 additions and 30 deletions

View File

@@ -8,7 +8,7 @@
[:div [:div
(com/a-icon-button {:class "relative" (com/a-icon-button {:class "relative"
"@click.prevent" "$tooltip($refs.tooltip, {content: ()=>$refs.tooltip.innerHTML, theme: 'light', allowHTML: true, interactive:true})" "@click.prevent" "$tooltip($refs.tooltip, {content: ()=>$refs.tooltip.innerHTML, theme: 'light', allowHTML: true, interactive:true, popperOptions: {strategy: 'fixed', modifiers: [{name: 'flip', options: {fallbackPlacements: ['top']}}]}})"
} }
svg/paperclip svg/paperclip
(com/badge {:color "blue"} (count links))) (com/badge {:color "blue"} (count links)))

View File

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

View File

@@ -421,10 +421,10 @@
(map :invoice-payment/invoice) (map :invoice-payment/invoice)
(filter identity) (filter identity)
(map (fn [invoice] (map (fn [invoice]
{:link (hu/url (bidi/path-for ssr-routes/only-routes {:link (hu/url (bidi/path-for ssr-routes/only-routes
::invoice-route/all-page) ::invoice-route/all-page)
{:exact-match-id (:db/id invoice)}) {:exact-match-id (:db/id invoice)})
:content (str "Inv. " (:invoice/invoice-number invoice))}))) :content (str "Inv. " (:invoice/invoice-number invoice))})))
(some-> p :transaction/_payment ((fn [t] (some-> p :transaction/_payment ((fn [t]
[{:link (hu/url (bidi/path-for client-routes/routes [{:link (hu/url (bidi/path-for client-routes/routes
:transactions) :transactions)