Files
integreat/src/clj/auto_ap/ssr/components/bank_account_icon.clj
Bryce ba87805d4c Add vendor pre-population for bulk code and individual edit forms
- Add vendor-changed HTMX handlers for both bulk code and individual edit
- Pre-populate default account at 100% when vendor is selected and no accounts exist
- Fix render-accounts-section to render from step-params correctly
- Change bulk code vendor-changed from hx-get to hx-post to include form data
- Add routes for vendor-changed endpoints
- Update e2e tests to cover vendor pre-population
- Run lein cljfmt fix across codebase
2026-05-21 14:45:19 -07:00

31 lines
919 B
Clojure

(ns auto-ap.ssr.components.bank-account-icon
(:require [auto-ap.ssr.hiccup-helper :as hh]
[auto-ap.ssr.svg :as svg]))
(defmulti icon :bank-account/type)
(defmethod icon :bank-account-type/cash [_]
[:div.grow-0.flex.flex-col.justify-center
[:div.p-1.m-2.rounded-full
{:class
"bg-blue-50"}
[:div {:class
(hh/add-class "p-1.5 w-8 h-8" "text-green-600")}
svg/dollar]]])
(defmethod icon :bank-account-type/credit [_]
[:div.grow-0.flex.flex-col.justify-center
[:div.p-1.m-2.rounded-full
{:class
"bg-purple-50"}
[:div {:class
(hh/add-class "p-1.5 w-8 h-8" "text-purple-600")}
svg/credit-card]]])
(defmethod icon :bank-account-type/check [_]
[:div.grow-0.flex.flex-col.justify-center
[:div.p-1.m-2.rounded-full
{:class
"bg-blue-50"}
[:div {:class
(hh/add-class "p-1.5 w-8 h-8" "text-blue-600")}
svg/check]]])