moved to new date picker.

This commit is contained in:
2022-07-17 08:28:35 -07:00
parent eba3a5dce3
commit d97d70e08f
14 changed files with 193 additions and 338 deletions

View File

@@ -13,11 +13,9 @@
[auto-ap.views.pages.ledger.side-bar :refer [ledger-side-bar]]
[auto-ap.views.pages.ledger.table :as ledger-table]
[auto-ap.views.utils
:refer [date->str
date-picker-friendly
:refer [date-picker
dispatch-event
local-now
standard
with-user]]
[cljs-time.core :as t]
[clojure.set :as set]
@@ -78,9 +76,7 @@
:graphql {:token user
:query-obj {:venia/queries [[:balance-sheet
(-> (:data db)
(assoc :client-id (:id client))
(update :date (fnil #(date->str % standard) nil))
(update :comparison-date (fnil #(date->str % standard) nil)))
(assoc :client-id (:id client)))
[[:balance-sheet-accounts [:name :amount :account-type :id :numeric-code]]
[:comparable-balance-sheet-accounts [:name :amount :account-type :id :numeric-code]]]]]}
@@ -122,9 +118,7 @@ NOTE: Please review the transactions we may have question for you here: https://
:graphql {:token user
:query-obj {:venia/queries [[:balance-sheet-pdf
(-> (:data db)
(assoc :client-id (:id client))
(update :date (fnil #(date->str % standard) nil))
(update :comparison-date (fnil #(date->str % standard) nil)))
(assoc :client-id (:id client)))
[:url :name]]]}
:owns-state {:single ::page}
@@ -139,7 +133,7 @@ NOTE: Please review the transactions we may have question for you here: https://
:from-numeric-code from-numeric-code
:to-numeric-code to-numeric-code
:date-range {:start "2000-01-01"
:end (date->str date-range standard)}}]}))
:end date-range}}]}))
(re-frame/reg-event-fx
::ledger-params-change
@@ -206,9 +200,9 @@ NOTE: Please review the transactions we may have question for you here: https://
[:div.control
[:p.help "Date"]
(raw-field
[date-picker-friendly {:cljs-date? true
:type "date"
:field [:date]}])]]
[date-picker {:output :cljs-date
:type "date"
:field [:date]}])]]
[:div.level-item
[:div.control
[:div.mt-3]
@@ -224,9 +218,9 @@ NOTE: Please review the transactions we may have question for you here: https://
[:div.control
[:p.help "Comparison Date"]
(raw-field
[date-picker-friendly {:cljs-date? true
:type "date"
:field [:comparison-date]}])])]]
[date-picker {:output :cljs-date
:type "date"
:field [:comparison-date]}])])]]
[:div.level-right
[:div.buttons