accounts and transactions work the same way
This commit is contained in:
@@ -244,11 +244,12 @@
|
||||
;; goes with what, building index on the server side
|
||||
;; not needing to pass index in
|
||||
|
||||
;; TODO decide when cursors are used. other cases it's not, some are
|
||||
(defn client-override* [override]
|
||||
[:div.flex.gap-2.mb-2.client-override (-> {"x-ref" "p"
|
||||
[:div.flex.gap-2.mb-2.client-override (-> {:x-ref "p"
|
||||
:data-key "show"
|
||||
}
|
||||
hx/alpine-mount-then-appear)
|
||||
:x-data (hx/json {:show (boolean (not (:new? override)))})}
|
||||
hx/alpine-mount-then-appear)
|
||||
[:div.w-96
|
||||
(fc/with-field :db/id
|
||||
(com/hidden {:name (fc/field-name)
|
||||
@@ -388,7 +389,8 @@
|
||||
(defn new-client-override [{ {:keys [index]} :query-params}]
|
||||
(let [index (or index 0)
|
||||
account {:account/client-overrides (conj (into [] (repeat index {}))
|
||||
{:db/id (str (java.util.UUID/randomUUID))})}] ;; TODO schema decode is not working
|
||||
{:db/id (str (java.util.UUID/randomUUID))
|
||||
:new? true})}] ;; TODO schema decode is not working
|
||||
(html-response
|
||||
(fc/start-form account []
|
||||
(fc/with-cursor (get-in fc/*current* [:account/client-overrides index])
|
||||
|
||||
Reference in New Issue
Block a user