 
 (defn home-page []
   [:div
-   (for [[floor people] @people-atom]
+   (for [[floor people] (filtered-people-atom)]
     ^{:key floor} [Floor floor people])])
 
 (defn About

        (fn [result] result)))


(defn create-filter-fn 
  "creates a filter function thing"
  [keys expr]
  (let [my-user (gensym "user")
        replace-where-appropriate (fn [sym]
                                    (cond
                                      (not (keyword? sym)) sym
                                      (some #{sym} keys) `(~sym ~my-user)
                                      :else sym))]
    (->>
     (read-string expr)
     (walk/postwalk replace-where-appropriate ,,,)
     ((fn [new-expr]
        `(fn [~my-user] ~new-expr)) ,,,))))


(def exp "(.startsWith :Name \"Max\")")
(defn try-filter []
  (= '({:Name "Maximilian"}) 
     (filter
      (create-filter-fn [:Name] exp)
      [{:Name "Bob"} {:Name "Maximilian"}]))
  )

;; Todo:
;; partition-by :KeyscanStatus. Then display and add filters.
;; add a <users-details test data set monday morning
;; partition the users by 200


;; -------------------------

                  :height 100
                  :background-image (str "url(" (:PhotoPath user) ")")
                  :background-size "100% auto"
                  :background-repeat :no-repeat}
          :on-click #(.open js/window (genome/profile-link user))}]
   [:span {:style {:width "100%"
                   :font-size 16}}
    (:FirstName user)]])
