This commit is contained in:
2026-05-18 18:30:16 -07:00

View File

@@ -157,7 +157,8 @@
(if account-id (if account-id
[:span.text-sm account-name] [:span.text-sm account-name]
(com/pill {:color :red} "Missing acct")) (com/pill {:color :red} "Missing acct"))
(com/a-icon-button {:hx-get (bidi/path-for ssr-routes/only-routes ::route/edit-item-account) (com/a-icon-button {:class "p-1"
:hx-get (bidi/path-for ssr-routes/only-routes ::route/edit-item-account)
:hx-target "closest .account-cell" :hx-target "closest .account-cell"
:hx-swap "outerHTML" :hx-swap "outerHTML"
:hx-vals (hx/json {:item-index (or (:item-index item) 0) :hx-vals (hx/json {:item-index (or (:item-index item) 0)
@@ -170,22 +171,24 @@
[:div.account-cell.flex.flex-col.gap-2 [:div.account-cell.flex.flex-col.gap-2
(account-typeahead* {:name account-input-name (account-typeahead* {:name account-input-name
:value current-account-id :value current-account-id
:client-id client-id}
[:div.flex.gap-1
(com/a-icon-button {:hx-put (bidi/path-for ssr-routes/only-routes ::route/save-item-account)
:hx-target "closest .account-cell"
:hx-swap "outerHTML"
:hx-include "closest .account-cell"}
:hx-vals (hx/json {:field-name-prefix field-name-prefix
:client-id client-id}) :client-id client-id})
svg/check) [:div.flex.gap-1
(com/a-icon-button {:hx-get (bidi/path-for ssr-routes/only-routes ::route/cancel-item-account) (com/a-icon-button {:class "p-1"
:hx-put (bidi/path-for ssr-routes/only-routes ::route/save-item-account)
:hx-target "closest .account-cell" :hx-target "closest .account-cell"
:hx-swap "outerHTML" :hx-swap "outerHTML"
:hx-vals (hx/json {:field-name-prefix field-name-prefix} :hx-include "closest .account-cell"
:hx-vals (hx/json {:field-name-prefix field-name-prefix
:client-id client-id})}
svg/check)
(com/a-icon-button {:class "p-1"
:hx-get (bidi/path-for ssr-routes/only-routes ::route/cancel-item-account)
:hx-target "closest .account-cell"
:hx-swap "outerHTML"
:hx-vals (hx/json {:field-name-prefix field-name-prefix
:client-id client-id :client-id client-id
:current-account-id (or current-account-id ""))} :current-account-id (or current-account-id "")})}
svg/x)])])) svg/x)]]))
(def grid-page (def grid-page
(helper/build {:id "entity-table" (helper/build {:id "entity-table"
@@ -574,7 +577,7 @@
(account-display-cell {:item (assoc item :item-index actual-idx) (account-display-cell {:item (assoc item :item-index actual-idx)
:field-name-prefix (str "step-params[sales-summary/items][" actual-idx "]") :field-name-prefix (str "step-params[sales-summary/items][" actual-idx "]")
:client-id client-id}) :client-id client-id})
[:span.font-mono.tabular-nums.text-gray-900 (format "$%,.2f" (:ledger-mapped/amount item))]])) [:span.ml-auto.font-mono.tabular-nums.text-gray-900 (format "$%,.2f" (:ledger-mapped/amount item))]]))
[:div.h-6]))] [:div.h-6]))]
[:div.mt-2.border-t.pt-1 [:div.mt-2.border-t.pt-1
(summary-total-display request) (summary-total-display request)
@@ -617,7 +620,7 @@
(account-display-cell {:item (assoc item :item-index actual-idx) (account-display-cell {:item (assoc item :item-index actual-idx)
:field-name-prefix (str "step-params[sales-summary/items][" actual-idx "]") :field-name-prefix (str "step-params[sales-summary/items][" actual-idx "]")
:client-id client-id}) :client-id client-id})
[:span.font-mono.tabular-nums.text-gray-900 (format "$%,.2f" (:ledger-mapped/amount item))]])) [:span.ml-auto.font-mono.tabular-nums.text-gray-900 (format "$%,.2f" (:ledger-mapped/amount item))]]))
[:div.h-6]))] [:div.h-6]))]
[:div.mt-2.border-t.pt-1 [:div.mt-2.border-t.pt-1
(summary-total-display request) (summary-total-display request)