refactor(ssr): re-author form/wizard modals — whole-form swap, session wizard engine, Hiccup rendering #14

Open
notid wants to merge 35 commits from integreat-execute-refactor into staging
Showing only changes of commit 333c280732 - Show all commits

View File

@@ -674,25 +674,26 @@
(modal-response
(com/modal {}
(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-body
{}
[: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)
{:selected invoice-id :replace-modal true})}
hx/trigger-click-or-enter) "Pay now")
(com/navigation-button (-> {:class "w-48"
:hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/new-wizard)
{:replace-modal true})}
hx/trigger-click-or-enter) "Add another")
(com/navigation-button {:class "w-48" :next-arrow? false
"@click" "$dispatch('modalclose') "
"@keyup.enter.stop" "$dispatch('modalclose')"}
"Close")))))
[:div.flex.flex-col.items-center.space-y-6.py-2
[:p.text-lg "Would you like to pay this invoice now?"]
(com/navigation-button-list
{}
(com/navigation-button (-> {:class "w-full"
:hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard)
{:selected invoice-id :replace-modal true})}
hx/trigger-click-or-enter) "Pay now")
(com/navigation-button (-> {:class "w-full"
:hx-get (hu/url (bidi/path-for ssr-routes/only-routes ::route/new-wizard)
{:replace-modal true})}
hx/trigger-click-or-enter) "Add another")
(com/navigation-button {:class "w-full" :next-arrow? false
"@click" "$dispatch('modalclose') "
"@keyup.enter.stop" "$dispatch('modalclose')"}
"Close"))])))
:headers {"hx-trigger" "invalidated"}))
(defn- updated-row-response