This commit is contained in:
2022-10-15 21:41:18 -07:00
parent 560218728f
commit fb607b3345

View File

@@ -68,7 +68,7 @@
:location :location
[:account [:numeric-code :name]]]]]]]} [:account [:numeric-code :name]]]]]]]}
:on-success [::received]} :on-success [::received]}
:set-uri-params {:date-range (:date-range (:data db)) :set-uri-params {:date-range (encode-period (:date-range (:data db)))
:clients (mapv #(select-keys (:client %) [:name :id]) (:clients (:data db))) } :clients (mapv #(select-keys (:client %) [:name :id]) (:clients (:data db))) }
:db (-> db :db (-> db
(dissoc :report) (dissoc :report)
@@ -129,7 +129,8 @@ NOTE: Please review the transactions we may have question for you here: https://
::change ::change
[with-user (forms/in-form ::form)] [with-user (forms/in-form ::form)]
(fn [{:keys [db]} [_ & event]] (fn [{:keys [db]} [_ & event]]
{:db (dissoc db :report)})) {:db (dissoc db :report)
:dispatch (into [::forms/change ::form] event)}))
(defn report-control-detail [{:keys [active box which]} children] (defn report-control-detail [{:keys [active box which]} children]
(when (and @box (when (and @box
@@ -225,7 +226,7 @@ NOTE: Please review the transactions we may have question for you here: https://
(fn [{:keys [db]} _] (fn [{:keys [db]} _]
(let [qp (query-params)] (let [qp (query-params)]
{:db (forms/start-form db ::form {:date-range {:end (local-now) {:db (forms/start-form db ::form {:date-range {:end (local-now)
:start (t/minus (local-now) (t/years 1))} :start (t/minus (local-now) (t/weeks 2))}
:clients (mapv (fn [c] {:client c :id (random-uuid)}) :clients (mapv (fn [c] {:client c :id (random-uuid)})
(or (:clients qp) (or (:clients qp)
[(some-> @(re-frame/subscribe [::subs/client]) (select-keys [:name :id]) )]))}) [(some-> @(re-frame/subscribe [::subs/client]) (select-keys [:name :id]) )]))})