Vendors form progress

This commit is contained in:
2023-11-02 23:40:24 -07:00
parent 99e4f05769
commit eef1cfb919
16 changed files with 846 additions and 425 deletions

View File

@@ -21,7 +21,7 @@
strip
wrap-entity
wrap-form-4xx-2
wrap-schema-decode]]
wrap-schema-enforce]]
[bidi.bidi :as bidi]
[clojure.string :as str]
[datomic.api :as dc]
@@ -365,18 +365,18 @@
:company-1099-vendor-table vendor-table
:company-1099-vendor-dialog (-> vendor-dialog
(wrap-entity [:route-params :vendor-id] default-vendor-read)
(wrap-schema-decode :route-schema [:map [:vendor-id entity-id]]
(wrap-schema-enforce :route-schema [:map [:vendor-id entity-id]]
:query-schema [:map [:client-id entity-id]]))
:company-1099-vendor-save (-> vendor-save
(wrap-entity [:form-params :db/id] default-vendor-read)
(wrap-schema-decode :form-schema form-schema
(wrap-schema-enforce :form-schema form-schema
:route-schema [:map [:vendor-id entity-id]]
:query-schema [:map [:client-id entity-id]])
(wrap-nested-form-params)
(wrap-form-4xx-2 (-> vendor-dialog
(wrap-entity [:form-params :db/id] default-vendor-read)
(wrap-entity [:route-params :vendor-id] default-vendor-read)
(wrap-schema-decode :route-schema [:map [:vendor-id entity-id]]
(wrap-schema-enforce :route-schema [:map [:vendor-id entity-id]]
:query-schema [:map [:client-id entity-id]]))))})
(fn [h]
(-> h