less janky experience
This commit is contained in:
@@ -364,7 +364,7 @@
|
||||
(com/field-errors {:source account
|
||||
:key :transaction-rule-account/account})])
|
||||
(com/data-grid-cell {}
|
||||
[:div {:hx-trigger (hx/triggers
|
||||
[:div [:div {:hx-trigger (hx/triggers
|
||||
(hx/trigger-field-change :name "transaction-rule/client"
|
||||
:from "#edit-form")
|
||||
(hx/trigger-field-change :name account-name
|
||||
@@ -383,7 +383,7 @@
|
||||
(nat-int? (:transaction-rule-account/account account)) (dc/pull (dc/db conn)
|
||||
'[:account/location])))
|
||||
:client-locations (:client/locations (:transaction-rule/client transaction-rule))
|
||||
:value (:transaction-rule-account/location account)})
|
||||
:value (:transaction-rule-account/location account)})]
|
||||
(com/field-errors {:source account
|
||||
:key :transaction-rule-account/location})])
|
||||
(com/data-grid-cell (com/money-input {:name (format "transaction-rule/accounts[%s][transaction-rule-account/percentage]" (:db/id account))
|
||||
|
||||
@@ -110,10 +110,9 @@ c.clearChoices();
|
||||
|
||||
|
||||
(defn field-errors- [{:keys [source key]} & rest]
|
||||
(if-let [errors (:errors (cond-> (meta source)
|
||||
(let [errors (:errors (cond-> (meta source)
|
||||
key (get key)))]
|
||||
[:div.text-red-500 (str/join ", " errors)]
|
||||
[:p.mt-2.text-xs.text-red-600.dark:text-red-500]))
|
||||
[:p.mt-2.text-xs.text-red-600.dark:text-red-500.h-4 (str/join ", " errors)]))
|
||||
|
||||
(defn field- [params & rest]
|
||||
[:div {:id (:id params)}
|
||||
|
||||
Reference in New Issue
Block a user