diff --git a/src/clj/auto_ap/ssr/utils.clj b/src/clj/auto_ap/ssr/utils.clj index ef21be4c..b6123de3 100644 --- a/src/clj/auto_ap/ssr/utils.clj +++ b/src/clj/auto_ap/ssr/utils.clj @@ -240,7 +240,7 @@ (if date-range-value (-> (condp = date-range-value "week" - (let [last-monday (atime/last-monday)] + (let [last-monday (coerce/to-date-time (atime/last-monday))] (assoc m start-date-key (time/plus last-monday (time/days -7)) end-date-key last-monday)) @@ -248,16 +248,16 @@ "month" (assoc m start-date-key (time/plus (time/now) (time/months -1)) - end-date-key (time/now)) + end-date-key nil) "year" (assoc m start-date-key (time/plus (time/now) (time/years -1)) - end-date-key (time/now)) + end-date-key nil) "all" (assoc m start-date-key (time/plus (time/now) (time/years -6)) - end-date-key (time/now)) + end-date-key nil) m) (dissoc date-range-key)) diff --git a/src/cljs/auto_ap/views/components/layouts.cljs b/src/cljs/auto_ap/views/components/layouts.cljs index 1d16b1cb..86f037de 100644 --- a/src/cljs/auto_ap/views/components/layouts.cljs +++ b/src/cljs/auto_ap/views/components/layouts.cljs @@ -177,7 +177,7 @@ "Home" ] (when (p/can? @user {:subject :invoice-page}) [:a.navbar-item {:class [(active-when ap #{:unpaid-invoices :paid-invoices})] - :href (str (bidi/path-for ssr-routes/only-routes ::invoice-routes/unpaid-page) "?date-range=month")} + :href (str (bidi/path-for ssr-routes/only-routes ::invoice-routes/unpaid-page) "?date-range=year")} "Invoices" ]) (when (p/can? @user {:subject :payment-page}) [:a.navbar-item {:class [(active-when ap = :payments)]