le boulanger, others.

This commit is contained in:
Bryce Covert
2019-11-01 17:29:16 -07:00
parent 806e882d5c
commit fdf1dab0ac
7 changed files with 65 additions and 8 deletions

View File

@@ -27,12 +27,15 @@
_ (println edit_client)
_ (when client
@(d/transact (d/connect uri)
(mapv (fn [lm] [:db/retractEntity (:db/id lm)]) (:client/location-matches client))))
(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)))))
transactions [(remove-nils {:db/id id
:client/code (if (str/blank? (:client/code client))
(:code edit_client)
(:client/code client))
:client/name (:name edit_client)
:client/matches (:matches edit_client)
:client/email (:email edit_client)
:client/locations (filter identity (:locations edit_client))
:client/location-matches (->> (:location_matches edit_client)