Revert "Enabling signature editing."

This reverts commit bc40430d7b.
This commit is contained in:
Bryce Covert
2020-12-21 08:46:24 -08:00
parent 001ab64776
commit b52f3231e8
17 changed files with 140 additions and 1917 deletions

View File

@@ -5,7 +5,6 @@ phases:
runtime-versions:
docker: 19
java: corretto8
nodejs: 12
pre_build:
commands:
@@ -19,7 +18,6 @@ phases:
- chmod +x lein
build:
commands:
- npm install
- ./lein build
- cp imagedefinitions.json target/
- echo Build started on `date`

View File

@@ -1,8 +1,2 @@
{:main auto-ap.core
:target :bundle
:output-to "resources/public/js/compiled/app.js"
:output-dir "resources/public/js/compiled/"
:infer-externs true
:bundle-cmd {:none ["npx" "webpack" "--mode=production" :output-to
"--output-path" :final-output-dir
"--output-filename" :final-output-filename]}}
:output-to "resources/public/js/compiled/app.js"}

1667
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +0,0 @@
{
"name": "integreat",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"test": "test"
},
"dependencies": {
"dropzone": "^4.3.0",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-datepicker": "^2.1.0",
"react-dom": "^17.0.1",
"react-prop-types": "^0.4.0",
"react-signature-canvas": "^1.0.3",
"react-signature-pad": "0.0.6",
"react-transition-group": "^2.4.0",
"recharts": "^1.4.2"
},
"devDependencies": {
"webpack": "^5.11.0",
"webpack-cli": "^4.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+ssh://git@bitbucket.org/brycecovertoperations/integreat.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"homepage": "https://bitbucket.org/brycecovertoperations/integreat#readme"
}

View File

