Makes feature flags admin-configurable
This commit is contained in:
@@ -66,9 +66,10 @@
|
||||
id (or (:db/id client) "new-client")
|
||||
signature-file (upload-signature-data (:signature_data edit_client))
|
||||
_ (when client
|
||||
(audit-transact (into
|
||||
(mapv (fn [lm] [:db/retractEntity (:db/id lm)]) (:client/location-matches client))
|
||||
(mapv (fn [m] [:db/retract (:db/id client) :client/matches m]) (:client/matches client)))
|
||||
(audit-transact (-> []
|
||||
(into (mapv (fn [lm] [:db/retractEntity (:db/id lm)]) (:client/location-matches client)))
|
||||
(into (mapv (fn [m] [:db/retract (:db/id client) :client/matches m]) (:client/matches client)))
|
||||
(into (mapv (fn [m] [:db/retract (:db/id client) :client/feature-flags m]) (:client/feature-flags client))))
|
||||
(:id context)))
|
||||
reverts (-> []
|
||||
(into (->> (:bank_accounts edit_client)
|
||||
@@ -129,6 +130,7 @@
|
||||
:address/city (:city (:address edit_client))
|
||||
:address/state (:state (:address edit_client))
|
||||
:address/zip (:zip (:address edit_client))})
|
||||
:client/feature-flags (:feature_flags edit_client)
|
||||
:client/bank-accounts (map #(remove-nils
|
||||
(cond-> {:db/id (:id %)
|
||||
:bank-account/code (:code %)
|
||||
@@ -155,6 +157,7 @@
|
||||
(:bank_accounts edit_client))
|
||||
|
||||
})
|
||||
|
||||
[:reset id :client/emails (map #(remove-nils
|
||||
{:db/id (or (:id %)
|
||||
(str (UUID/randomUUID)))
|
||||
@@ -474,6 +477,7 @@
|
||||
:name {:type 'String}
|
||||
:locked_until {:type :iso_date}
|
||||
:code {:type 'String}
|
||||
:feature_flags {:type '(list String)}
|
||||
:square_auth_token {:type 'String}
|
||||
:signature_file {:type 'String}
|
||||
:square_integration_status {:type :integration_status}
|
||||
@@ -562,6 +566,7 @@
|
||||
:locked_until {:type :iso_date}
|
||||
:code {:type 'String}
|
||||
:square_auth_token {:type 'String}
|
||||
:feature_flags {:type '(list String)}
|
||||
:signature_data {:type 'String}
|
||||
:email {:type 'String}
|
||||
:emails {:type '(list :edit_email_contact)}
|
||||
|
||||
@@ -100,8 +100,7 @@ document.getElementById(\"company-search-value\").dispatchEvent(new Event('chang
|
||||
[:div.loader.is-loading.is-active.is-centered]])))
|
||||
|
||||
(defn active-client [{:keys [identity params] :as request}]
|
||||
(clojure.pprint/pprint params)
|
||||
(let [client-id (some-> (or (:search-client params) (get params "search-client")) Long/parseLong)]
|
||||
(let [client-id (some-> (or (:search-client params) (get params "search-client")) not-empty Long/parseLong)]
|
||||
(when client-id
|
||||
(assert-can-see-client identity client-id))
|
||||
(let [new-session (assoc (:session request) :client
|
||||
|
||||
Reference in New Issue
Block a user