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

@@ -46,7 +46,8 @@
[malli.core :as mc]
[malli.util :as mut]
[slingshot.slingshot :refer [try+]]
[malli.error :as me]))
[malli.error :as me]
[auto-ap.solr :as solr]))
(defn filters [request]
[:form {"hx-trigger" "change delay:500ms, keyup changed from:.hot-filter delay:1000ms"
@@ -216,23 +217,12 @@
updated-vendor (dc/pull (dc/db conn)
default-read
(or (get tempids (:db/id entity)) (:db/id entity)))]
#_(solr/index-documents-raw solr/impl
"accounts"
(into [{"id" (:db/id updated-account)
"account_id" (:db/id updated-account)
"name" (:account/name updated-account)
"numeric_code" (:account/numeric-code updated-account)
"location" (:account/location updated-account)
"applicability" (some-> updated-account :account/applicability clojure.core/name)}]
(for [o (:account/client-overrides updated-account)]
{"id" (:db/id o)
"account_id" (:db/id updated-account)
"name" (:account-client-override/name o)
"numeric_code" (:account/numeric-code updated-account)
"location" (:account/location updated-account)
"applicability" (clojure.core/name (:account/applicability updated-account))
"client_id" (:db/id (:account-client-override/client o))
"account_client_override_id" (:db/id o)})))
(solr/index-documents-raw
solr/impl
"vendors"
[{"id" (:db/id updated-vendor)
"name" (:vendor/name updated-vendor)
"hidden" (boolean (:vendor/hidden updated-vendor))}])
(html-response
(row* identity updated-vendor {:flash? true})
:headers (cond-> {"hx-trigger" "modalclose"}
@@ -397,8 +387,6 @@
(com/data-grid-cell {:class "align-top"}
(com/a-icon-button {"@click.prevent.stop" "show=false; setTimeout(() => $refs.p.remove(), 500)"} svg/x)))))
;; TODO when a validation fails, only re render that page
(defn terms-modal [{:keys [form-errors entity form-params]}]
(com/stacked-modal-card-2
1