accounts and transactions work the same way
This commit is contained in:
@@ -342,8 +342,12 @@
|
||||
|
||||
(defn- transaction-rule-account-row*
|
||||
[transaction-rule account]
|
||||
(com/data-grid-row {:x-data (hx/json {:accountId (or (:db/id (fc/field-value (:transaction-rule-account/account account)))
|
||||
(fc/field-value (:transaction-rule-account/account account)))})}
|
||||
(com/data-grid-row (-> {:x-data (hx/json {:accountId (or (:db/id (fc/field-value (:transaction-rule-account/account account)))
|
||||
(fc/field-value (:transaction-rule-account/account account)))
|
||||
:show (boolean (not (fc/field-value (:new? account))))})
|
||||
:data-key "show"
|
||||
:x-ref "p"}
|
||||
hx/alpine-mount-then-appear)
|
||||
(let [account-name (fc/field-name (:transaction-rule-account/account account))]
|
||||
(list
|
||||
|
||||
@@ -394,10 +398,7 @@
|
||||
(* 100 )
|
||||
(long ))}))))))
|
||||
(com/data-grid-cell {:class "align-top"}
|
||||
(com/a-icon-button
|
||||
{"_" (hiccup/raw "on click halt the event then transition the closest <tr />'s opacity to 0 then remove closest <tr />")
|
||||
:href "#"}
|
||||
svg/x))))
|
||||
(com/a-icon-button {"@click.prevent.stop" "show=false; setTimeout(() => $refs.p.remove(), 500)"} svg/x))))
|
||||
|
||||
;; TODO dialog is no longer closeable
|
||||
(defn dialog* [& {:keys [entity form-params form-errors]}]
|
||||
@@ -600,7 +601,8 @@
|
||||
client-id)
|
||||
:transaction-rule/accounts (conj (into [] (repeat index {} ))
|
||||
{:db/id (str (java.util.UUID/randomUUID))
|
||||
:transaction-rule-account/location "Shared"})}]
|
||||
:transaction-rule-account/location "Shared"
|
||||
:new? true})}]
|
||||
(html-response
|
||||
(fc/start-form transaction-rule []
|
||||
(fc/with-cursor (get-in fc/*current* [:transaction-rule/accounts index])
|
||||
|
||||
Reference in New Issue
Block a user