@@ -6,7 +6,7 @@
:username "datomic@brycecovertoperations.com"
:password "9a382afc-d119-44db-83c2-98d8057d7666"}}
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.764"]
[org.clojure/clojurescript "1.10.339"]
[postgresql/postgresql "9.3-1102.jdbc41"]
[com.datomic/datomic-pro "0.9.5703" :exclusions [com.google.guava/guava org.apache.httpcomponents/httpclient]]
[compojure "1.6.1" :exclusions [ring]]
@@ -26,7 +26,8 @@
[yogthos/config "0.8"]
[dk.ative/docjure "1.12.0"]
[org.clojure/java.jdbc "0.7.3"]
[cljsjs/dropzone "4.3.0-0"]
[cljsjs/recharts "1.4.2-0" :exclusions [cljsjs/react cljsjs/react-dom]]
[clj-fuzzy "0.4.1"]
[honeysql "0.9.2"]
[com.walmartlabs/lacinia "0.25.0"]
@@ -80,8 +81,7 @@
:source-paths ["src/clj" "src/cljc" "src/cljs"]
:resource-paths ["resources"]
:aliases {"build" ["do" "clean" ["uberjar"]]
"fig:dev" ["run" "-m" "figwheel.main" "-b" "dev" "-r"]
"fig:min" ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}
"fig:min" ["run" "-m" "figwheel.main" "-bo" "min"]}
:profiles
{:dev
@@ -90,42 +90,56 @@
{:resource-paths ["resources" "target"]
:dependencies [[binaryage/devtools "0.9.4"]
#_[refactor-nrepl "2.5.0"]
[com.bhauman/figwheel-main "0.2.12" :exclusions [org.clojure/clojurescript
ring/ring-core
ring/ring-codec
ring.adapter.jetty
binaryage/devtools
commons-io
commons-codec
com.fasterxml.jackson.core/jackson-core
org.clojure/tools.namespace
org.eclipse.jetty.websocket/websocket-server
org.eclipse.jetty.websocket/websocket-servlet
args4j]]
[com.bhauman/figwheel-main "0.2.3" :exclusions [org.clojure/clojurescript
ring/ring-core
ring/ring-codec
ring.adapter.jetty
binaryage/devtools
commons-io
commons-codec
com.fasterxml.jackson.core/jackson-core
org.clojure/tools.namespace
org.eclipse.jetty.websocket/websocket-server
org.eclipse.jetty.websocket/websocket-servlet
args4j]]
[com.bhauman/rebel-readline-cljs "0.1.4"]
[javax.servlet/servlet-api "2.5"]]
:plugins [
[lein-pdo "0.1.1"]]
:jvm-opts ["-Dconfig=config/dev.edn" "--add-modules" "java.xml.bind"]}
:uberjar {:prep-tasks ["fig:min" ]
:dependencies [[com.bhauman/figwheel-main "0.2.12" :exclusions [org.clojure/clojurescript
ring/ring-core
ring/ring-codec
ring.adapter.jetty
binaryage/devtools
commons-io
commons-codec
com.fasterxml.jackson.core/jackson-core
org.clojure/tools.namespace
org.eclipse.jetty.websocket/websocket-server
org.eclipse.jetty.websocket/websocket-servlet
args4j]]]}
:provided {:dependencies [[org.clojure/clojurescript "1.10.764"]
[reagent "1.0.0-alpha2" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server] ]
:dependencies [[com.bhauman/figwheel-main "0.2.3" :exclusions [org.clojure/clojurescript
ring/ring-core
ring/ring-codec
ring.adapter.jetty
binaryage/devtools
commons-io
commons-codec
com.fasterxml.jackson.core/jackson-core
org.clojure/tools.namespace
org.eclipse.jetty.websocket/websocket-server
org.eclipse.jetty.websocket/websocket-servlet
args4j]]]}
:provided {:dependencies [[org.clojure/clojurescript "1.10.339"]
[reagent "1.0.0-alpha2" ]
[cljsjs/react-datepicker "2.1.0-0" :exclusions [cljsjs/react cljsjs/react-dom]]
[cljsjs/react-transition-group "2.4.0-0" :exclusions [cljsjs/react cljsjs/react-dom]]
[re-frame "0.10.2"]
[re-frame-utils "0.1.0"]
[com.andrewmcveigh/cljs-time "0.5.2"]]}}
:cljsbuild
{:builds
[{:id "dev"
:source-paths ["src/cljs" "src/cljc"]
:compiler {:main auto-ap.core
:output-to "resources/public/js/compiled/app.js"
:output-dir "resources/public/js/compiled/out"
:asset-path "/js/compiled/out"
:source-map-timestamp true
:preloads [devtools.preload]
:external-config {:devtools/config {:features-to-install :all}}}}]}
:main auto-ap.server
:aot [auto-ap.server auto-ap.datomic.migrate auto-ap.time clj-time.core clj-time.coerce clj-time.format clojure.tools.logging.impl]

View File

@@ -18,7 +18,7 @@
</head>
<body>
<div id="app"><div><nav class="navbar has-shadow is-fixed-top"><div class="container"><div class="navbar-brand"><a class="navbar-item" href="../"><img src="/img/logo.png"></a></div><div class="navbar-menu"><div class="navbar-burger burger" data-target="navMenu"><span></span><span></span><span></span></div></div></div></nav><div class="columns has-shadow" id="mail-app" style="margin-bottom: 0px; height: calc(100vh - 46px);"><aside class="column aside menu is-2 "><div class="main left-nav"><div></div></div></aside><div class="column messages hero " id="message-feed" style="overflow: auto;"><div class="inbox-messages"><div class="has-text-centered hero is-fullheight is-vertically-centered is-centered"><div class="hero-body"><div class="container"><div class="column is-4 is-offset-4 has-text-centered"><div class="loader is-loading is-active big is-centered"></div></div></div></div></div></div></div></div><div></div><div id="dz-hidden"></div></div></div>
<script src="/js/compiled/app_bundle.js"></script>
<script src="/js/compiled/app.js"></script>
<script>auto_ap.core.init();</script>
</body>
</html>

View File

