From fb607b3345af06796e341328bd2bbeba41aa6086 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sat, 15 Oct 2022 21:41:18 -0700 Subject: [PATCH] Bugged --- .../auto_ap/views/pages/ledger/profit_and_loss_detail.cljs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs index f6b9d126..bbc20edd 100644 --- a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs +++ b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss_detail.cljs @@ -68,7 +68,7 @@ :location [:account [:numeric-code :name]]]]]]]} :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))) } :db (-> db (dissoc :report) @@ -129,7 +129,8 @@ NOTE: Please review the transactions we may have question for you here: https:// ::change [with-user (forms/in-form ::form)] (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] (when (and @box @@ -225,7 +226,7 @@ NOTE: Please review the transactions we may have question for you here: https:// (fn [{:keys [db]} _] (let [qp (query-params)] {: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)}) (or (:clients qp) [(some-> @(re-frame/subscribe [::subs/client]) (select-keys [:name :id]) )]))})