refactor(ssr): delete dead transaction-account-row-no-cursor* twin (heuristic 1)

transaction-account-row-no-cursor* and its only helper account-field-name were
unreferenced anywhere in src/ or test/ -- the *-no-cursor* duplicate the plan targets
for removal. The live row renderer is the top-rooted cursor form transaction-account-row*
(driven by fc/cursor-map from the accounts cursor). Deleting the twin: no-cursor twins
1 -> 0, ~53 LOC removed. Swap spec stays 6/6.
This commit is contained in:
2026-06-03 06:15:13 -07:00
parent 69eed1f8a6
commit 32056bf396

View File

@@ -339,60 +339,6 @@
:hx-include "closest form" :hx-include "closest form"
:class "account-remove-action"} svg/x)))) :class "account-remove-action"} svg/x))))
(defn- account-field-name [index field]
(str "step-params[transaction/accounts][" index "]["
(if (keyword? field)
(str (when (namespace field)
(str (namespace field) "/"))
(name field))
field)
"]"))
(defn transaction-account-row-no-cursor* [{:keys [account index client-id amount-mode total]}]
(com/data-grid-row
(-> {:class "account-row"
:x-data (hx/json {:show true
:accountId (:transaction-account/account account)})
:data-key "show"
:x-ref "p"}
hx/alpine-mount-then-appear)
(com/hidden {:name (account-field-name index :db/id)
:value (or (:db/id account) "")})
(com/data-grid-cell
{}
(com/validated-field
{}
(account-typeahead* {:value (:transaction-account/account account)
:client-id client-id
:name (account-field-name index :transaction-account/account)
:x-model "accountId"})))
(com/data-grid-cell
{}
(com/validated-field
{}
(location-select* {:name (account-field-name index :transaction-account/location)
:account-location (:account/location (cond->> (:transaction-account/account account)
(nat-int? (:transaction-account/account account)) (dc/pull (dc/db conn)
'[:account/location])))
:client-locations (pull-attr (dc/db conn) :client/locations client-id)
:value (:transaction-account/location account)})))
(com/data-grid-cell
{}
(com/validated-field
{}
(if (= "%" amount-mode)
(com/text-input {:name (account-field-name index :transaction-account/amount)
:class "w-16 account-amount-field"
:value (:transaction-account/amount account)
:type "number"
:step "0.01"})
(com/money-input {:name (account-field-name index :transaction-account/amount)
:class "w-16 account-amount-field"
:value (:transaction-account/amount account)}))))
(com/data-grid-cell {:class "align-top"}
(com/a-icon-button {"@click.prevent.stop" "show=false; setTimeout(() => $refs.p.remove(), 500)"
:class "account-remove-action"} svg/x))))
(defn location-select [{{:keys [name account-id client-id value] :as qp} :query-params}] (defn location-select [{{:keys [name account-id client-id value] :as qp} :query-params}]
(html-response (location-select* {:name name (html-response (location-select* {:name name
:value value :value value