Revert "Prep to select more than 1 client"

This reverts commit 085486043f.
This commit is contained in:
Bryce Covert
2021-10-18 06:32:24 -07:00
parent 8ecd34f18c
commit 574023fea0
4 changed files with 323 additions and 312 deletions

View File

@@ -554,7 +554,6 @@
:profit_and_loss {:type :profit_and_loss_report :profit_and_loss {:type :profit_and_loss_report
:args {:client_id {:type :id} :args {:client_id {:type :id}
:client_ids {:type '(list :id)}
:periods {:type '(list :date_range)}} :periods {:type '(list :date_range)}}
:resolve :get-profit-and-loss} :resolve :get-profit-and-loss}

View File

@@ -183,14 +183,9 @@
(defn get-profit-and-loss [context args value] (defn get-profit-and-loss [context args value]
(let [client-id (:client_id args) (let [client-id (:client_id args)
client-ids (or (some-> client-id vector) _ (assert-can-see-client (:id context) client-id)
(:client_ids args)) all-ledger-entries (full-ledger-for-client client-id)
_ (when (not (seq client-ids)) lookup-account (build-account-lookup client-id)]
(throw (ex-info "Please select a client." {:validation-error "Please select a client."})))
_ (doseq [client-id client-ids]
(assert-can-see-client (:id context) client-id))
all-ledger-entries (full-ledger-for-client (first client-ids))
lookup-account (build-account-lookup (first client-ids))]
(->graphql (->graphql
{:periods (reduce (fn [acc {:keys [start end]}] {:periods (reduce (fn [acc {:keys [start end]}]
(conj acc (conj acc

View File

@@ -7,9 +7,8 @@
[auto-ap.utils :refer [dollars-0? by ]] [auto-ap.utils :refer [dollars-0? by ]]
[auto-ap.forms :as forms] [auto-ap.forms :as forms]
[auto-ap.views.pages.ledger.side-bar :refer [ledger-side-bar]] [auto-ap.views.pages.ledger.side-bar :refer [ledger-side-bar]]
[auto-ap.views.components.typeahead :refer [typeahead-v3]]
[auto-ap.views.components.modal :as modal] [auto-ap.views.components.modal :as modal]
[auto-ap.views.utils :refer [date->str date-picker date-picker-friendly bind-field standard pretty dispatch-event local-today ->% ->$ str->date with-user dispatch-value-change query-params]] [auto-ap.views.utils :refer [date->str date-picker bind-field standard pretty dispatch-event local-today ->% ->$ str->date with-user dispatch-value-change query-params]]
[cljs-time.core :as t] [cljs-time.core :as t]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[auto-ap.status :as status] [auto-ap.status :as status]
@@ -45,12 +44,9 @@
;; SUBS ;; SUBS
(re-frame/reg-sub (re-frame/reg-sub
::locations ::locations
:<- [::forms/form ::form]
(fn [db] (fn [db]
(->> db (->> db
:report ::report
:periods :periods
(mapcat :accounts) (mapcat :accounts)
(filter (comp in-range? :numeric-code)) (filter (comp in-range? :numeric-code))
@@ -67,6 +63,11 @@
"ZZZZZZ" "ZZZZZZ"
x)))))) x))))))
(re-frame/reg-sub
::report
(fn [db]
(-> db ::report)))
(re-frame/reg-sub (re-frame/reg-sub
::error ::error
(fn [db] (fn [db]
@@ -80,10 +81,9 @@
(re-frame/reg-sub (re-frame/reg-sub
::period-accounts ::period-accounts
:<- [::forms/form ::form]
(fn [db [_ which type only-location]] (fn [db [_ which type only-location]]
(->> (get-in db [:report :periods which :accounts]) (->> (get-in db [::report :periods which :accounts])
(map #(update % :amount js/parseFloat)) (map #(update % :amount js/parseFloat))
(filter (fn [{:keys [account-type location numeric-code]}] (filter (fn [{:keys [account-type location numeric-code]}]
(and (or (nil? only-location) (and (or (nil? only-location)
@@ -93,10 +93,9 @@
(re-frame/reg-sub (re-frame/reg-sub
::uncategorized-accounts ::uncategorized-accounts
:<- [::forms/form ::form]
(fn [db [_ ]] (fn [db [_ ]]
(->> (get-in db [:report :periods ]) (->> (get-in db [::report :periods ])
(mapcat :accounts) (mapcat :accounts)
(map #(update % :amount js/parseFloat)) (map #(update % :amount js/parseFloat))
(filter (fn [{:keys [account-type location numeric-code]}] (filter (fn [{:keys [account-type location numeric-code]}]
@@ -122,7 +121,6 @@
(re-frame/reg-sub (re-frame/reg-sub
::all-accounts ::all-accounts
:<- [::forms/form ::form]
(fn [db [_ which type only-location]] (fn [db [_ which type only-location]]
(transduce (transduce
(comp (comp
@@ -131,13 +129,12 @@
conj conj
[] []
(get-in db [:report :periods])))) (get-in db [::report :periods]))))
(re-frame/reg-event-db (re-frame/reg-event-db
::received ::received
[(forms/in-form ::form)]
(fn [db [_ data]] (fn [db [_ data]]
(-> db (assoc :report (:profit-and-loss data))))) (-> db (assoc ::report (:profit-and-loss data)))))
(re-frame/reg-sub (re-frame/reg-sub
::params ::params
@@ -162,53 +159,68 @@
(assoc db ::ledger-list-active? false))) (assoc db ::ledger-list-active? false)))
(re-frame/reg-event-fx (re-frame/reg-event-fx
::params-change ::mounted
[with-user (forms/in-form ::form)] (fn [{:keys [db]}]
(fn [{:keys [db user] :as cofx}] (let [qp (query-params)]
(let [c @(re-frame/subscribe [::subs/client])] (if (:periods qp)
(cond-> {:graphql {:token user (let [periods (mapv (fn [[start end title]]
:owns-state {:single ::page} [
:query-obj {:venia/queries [[:profit-and-loss (str->date start standard)
{:client-ids (or (some-> (:id c) vector) (str->date end standard)
(some-> (:id (:client (:data db))) title])
vector)) (:periods qp))]
:periods (mapv (fn [[start end] ] {:start (date->str start standard) :end (date->str end standard)} ) {:dispatch [::range-selected periods (:include-deltas qp) nil]})
(:periods (:data db)))} {:dispatch [::range-selected (and-last-year [(t/minus (local-today) (t/period :years 1)) (local-today)]) true nil]}))))
[[:periods [[:accounts [:name :amount :account-type :id :count :numeric-code :location]]]]]]]}
:on-success [::received]}
:set-uri-params {:periods (mapv (fn [[start end title]]
[(date->str start standard)
(date->str end standard)])
(:periods (:data db)))
:client (select-keys (:client (:data db))
[:name :id])}
:db (dissoc db :report)}))))
(re-frame/reg-event-db (re-frame/reg-event-db
::change ::period-inputs-change
(forms/change-handler ::form (fn [db [_ field value]]
(fn [data field value] (assoc-in db (into [::period-inputs ] field) value)))
(cond
(= [:periods] field)
[field (mapv (fn [period]
(mapv
(fn [dt]
(str->date dt standard))
period))
value)]
(and (= :periods (first field)) (re-frame/reg-event-fx
(= 2 (count field))) ::params-change
[field value] ;;already serialized (fn [cofx [_ params]]
(let [c @(re-frame/subscribe [::subs/client])]
(cond-> {:db (-> (:db cofx)
(assoc-in [::params] params)
(dissoc ::report))
:set-uri-params (update params
:periods
(fn [p]
(mapv (fn [[start end title]]
[(date->str start standard)
(date->str end standard)
title]
) p)))}
c (assoc :graphql (when @(re-frame/subscribe [::subs/client])
{:token (-> cofx :db :user)
:owns-state {:single ::page}
:query-obj {:venia/queries [[:profit-and-loss
{:client-id (:id c)
:periods (mapv (fn [[start end] ] {:start (date->str start standard) :end (date->str end standard)} )
(:periods params))}
[[:periods [[:accounts [:name :amount :account-type :id :count :numeric-code :location]]]]]]]}
:on-success [::received]}))))))
(= :periods (first field)) [field (str->date value standard) ]
:else nil)
)))
(re-frame/reg-event-fx
::date-picked
(fn [cofx [_ [_ period which] date]]
{:dispatch [::range-selected (assoc-in @(re-frame/subscribe [::periods]) [period which] (str->date date standard)) nil nil]}))
(re-frame/reg-event-fx
::range-selected
(fn [{:keys [db]} [_ periods include-deltas selected]]
{:dispatch [::params-change (cond-> @(re-frame/subscribe [::params])
true (assoc
:periods periods
:include-deltas include-deltas
:selected selected)
(not (nil? include-deltas)) (assoc :include-deltas include-deltas))]
:db (assoc db ::periods periods)}))
(defn data-params->query-params [params] (defn data-params->query-params [params]
@@ -276,7 +288,6 @@
:can-submit [::can-submit-period-form] :can-submit [::can-submit-period-form]
:id ::period-form})) :id ::period-form}))
;; 877 w fremont ave suite i4
(defn change-period-body [idx which] (defn change-period-body [idx which]
(let [{:keys [data active? error id]} @(re-frame/subscribe [::forms/form ::period-form]) (let [{:keys [data active? error id]} @(re-frame/subscribe [::forms/form ::period-form])
{:keys [form-inline horizontal-field field raw-field error-notification submit-button]} change-period-form] {:keys [form-inline horizontal-field field raw-field error-notification submit-button]} change-period-form]
@@ -308,23 +319,23 @@
}] )]))) }] )])))
(re-frame/reg-event-fx (re-frame/reg-event-fx
::period-change-submitted ::period-change-submitted
(fn [{:keys [db]} [_ idx [start end] :as z]] (fn [{:keys [db]} [_ idx which]]
{ :db (-> db (forms/stop-form ::period-form)) { :db (-> db (forms/stop-form ::period-form)
(assoc-in [::periods idx] which))
:dispatch-n [[::modal/modal-closed ] :dispatch-n [[::modal/modal-closed ]
[::change [:periods idx ] [start end]]]})) [::range-selected (assoc (::periods db) idx which) nil nil]]}))
(re-frame/reg-event-fx (re-frame/reg-event-fx
::period-removed ::period-removed
(fn [{:keys [db]} [_ idx which]] (fn [{:keys [db]} [_ idx which]]
{ :db (-> db (forms/stop-form ::period-form) { :db (-> db (forms/stop-form ::period-form)
(update-in [::forms/forms ::form :data :periods] (update ::periods (fn [ps]
(fn [ps] (->> ps
(->> ps (map vector (range) )
(map vector (range) ) (filter (fn [[i _]]
(filter (fn [[i _]] (not= i idx)))
(not= i idx))) (map second)
(map second) (into [])))))
(into [])))))
:dispatch [::modal/modal-closed ]})) :dispatch [::modal/modal-closed ]}))
(defn change-period-foot [idx which] (defn change-period-foot [idx which]
@@ -598,223 +609,249 @@
])) ]))
(re-frame/reg-sub
::can-submit
(fn [db]
true))
(def pnl-form (forms/vertical-form {:can-submit [::can-submit]
:change-event [::change]
:submit-event [::params-change]
:id ::form}))
(defn profit-and-loss-content [] (def profit-and-loss-content
(let [current-client @(re-frame/subscribe [::subs/client]) (with-meta
clients @(re-frame/subscribe [::subs/clients]) (fn []
user @(re-frame/subscribe [::subs/user]) (let [current-client @(re-frame/subscribe [::subs/client])
status @(re-frame/subscribe [::status/single ::page]) user @(re-frame/subscribe [::subs/user])
params @(re-frame/subscribe [::params]) status @(re-frame/subscribe [::status/single ::page])
unresolved-accounts @(re-frame/subscribe [::uncategorized-accounts]) params @(re-frame/subscribe [::params])
{:keys [data report active? error id]} @(re-frame/subscribe [::forms/form ::form]) period-inputs @(re-frame/subscribe [::period-inputs])
{:keys [form-inline field raw-field error-notification submit-button ]} pnl-form periods @(re-frame/subscribe [::periods])
periods (:periods data)] unresolved-accounts @(re-frame/subscribe [::uncategorized-accounts]) ]
(when data
(form-inline {} (if-not current-client
[:div [:div
[:h1.title "Profit and Loss - " (:name current-client)] [:h1.title "Profit and Loss " ]
[status/status-notification {:statuses [[::status/single ::page]]}] [:h2.title.is-4 "Please choose a client first"]]
[:div.report-controls
(when-not current-client [:div
[:<> [:h1.title "Profit and Loss - " (:name current-client)]
[:h2.title.is-4 "Entities"] [status/status-notification {:statuses [[::status/single ::page]]}]
(raw-field [:div.report-controls
[typeahead-v3 {:entities @(re-frame/subscribe [::subs/clients]) [:h2.title.is-4 "Range"]
:entity->text :name [:div
:type "typeahead-v3" [:div.field.is-grouped
:field [:client]}])]) [:div.control
[:h2.title.is-4 "Range"] [:div.field.has-addons
[:div [:div.control
[:div.field.is-grouped [bind-field
[:div.control [date-picker {:class-name "input"
[:div.field.has-addons :class "input"
[:div.control :format-week-number (fn [] "")
(raw-field :previous-month-button-label ""
[date-picker-friendly {:placeholder "End date" :placeholder "End date"
:type "date" :next-month-button-label ""
:field [:thirteen-periods-end]}])] :next-month-label ""
[:div.control :type "date"
[:a.button :field [:thirteen-periods-end]
{:class (when (= (:selected params) "13 periods") "is-active") :subscription period-inputs
:on-click (dispatch-event :event [::period-inputs-change]}]]]
[::forms/change ::form [:div.control
[:periods] [:a.button
(let [today (or (some-> (:thirteen-periods-end data) (str->date standard)) {:class (when (= (:selected params) "13 periods") "is-active")
(local-today))] :on-click (dispatch-event
(into [::range-selected
[[(t/plus (t/minus today (t/weeks (* 13 4))) (let [today (or (some-> (:thirteen-periods-end period-inputs) (str->date standard))
(t/days 1)) (local-today))]
today (into
"Total"]] [[(t/plus (t/minus today (t/weeks (* 13 4)))
(for [i (range 13)] (t/days 1))
[(t/plus (t/minus today (t/weeks (* (inc i) 4))) today
(t/days 1)) "Total"]]
(t/minus today (t/weeks (* i 4)))])))])} (for [i (range 13)]
"13 periods"]]]] [(t/plus (t/minus today (t/weeks (* (inc i) 4)))
(t/days 1))
(t/minus today (t/weeks (* i 4)))])))
false
"13 periods"])}
"13 periods"]]]]
[:div.control [:div.control
[:div.field.has-addons [:div.field.has-addons
[:div.control [:div.control
(raw-field [bind-field
[date-picker-friendly {:placeholder "End date" [date-picker {:class-name "input"
:type "date" :class "input"
:field [:twelve-periods-end]}]) :format-week-number (fn [] "")
] :previous-month-button-label ""
[:div.control :placeholder "End date"
[:a.button :next-month-button-label ""
{:class (when (= (:selected params) "13 periods") "is-active") :next-month-label ""
:on-click (dispatch-event :type "date"
[::forms/change ::form :field [:twelve-periods-end]
[:periods] :subscription period-inputs
(let [end-date (or (some-> (:twelve-periods-end data) (str->date standard)) :event [::period-inputs-change]}]]]
(local-today)) [:div.control
this-month (t/local-date (t/year end-date) [:a.button
(t/month end-date) {:class (when (= (:selected params) "13 periods") "is-active")
1) :on-click (dispatch-event
] [::range-selected
(into (let [end-date (or (some-> (:twelve-periods-end period-inputs) (str->date standard))
[[(t/minus this-month (t/months 11)) (local-today))
(t/minus (t/plus this-month (t/months 1)) this-month (t/local-date (t/year end-date)
(t/days 1)) (t/month end-date)
"Total"]] 1)
(for [i (range 12)] ]
[(t/minus this-month (t/months (- 11 i))) (into
(t/minus (t/minus this-month (t/months (- 10 i))) [[(t/minus this-month (t/months 11))
(t/days 1))])))])} (t/minus (t/plus this-month (t/months 1))
"12 months"]]]] (t/days 1))
"Total"]]
(for [i (range 12)]
[(t/minus this-month (t/months (- 11 i)))
(t/minus (t/minus this-month (t/months (- 10 i)))
(t/days 1))])))
false
"12 months"]
)}
"12 months"]]]]
[:div.control [:div.control
[:a.button [:a.button
{:class (when (= (:selected params) "Last week") "is-active") {:class (when (= (:selected params) "Last week") "is-active")
:on-click (dispatch-event :on-click (dispatch-event
[::forms/change ::form (let [last-sunday (loop [current (local-today)]
[:periods] (if (= 7 (t/day-of-week current))
(let [last-sunday (loop [current (local-today)] current
(if (= 7 (t/day-of-week current)) (recur (t/minus current (t/period :days 1)))))]
current [::range-selected
(recur (t/minus current (t/period :days 1)))))] (and-last-year [(t/minus last-sunday (t/period :days 6)) last-sunday])
true
(and-last-year [(t/minus last-sunday (t/period :days 6)) last-sunday]))])} "Last week"]))}
"Last week"]] "Last week"]]
[:div.control [:div.control
[:a.button [:a.button
{:class (when (= (:selected params) "Week to date") "is-active") {:class (when (= (:selected params) "Week to date") "is-active")
:on-click (dispatch-event :on-click (dispatch-event [::range-selected
[::forms/change ::form (and-last-year [(loop [current (local-today)]
[:periods] (if (= 1 (t/day-of-week current))
(and-last-year [(loop [current (local-today)] current
(if (= 1 (t/day-of-week current)) (recur (t/minus current (t/period :days 1)))))
current (local-today)])
(recur (t/minus current (t/period :days 1))))) true
(local-today)])])} "Week to date"])}
"Week to date"]] "Week to date"]]
[:div.control [:div.control
[:a.button [:a.button
{:class (when (= (:selected params) "Last Month") "is-active") {:class (when (= (:selected params) "Last Month") "is-active")
:on-click (dispatch-event :on-click (dispatch-event [::range-selected
(and-last-year [(t/minus (t/local-date (t/year (local-today))
(t/month (local-today))
1)
(t/period :months 1))
(t/minus (t/local-date (t/year (local-today))
(t/month (local-today))
1)
(t/period :days 1))])
true
"Last Month"])}
"Last Month"]]
[:div.control
[:a.button
{:class (when (= (:selected params) "Month to date") "is-active")
:on-click (dispatch-event [::range-selected
(and-last-year [(t/local-date (t/year (local-today))
(t/month (local-today))
1)
(local-today)])
true
"Month to date"])}
"Month to date"]]
[:div.control
[:a.button
{:class (when (= (:selected params) "Year to date") "is-active")
:on-click (dispatch-event [::range-selected
(and-last-year [(t/local-date (t/year (local-today)) 1 1)
(local-today)])
true
"Year to date"])}
"Year to date"]]
[:div.control
[:a.button
{:class (when (= (:selected params) "Full year") "is-active")
:on-click (dispatch-event [::range-selected
(and-last-year [(t/plus (t/minus (local-today) (t/period :years 1))
(t/period :days 1))
(local-today)])
true
"Full year"])}
"Full year"]]]]
[:div
[:div.field
[:label.checkbox
[bind-field
[:input {:type "checkbox"
:field [:show-advanced?]
:event [::period-inputs-change]
:subscription period-inputs}]]
" Show Advanced"]]]
(when (:show-advanced? period-inputs)
(for [[_ i] (map vector periods (range))]
^{:key i}
[:div.field.is-grouped
[:div.control
[:p.help "From"]
[bind-field
[date-picker {:class-name "input"
:class "input"
:format-week-number (fn [] "")
:previous-month-button-label ""
:placeholder "mm/dd/yyyy"
:next-month-button-label ""
:next-month-label ""
:type "date"
:field [:periods i 0]
:event [::date-picked]
:popper-props (clj->js {:placement "right"})
:subscription params}]]]
[::forms/change ::form [:div.control
[:periods] [:p.help "To"]
(and-last-year [(t/minus (t/local-date (t/year (local-today)) [bind-field
(t/month (local-today)) [date-picker {:class-name "input"
1) :class "input"
(t/period :months 1)) :format-week-number (fn [] "")
(t/minus (t/local-date (t/year (local-today)) :previous-month-button-label ""
(t/month (local-today)) :placeholder "mm/dd/yyyy"
1) :next-month-button-label ""
(t/period :days 1))])])} :next-month-label ""
"Last Month"]] :type "date"
[:div.control :field [:periods i 1]
[:a.button :event [::date-picked]
{:class (when (= (:selected params) "Month to date") "is-active") :popper-props (clj->js {:placement "right"})
:on-click (dispatch-event :subscription params}]]]]))]
[::forms/change ::form [status/big-loader status]
[:periods] (when (not= :loading (:state status))
(and-last-year [(t/local-date (t/year (local-today)) [:div
(t/month (local-today)) (when (seq unresolved-accounts)
1) [:div.notification.is-warning.is-light
(local-today)])] "This report does not include " (str/join ", "
)} (map #(str (:count %) " unresolved ledger entries for " (if (str/blank? (:location %))
"Month to date"]] " all locations"
[:div.control (:location %)))
[:a.button unresolved-accounts))])
{:class (when (= (:selected params) "Year to date") "is-active") [:<>
:on-click (dispatch-event (for [location @(re-frame/subscribe [::locations])]
[::forms/change ::form ^{:key (str location "-summary")}
[:periods] [location-summary location params]
(and-last-year [(t/local-date (t/year (local-today)) 1 1) )]
(local-today)])])} [:h2.title.is-4 {:style {:margin-bottom "1rem"}} "Detail"]
"Year to date"]] [:table.table.compact.balance-sheet
[:div.control [:tbody
[:a.button [period-header {:include-deltas (:include-deltas params)
{:class (when (= (:selected params) "Full year") "is-active") :periods periods}]
:on-click (dispatch-event
[::forms/change ::form [:<>
[:periods] (for [location @(re-frame/subscribe [::locations])]
(and-last-year [(t/plus (t/minus (local-today) (t/period :years 1)) ^{:key location}
(t/period :days 1)) [location-rows location]
(local-today)])])} )]]]])])))
"Full year"]]]] {:component-will-mount #(re-frame/dispatch [::mounted]) }))
[:div
[:div.field
[:label.checkbox
(raw-field
[:input {:type "checkbox"
:field [:show-advanced?]}])
" Show Advanced"]]]
(when (:show-advanced? data)
(doall
(for [[_ i] (map vector periods (range))]
^{:key i}
[:div.field.is-grouped
[:div.control
[:p.help "From"]
(raw-field
[date-picker-friendly {:type "date"
:field [:periods i 0]}])]
[:div.control
[:p.help "To"]
(raw-field
[date-picker-friendly {:type "date"
:field [:periods i 1]}])]])))
(submit-button "Run")]
[status/big-loader status]
(when (and (not= :loading (:state status))
report)
[:div
(when (seq unresolved-accounts)
[:div.notification.is-warning.is-light
"This report does not include " (str/join ", "
(map #(str (:count %) " unresolved ledger entries for " (if (str/blank? (:location %))
" all locations"
(:location %)))
unresolved-accounts))])
[:<>
(for [location @(re-frame/subscribe [::locations])]
^{:key (str location "-summary")}
[location-summary location params]
)]
[:h2.title.is-4 {:style {:margin-bottom "1rem"}} "Detail"]
[:table.table.compact.balance-sheet
[:tbody
[period-header {:include-deltas (:include-deltas params)
:periods periods}]
[:<>
(for [location @(re-frame/subscribe [::locations])]
^{:key location}
[location-rows location])]]]])]))))
(re-frame/reg-event-fx (re-frame/reg-event-fx
::unmounted-pnl ::unmounted-pnl
@@ -825,18 +862,9 @@
(re-frame/reg-event-fx (re-frame/reg-event-fx
::mounted-pnl ::mounted-pnl
(fn [{:keys [db]} _] (fn [{:keys [db]} _]
(let [qp (query-params)] {::track/register {:id ::ledger-params
{:db (forms/start-form db ::form {:periods (->> qp :subscription [::data-page/params ::ledger]
:periods :event-fn (fn [params] [::ledger-params-change params])}}))
(mapv (fn [period]
(mapv
(fn [dt]
(str->date dt standard))
period))))
:client (:client qp)})
::track/register {:id ::ledger-params
:subscription [::data-page/params ::ledger]
:event-fn (fn [params] [::ledger-params-change params])}})))
(defn ledger-list [_ ] (defn ledger-list [_ ]
[:div [:a.delete.is-pulled-right {:on-click (dispatch-event [::ledger-list-closing])}] [:div [:a.delete.is-pulled-right {:on-click (dispatch-event [::ledger-list-closing])}]

View File

@@ -435,17 +435,6 @@
(do (do
(reagent/adapt-react-class (.-default react-datepicker)))) (reagent/adapt-react-class (.-default react-datepicker))))
(defn date-picker-friendly [params]
[date-picker (assoc params
:class-name "input"
:class "input"
:format-week-number (fn [] "")
:previous-month-button-label ""
:next-month-button-label ""
:next-month-label ""
:type "date")])
(defn local-now [] (defn local-now []
(t/to-default-time-zone (t/now))) (t/to-default-time-zone (t/now)))