account new override

This commit is contained in:
2023-10-22 21:47:36 -07:00
parent 76760b7bcf
commit dd5063c72d
2 changed files with 42 additions and 3 deletions

View File

@@ -1357,6 +1357,10 @@ input:checked + .toggle-bg {
height: min-content;
}
.h-\[90vh\] {
height: 90vh;
}
.max-h-96 {
max-height: 24rem;
}
@@ -1369,6 +1373,10 @@ input:checked + .toggle-bg {
max-height: 90vh;
}
.max-h-\[100vh\] {
max-height: 100vh;
}
.max-h-\[80vh\] {
max-height: 80vh;
}
@@ -1446,6 +1454,19 @@ input:checked + .toggle-bg {
width: 100vw;
}
.w-min {
width: -moz-min-content;
width: min-content;
}
.w-8\/12 {
width: 66.666667%;
}
.w-6\/12 {
width: 50%;
}
.w-1\/4 {
width: 25%;
}
@@ -1474,6 +1495,10 @@ input:checked + .toggle-bg {
max-width: 1024px;
}
.max-w-xs {
max-width: 20rem;
}
.flex-1 {
flex: 1 1 0%;
}
@@ -1692,6 +1717,10 @@ input:checked + .toggle-bg {
place-items: center;
}
.content-center {
align-content: center;
}
.items-start {
align-items: flex-start;
}
@@ -3601,6 +3630,10 @@ input:checked + .toggle-bg {
padding: 1.5rem;
}
.sm\:p-12 {
padding: 3rem;
}
.sm\:py-5 {
padding-top: 1.25rem;
padding-bottom: 1.25rem;

View File

@@ -35,7 +35,8 @@
[datomic.api :as dc]
[hiccup2.core :as hiccup]
[malli.core :as mc]
[auto-ap.ssr.form-cursor :as fc]))
[auto-ap.ssr.form-cursor :as fc]
[clj-time.format :as f]))
(defn filters [request]
[:form {"hx-trigger" "change delay:500ms, keyup changed from:.hot-filter delay:1000ms"
@@ -328,8 +329,13 @@
"Save account"))]]))
(defn new-client-override [{ {:keys [index]} :query-params}]
(html-response
(client-override* {:db/id (str (java.util.UUID/randomUUID))})))
(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
(html-response
(fc/start-form account []
(fc/with-cursor (get-in fc/*current* [:account/client-overrides index])
(client-override* fc/*current*))))))
(defn account-edit-dialog [request]
(let [account (some-> request :route-params :db/id (#(dc/pull (dc/db conn) default-read %)))]