refactor(ssr): drop dead account-total / account-balance routes (heuristic 6)
The hx-select reference moved running totals into an inline #account-totals tbody that refreshes via edit-form-changed, so nothing posts to ::route/account-total or ::route/account-balance anymore -- their route handlers were referenced only by their own registrations. Remove the two handler fns, their route registrations, and the now-unused route keys from routes/transactions.cljc. The pure account-total* / account-balance* fns (used inline to render the totals) are untouched. Scorecard: modal routes ~12 -> ~10. Full suite 31 pass / no regression.
This commit is contained in:
@@ -387,12 +387,6 @@
|
||||
"text-red-300")}
|
||||
(format "$%,.2f" balance)]))
|
||||
|
||||
(defn account-total [request]
|
||||
(html-response (account-total* request)))
|
||||
|
||||
(defn account-balance [request]
|
||||
(html-response (account-balance* request)))
|
||||
|
||||
(defn ->percentage [amount total]
|
||||
(when (and amount total (not= total 0))
|
||||
(* 100.0 (/ amount total))))
|
||||
@@ -1526,14 +1520,6 @@
|
||||
[:maybe entity-id]]
|
||||
[:account-id {:optional true}
|
||||
[:maybe entity-id]]]))
|
||||
::route/account-total (-> account-total
|
||||
(mm/wrap-wizard edit-wizard)
|
||||
(wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read)
|
||||
(mm/wrap-decode-multi-form-state))
|
||||
::route/account-balance (-> account-balance
|
||||
(mm/wrap-wizard edit-wizard)
|
||||
(wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read)
|
||||
(mm/wrap-decode-multi-form-state))
|
||||
::route/edit-form-changed (-> edit-form-changed-handler
|
||||
(mm/wrap-wizard edit-wizard)
|
||||
(wrap-entity [:multi-form-state :snapshot :db/id] d-transactions/default-read)
|
||||
|
||||
Reference in New Issue
Block a user