From 01d122a4d7a25a458f05bcffcba99595a7ce3809 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Thu, 27 May 2021 06:12:07 -0700 Subject: [PATCH] removing placeholder. --- src/clj/auto_ap/time.clj | 7 +++++++ src/cljs/auto_ap/views/components/typeahead.cljs | 5 ++++- src/cljs/auto_ap/views/pages/home.cljs | 7 +------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/clj/auto_ap/time.clj b/src/clj/auto_ap/time.clj index 2856ecb3..4abc101a 100644 --- a/src/clj/auto_ap/time.clj +++ b/src/clj/auto_ap/time.clj @@ -24,6 +24,13 @@ (catch Exception e nil))) +(defn unparse-local [v format] + (try + + (f/unparse (f/with-zone (f/formatter format) (time/time-zone-for-id "America/Los_Angeles")) v) + (catch Exception e + nil))) + (defn day-of-week-seq [day] (let [next-day (loop [d (local-now)] diff --git a/src/cljs/auto_ap/views/components/typeahead.cljs b/src/cljs/auto_ap/views/components/typeahead.cljs index 476d70f9..219f860e 100644 --- a/src/cljs/auto_ap/views/components/typeahead.cljs +++ b/src/cljs/auto_ap/views/components/typeahead.cljs @@ -8,6 +8,7 @@ [react])) (defn typeahead-v3-internal [{:keys [class style disabled entities entity->text entities-by-id entity-index on-change disabled value name auto-focus] :or {disabled false} :as i}] + (println "hello") (let [[items set-items] (react/useState (map clj->js entities)) state-reducer (fn [state actions-and-changes] (cond @@ -102,4 +103,6 @@ (entity->text item)]))]]]])) (defn typeahead-v3 [{:keys [class disabled entities entity->text entities-by-id entity-index on-change value ] :as props}] - [:f> typeahead-v3-internal props]) + (println typeahead-v3-internal) + [:div + [:f> typeahead-v3-internal props]]) diff --git a/src/cljs/auto_ap/views/pages/home.cljs b/src/cljs/auto_ap/views/pages/home.cljs index d2ad8ecb..16c65d47 100644 --- a/src/cljs/auto_ap/views/pages/home.cljs +++ b/src/cljs/auto_ap/views/pages/home.cljs @@ -308,12 +308,7 @@ chart-options @(re-frame/subscribe [::chart-options])] ^{:key client-id} [side-bar-layout {:side-bar [:div - [:f> typeahead-v3 {:entities-by-id vendors-by-id - :entity-index vendors-index - :entity->text :name}] - [:f> typeahead-v3 {:entities-by-id accounts-by-id - :entity-index accounts-index - :entity->text :name}] + ] :main [:div [:h1.title "Home"] [:h1.title.is-4 "Top expense categories"]