All of my company works spame way

This commit is contained in:
Bryce
2023-05-30 14:36:34 -07:00
parent b5e78da9d0
commit 721bbaea53
6 changed files with 229 additions and 226 deletions

View File

@@ -12,7 +12,9 @@
(defn row* [gridspec user entity {:keys [flash? delete-after-settle?] :as options}]
(let [cells (mapv (fn [header]
(com/data-grid-cell {}
(com/data-grid-cell {:class (if-let [show-starting (:show-starting header)]
(format "hidden %s:table-cell" show-starting)
(:class header))}
((:render header) entity)))
(:headers gridspec))
cells (conj cells (com/data-grid-right-stack-cell {}
@@ -24,7 +26,8 @@
"live-added")
"_" (hiccup/raw (when delete-after-settle?
" on htmx:afterSettle wait 400ms then remove me"))
}
:data-id ((:id-fn gridspec) entity)}
cells)))
(defn sort-icon [sort key]
@@ -48,7 +51,7 @@
))
"default sort"))
(defn table* [grid-spec user {:keys [start per-page client flash-id sort]}]
(defn table* [grid-spec user {:keys [start per-page client flash-id sort request]}]
(let [start (or start 0)
per-page (or per-page 30)
[entities total] ((:fetch-page grid-spec)
@@ -56,7 +59,8 @@
{:start start
:per-page per-page
:client-id (:db/id client)
:sort sort})]
:sort sort
:request request})]
(com/data-grid-card {:id (:id grid-spec)
:title (:title grid-spec)
:route (:route grid-spec)