Allows for deleting of transaction rules

This commit is contained in:
2023-11-03 16:53:36 -07:00
parent 3f7f0a0aaf
commit 320d7c73df
6 changed files with 55 additions and 36 deletions

View File

@@ -15,9 +15,10 @@
[cemerick.url :as url]
[clojure.string :as str]
[hiccup2.core :as hiccup]
[malli.transform :as mt2]))
[malli.transform :as mt2]
[auto-ap.ssr.hiccup-helper :as hh]))
(defn row* [gridspec user entity {:keys [flash? delete-after-settle? request] :as options}]
(defn row* [gridspec user entity {:keys [flash? delete-after-settle? request class] :as options}]
(let [cells (->> gridspec
:headers
(filter (fn [h]
@@ -35,8 +36,8 @@
[:input {:type :hidden :name "id" :value ((:id-fn gridspec) entity)}]]
((:row-buttons gridspec) request entity))))] ;; TODO double check usage of row buttons user and identity in callers
(apply com/data-grid-row
{:class (when flash?
"live-added")
{:class (cond-> (or class "")
flash? (hh/add-class "live-added"))
"_" (hiccup/raw (when delete-after-settle?
" on htmx:afterSettle wait 400ms then remove me"))