Making progress on a good invoice experience.

This commit is contained in:
Bryce
2024-03-19 09:14:51 -07:00
parent 8fb27d6c66
commit f6f6dcc865
9 changed files with 127 additions and 76 deletions

View File

@@ -70,7 +70,7 @@
[:div {:hx-get (bidi/path-for ssr-routes/only-routes
route
:request-method :get)
:hx-trigger "clientSelected from:body"
:hx-trigger "clientSelected from:body, invalidated from:body"
:hx-swap "outerHTML swap:300ms"
:id id}

View File

@@ -61,5 +61,5 @@
(defn modal-card-advanced- [params & children]
[:div (merge params
{:class (hh/add-class "bg-white rounded-lg shadow dark:bg-gray-700 dark:text-white modal-content flex flex-col max-h-screen max-w-screen" (:class params "")) })
{:class (hh/add-class "modal-card bg-white rounded-lg shadow dark:bg-gray-700 dark:text-white modal-content flex flex-col max-h-screen max-w-screen" (:class params "")) })
children])

View File

@@ -4,13 +4,8 @@
[auto-ap.ssr.svg :as svg]))
(defn link-dropdown [links]
(if (<= (count links) 2)
[:div.flex.flex-col.gap-y-2
(for [l links]
[:div.flex-initial
[:a {:href (:link l)}
(com/pill {:color (or (:color l) :primary) :class "truncate"}
(:content l))]])]
(if (> (count links) 0)
[:div {:x-data (hx/json {:popper nil
:show false})
"@click.outside" "show=false"
@@ -18,13 +13,13 @@
:x-init "popper = Popper.createPopper($refs.link, $refs.tooltip, {placement: 'bottom', strategy: 'fixed'})"}
(com/a-icon-button {:x-ref "link" "@click.prevent" "show=!show; $nextTick(() => popper.update());" :class "relative"}
svg/three-dots
svg/paperclip
(com/badge {} (count links)))
[:div.divide-y.divide-gray-200.bg-white.rounded-lg.shadow (hx/alpine-appear {:x-ref "tooltip" :x-show "show" :data-key "show"})
[:div.divide-y.divide-gray-200.bg-white.rounded-lg.shadow.z-50 (hx/alpine-appear {:x-ref "tooltip" :x-show "show" :data-key "show"})
[:div {:class "p-3 overflow-y-auto text-sm text-gray-700 dark:text-gray-200"}
[:div.flex.flex-col.gap-y-2
(for [l links]
[:div.flex-initial
[:a {:href (:link l)}
(com/pill {:color (or (:color l) :primary) :class "truncate w-24 block shrink grow-0"}
(com/pill {:color (or (:color l) :primary) :class "truncate block shrink grow-0"}
(:content l))]])]]]]))