@@ -67,7 +67,6 @@
{:fields {:id {:type :id}
:name {:type 'String}
:code {:type 'String}
:signature_file {:type 'String}
:week_a_debits {:type :money}
:week_a_credits {:type :money}
:week_b_debits {:type :money}
@@ -652,7 +651,6 @@
:edit_client {:fields {:id {:type :id}
:name {:type 'String}
:code {:type 'String}
:signature_data {:type 'String}
:email {:type 'String}
:week_a_credits {:type :money}
:week_a_debits {:type :money}

View File

@@ -3,14 +3,9 @@
[auto-ap.datomic.clients :as d-clients]
[auto-ap.graphql.utils :refer [->graphql assert-admin can-see-client?]]
[clj-time.coerce :as coerce]
[config.core :refer [env]]
[clojure.string :as str]
[clojure.tools.logging :as log]
[datomic.api :as d]
[clojure.java.io :as io]
[amazonica.aws.s3 :as s3])
(:import [org.apache.commons.codec.binary Base64]
java.util.UUID))
[datomic.api :as d]))
(defn assert-client-code-is-unique [code]
(when (seq (d/query {:query {:find '[?id]
@@ -19,21 +14,6 @@
:args [(d/db conn) code]}))
(throw (ex-info "Client is not unique" {:validation-error (str "Client code '" code "' is not unique.")}))))
(defn upload-signature-data [signature-data]
(let [prefix "data:image/jpeg;base64,"]
(when signature-data
(when-not (str/starts-with? signature-data prefix)
(throw (ex-info "Invalid signature image" {:validation-error (str "Invalid signature image.")})))
(let [signature-id (str (UUID/randomUUID))
raw-bytes (Base64/decodeBase64 (subs signature-data (count prefix)))]
(s3/put-object :bucket-name "integreat-signature-images" #_(:data-bucket env)
:key (str signature-id ".jpg")
:input-stream (io/make-input-stream raw-bytes {})
:metadata {:content-type "image/jpeg"}
:canned-acl "public-read")
(str "https://integreat-signature-images.s3.amazonaws.com/" signature-id ".jpg")
))))
(defn edit-client [context {:keys [edit_client new_bank_accounts] :as args} value]
(assert-admin (:id context))
(when-not (:id edit_client)
@@ -41,7 +21,6 @@
(let [client (when (:id edit_client) (d-clients/get-by-id (:id edit_client)))
id (or (:db/id client) "new-client")
signature-file (upload-signature-data (:signature_data edit_client))
_ (when client
(audit-transact (into
(mapv (fn [lm] [:db/retractEntity (:db/id lm)]) (:client/location-matches client))
@@ -57,7 +36,6 @@
(:client/code client))
:client/name (:name edit_client)
:client/matches (:matches edit_client)
:client/signature-file signature-file
:client/email (:email edit_client)
:client/locations (filter identity (:locations edit_client))
:client/week-a-debits (:week_a_debits edit_client)

View File

@@ -11,7 +11,8 @@
[auto-ap.effects :as effects]
[pushy.core :as pushy]
[auto-ap.history :as p]
[bidi.bidi :as bidi]))
[bidi.bidi :as bidi]
[cljsjs.recharts]))
(defn dev-setup []
(when true

View File

@@ -56,7 +56,7 @@
:graphql {:token token
:query-obj {:venia/queries [[:client
[:id :name :signature-file :code :email :matches :week-a-debits :week-a-credits :week-b-debits :week-b-credits :locations [:location-matches [:id :location :match]] [:bank-accounts [:id :start-date :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]
[:id :name :code :email :matches :week-a-debits :week-a-credits :week-b-debits :week-b-credits :locations [:location-matches [:id :location :match]] [:bank-accounts [:id :start-date :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]
[:address [:street1 :street2 :city :state :zip]]
[:forecasted-transactions [:id :amount :identifier :day-of-month]]]]
[:vendor

View File

@@ -119,7 +119,7 @@
(defn settles [{:keys [event time key]}]
(i/->interceptor
:id :settles
:before (fn [context]
:befor (fn [context]
context)
:after (fn [context]
(i/assoc-effect context :dispatch-debounce {:event event

View File

@@ -1,5 +1,6 @@
(ns auto-ap.views.components.layouts
(:require
[cljsjs.react-transition-group]
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[bidi.bidi :as bidi]

View File

@@ -9,58 +9,7 @@
[cljs-time.core :as t]
[clojure.spec.alpha :as s]
[re-frame.core :as re-frame]
[reagent.core :as r]
[clojure.string :as str]
[react-signature-canvas :as canvas]
[auto-ap.views.components.buttons :as buttons]))
(def signature-canvas (r/adapt-react-class (.-default canvas)))
(defn signature [{:keys [signature-file signature-data on-change]}]
(let [canvas (atom nil)
edit-mode? (r/atom false)
w (* 1.5 464)
h (* 1.5 174)]
(fn [{:keys [signature-file signature-data on-change]}]
[:div
(if @edit-mode?
[:div
[signature-canvas {"canvasProps" {"width" w
"height" h
"style" #js {"border" "1px solid rgb(219,219,219)"
"border-radius" "4px"}}
"backgroundColor" "#FFF"
:ref (fn [el]
(reset! canvas el))}]
[:div.buttons
[:a.button.is-primary.is-outlined {:on-click (fn []
(on-change (.toDataURL @canvas "image/jpeg"))
(reset! edit-mode? false))}
"Accept"]
[:a.button.is-warning.is-outlined {:on-click (fn []
(.clear @canvas)
(reset! edit-mode? false))}
"Cancel"]]]
(if (or signature-data signature-file)
[:div
[:img {:src (or signature-data signature-file)
:style {:width w
:height h}}]
[:div.buttons
[:a.button {:on-click (fn []
(reset! edit-mode? true))}
"Replace Signature"]]]
[:div
[:div.has-text-centered.is-vcentered {:style {:width w
:height h
:margin-bottom "8px"
:background "#EEE"}}
"No signature"]
[:div.buttons
[:a.button.is-primary.is-outlined {:on-click (fn []
(reset! edit-mode? true))}
"New Signature"]]]))
])))
[clojure.string :as str]))
(re-frame/reg-sub
::can-submit
@@ -74,58 +23,56 @@
::new-client-request
:<- [::forms/form ::form]
(fn [{new-client-data :data} _]
(cond->
{:id (:id new-client-data),
:name (:name new-client-data)
:code (:code new-client-data) ;; TODO add validation can't change
:email (:email new-client-data)
:locations (mapv :location (:locations new-client-data))
:matches (mapv :match (:matches new-client-data))
:location-matches (:location-matches new-client-data)
:week-a-credits (:week-a-credits new-client-data)
:week-a-debits (:week-a-debits new-client-data)
:week-b-credits (:week-b-credits new-client-data)
:week-b-debits (:week-b-debits new-client-data)
:address {:street1 (:street1 (:address new-client-data))
:street2 (:street2 (:address new-client-data)),
:city (:city (:address new-client-data))
:state (:state (:address new-client-data))
:zip (:zip (:address new-client-data))}
:signature-data (:signature-data new-client-data)
:forecasted-transactions (map (fn [{:keys [id day-of-month identifier amount]}]
{:id id
:day-of-month day-of-month
:identifier identifier
:amount amount})
(:forecasted-transactions new-client-data))
:bank-accounts (map (fn [{:keys [number name check-number include-in-reports type id code start-date bank-name routing bank-code new? sort-order visible yodlee-account-id locations]}]
{:number number
:name name
:check-number check-number
:include-in-reports include-in-reports
:start-date (cond (not start-date)
nil
{:id (:id new-client-data),
:name (:name new-client-data)
:code (:code new-client-data) ;; TODO add validation can't change
:email (:email new-client-data)
:locations (mapv :location (:locations new-client-data))
:matches (mapv :match (:matches new-client-data))
:location-matches (:location-matches new-client-data)
:week-a-credits (:week-a-credits new-client-data)
:week-a-debits (:week-a-debits new-client-data)
:week-b-credits (:week-b-credits new-client-data)
:week-b-debits (:week-b-debits new-client-data)
:address {:street1 (:street1 (:address new-client-data))
:street2 (:street2 (:address new-client-data)),
:city (:city (:address new-client-data))
:state (:state (:address new-client-data))
:zip (:zip (:address new-client-data))}
:forecasted-transactions (map (fn [{:keys [id day-of-month identifier amount]}]
{:id id
:day-of-month day-of-month
:identifier identifier
:amount amount})
(:forecasted-transactions new-client-data))
:bank-accounts (map (fn [{:keys [number name check-number include-in-reports type id code start-date bank-name routing bank-code new? sort-order visible yodlee-account-id locations]}]
{:number number
:name name
:check-number check-number
:include-in-reports include-in-reports
:start-date (cond (not start-date)
nil
(instance? goog.date.Date start-date)
(date->str start-date standard)
(instance? goog.date.Date start-date)
(date->str start-date standard)
:else
start-date
)
:type type
:id id
:sort-order sort-order
:visible visible
:locations (mapv :location locations)
:yodlee-account-id (when-not (str/blank? yodlee-account-id)
(js/parseInt yodlee-account-id))
:code (if new?
(str (:code new-client-data) "-" code)
code)
:bank-name bank-name
:routing routing
:bank-code bank-code})
(:bank-accounts new-client-data))})))
:else
start-date
)
:type type
:id id
:sort-order sort-order
:visible visible
:locations (mapv :location locations)
:yodlee-account-id (when-not (str/blank? yodlee-account-id)
(js/parseInt yodlee-account-id))
:code (if new?
(str (:code new-client-data) "-" code)
code)
:bank-name bank-name
:routing routing
:bank-code bank-code})
(:bank-accounts new-client-data))}))
(re-frame/reg-event-fx
::editing
@@ -160,7 +107,7 @@
:operation/name "EditClient"}
:venia/queries [{:query/data [:edit-client
{:edit-client new-client-req}
[:id :name :signature-file :code :email :locations :matches :week-a-debits :week-a-credits :week-b-debits :week-b-credits
[:id :name :code :email :locations :matches :week-a-debits :week-a-credits :week-b-debits :week-b-credits
[:location-matches [:location :match :id]]
[:address [:street1 :street2 :city :state :zip]]
[:forecasted-transactions [:id :amount :identifier :day-of-month]]
@@ -415,7 +362,6 @@
:spec ::entity/name
}])
[:div.field
[:p.help "Client code"
]
@@ -434,12 +380,7 @@
:field :email
:spec ::entity/email}])
[:div.field
[:p.help "Signature"]
[signature {:signature-file (:signature-file new-client)
:signature-data (:signature-data new-client)
:on-change (fn [uri]
(re-frame/dispatch [::forms/change ::form [:signature-data] uri]))}]]
[:h2.subtitle.is-5 "Name matches"]
[:div.control

View File

@@ -11,18 +11,17 @@
[cljs-time.core :as t]
[pushy.core :as pushy]
[re-frame.core :as re-frame]
[recharts]
[reagent.core :as r]))
(def pie-chart (r/adapt-react-class recharts/PieChart))
(def pie (r/adapt-react-class recharts/Pie))
(def bar-chart (r/adapt-react-class recharts/BarChart))
(def x-axis (r/adapt-react-class recharts/XAxis))
(def y-axis (r/adapt-react-class recharts/YAxis))
(def bar (r/adapt-react-class recharts/Bar))
(def legend (r/adapt-react-class recharts/Legend))
(def cell (r/adapt-react-class recharts/Cell))
(def tool-tip (r/adapt-react-class recharts/Tooltip))
(def pie-chart (r/adapt-react-class js/Recharts.PieChart))
(def pie (r/adapt-react-class js/Recharts.Pie))
(def bar-chart (r/adapt-react-class js/Recharts.BarChart))
(def x-axis (r/adapt-react-class js/Recharts.XAxis))
(def y-axis (r/adapt-react-class js/Recharts.YAxis))
(def bar (r/adapt-react-class js/Recharts.Bar))
(def legend (r/adapt-react-class js/Recharts.Legend))
(def cell (r/adapt-react-class js/Recharts.Cell))
(def tool-tip (r/adapt-react-class js/Recharts.Tooltip))
(def colors ["#79b52e" "#009cea" "#209b1c" "#f48017" " #ff0303" "hsl(217, 71%, 53%)" "hsl(141, 53%, 53%)"])
(def light-colors ["#a6d869" "#8ad8ff" "#2cd327" "#fac899" "#ff6b6b" "hsl(217, 71%, 53%)"])
@@ -47,9 +46,11 @@
[tool-tip]
[bar {:dataKey "paid" :fill (get colors 0) :stackId "a" :name "Paid"}]
[bar {:dataKey "unpaid" :fill (get light-colors 0) :stackId "a" :name "Unpaid"}]
[x-axis {:dataKey "name"}]
[y-axis]
[legend]])
[legend]]
)
(defn make-cash-flow-chart [{:keys [width height data] }]
(let [redirect-fn (fn [x]

View File

@@ -12,12 +12,12 @@
[auto-ap.entities.vendors :as vendor]
[auto-ap.views.components.typeahead :refer [typeahead-entity]]
[auto-ap.views.components.invoice-table :refer [invoice-table] :as invoice-table]
[cljsjs.dropzone :as dropzone]
[cljs.reader :as edn]
[clojure.string :as str]
[vimsical.re-frame.cofx.inject :as inject]
[auto-ap.status :as status]
[vimsical.re-frame.fx.track :as track]
[dropzone :as dz]
[auto-ap.views.pages.data-page :as data-page]
[clojure.set :as set]
[auto-ap.effects.forward :as forward]))
@@ -29,23 +29,23 @@
(reagent/create-class
{:display-name "dropzone"
:component-did-mount (fn [this]
(dz. (rdom/dom-node this)
(clj->js {:init (fn []
(.on (js-this) "addedfiles"
(fn []
(re-frame/dispatch [::status/completed ::import])))
(.on (js-this) "success" (fn [_ files]
(re-frame/dispatch [::invalidated])))
(.on (js-this) "error" (fn [_ error]
(re-frame/dispatch [::status/error ::import [(edn/read-string error)]]))))
:paramName "file"
:headers {"Authorization" (str "Token " @token)}
:url (str "/api/invoices/upload"
(when-let [client-name (-> @client :id)]
(str "?client=" client-name)))
:previewsContainer "#dz-hidden"
:previewTemplate "<div class='dz-hidden-preview'></div>"})))
(js/Dropzone. (rdom/dom-node this)
(clj->js {:init (fn []
(.on (js-this) "addedfiles"
(fn []
(re-frame/dispatch [::status/completed ::import])))
(.on (js-this) "success" (fn [_ files]
(re-frame/dispatch [::invalidated])))
(.on (js-this) "error" (fn [_ error]
(re-frame/dispatch [::status/error ::import [(edn/read-string error)]]))))
:paramName "file"
:headers {"Authorization" (str "Token " @token)}
:url (str "/api/invoices/upload"
(when-let [client-name (-> @client :id)]
(str "?client=" client-name)))
:previewsContainer "#dz-hidden"
:previewTemplate "<div class='dz-hidden-preview'></div>"})))
:reagent-render (fn []
{:key batch}
[:form.dz {:action "/api/invoices/upload"}

View File

@@ -1,8 +1,8 @@
(ns auto-ap.views.utils
(:require [re-frame.core :as re-frame]
[cljsjs.react-transition-group]
[cljsjs.react-datepicker]
[reagent.core :as reagent]
[react-transition-group :as react-transition-group]
[react-datepicker]
[clojure.spec.alpha :as s]
[cljs-time.coerce :as c]
[cljs-time.core :as time]
@@ -20,7 +20,7 @@
(def nff
(NumberFormat. Format/CURRENCY))
(defn nf
(defn- nf
[num]
(.format nff (str num)))
@@ -60,10 +60,9 @@
(defn delayed-dispatch [e]
(fn [x]
(js/setTimeout #(re-frame/dispatch e) 151)
(js/setTimeout #(re-frame/dispatch e) 150)
false))
(defn dispatch-event [event]
(fn [e]
(when (.-stopPropagation e)
@@ -104,7 +103,7 @@
(def css-transition-group
(reagent/adapt-react-class react-transition-group/CSSTransition))
(reagent/adapt-react-class js/ReactTransitionGroup.CSSTransition))
(defn appearing [{:keys [visible? enter-class exit-class timeout]} & children ]
@@ -411,7 +410,8 @@
(def date-picker
(do
(reagent/adapt-react-class (.-default react-datepicker))))
(reagent/adapt-react-class (aget js/DatePicker "default"))))
(defn local-now []