fix(ssr): give the post-create "Invoice created" dialog a proper width

It was auto-sized to its content (~390px) and left-aligned, looking like a
stray box. Match it to the pay modal width (w-[34em] / 544px) so the
create → confirm → pay flow is visually consistent, center the content, and
make the Pay now / Add another / Close buttons full-width. Verified live: 544px,
centered, header "Invoice created".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 07:00:21 -07:00
parent ab7529eca6
commit 333c280732

View File

@@ -674,25 +674,26 @@
(modal-response (modal-response
(com/modal {} (com/modal {}
(com/modal-card-advanced (com/modal-card-advanced
{:class "transition duration-300 ease-in-out scale-100 translate-x-0 opacity-100"} {:class "w-[34em] transition duration-300 ease-in-out scale-100 translate-x-0 opacity-100"}
(com/modal-header {} [:div.p-2 "Invoice created"]) (com/modal-header {} [:div.p-2 "Invoice created"])
(com/modal-body (com/modal-body
{} {}
[:p.text-lg "Would you like to pay this invoice now?"] [:div.flex.flex-col.items-center.space-y-6.py-2
(com/navigation-button-list [:p.text-lg "Would you like to pay this invoice now?"]
{} (com/navigation-button-list
(com/navigation-button (-> {:class "w-48" {}
:hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard) (com/navigation-button (-> {:class "w-full"
{:selected invoice-id :replace-modal true})} :hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard)
hx/trigger-click-or-enter) "Pay now") {:selected invoice-id :replace-modal true})}
(com/navigation-button (-> {:class "w-48" hx/trigger-click-or-enter) "Pay now")
:hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/new-wizard) (com/navigation-button (-> {:class "w-full"
{:replace-modal true})} :hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/new-wizard)
hx/trigger-click-or-enter) "Add another") {:replace-modal true})}
(com/navigation-button {:class "w-48" :next-arrow? false hx/trigger-click-or-enter) "Add another")
"@click" "$dispatch('modalclose') " (com/navigation-button {:class "w-full" :next-arrow? false
"@keyup.enter.stop" "$dispatch('modalclose')"} "@click" "$dispatch('modalclose') "
"Close"))))) "@keyup.enter.stop" "$dispatch('modalclose')"}
"Close"))])))
:headers {"hx-trigger" "invalidated"})) :headers {"hx-trigger" "invalidated"}))
(defn- updated-row-response (defn- updated-row-response