       :or {model-key-fn identity
            schema-id-key schema-key
            schema-label-key schema-key}}]
-  (let [current-receipt (re-frame/subscribe [:current-receipt])
-        schema (re-frame/subscribe [subs-key])]
-    [(if multiple? re-com/selection-list re-com/single-dropdown)
-     :width field-width
-     :model ((if multiple? (partial into #{}) identity)
-             (field-key @current-receipt))
-     :choices (mapv (fn [{id schema-id-key
-                          label schema-label-key}]
-                      {:id id :label label})
-                    (if filter-fn
-                      (filter filter-fn @schema)
-                      @schema))
-     :on-change #(re-frame/dispatch [:edit-current-receipt field-key %])]))
+  [(if multiple? re-com/selection-list re-com/single-dropdown)
+   :width field-width
+   :model ((if multiple? (partial into #{}) identity)
+           (field-key (<sub [:current-receipt])))
+   :choices (mapv (fn [{id schema-id-key
+                        label schema-label-key}]
+                    {:id id :label label})
+                  (if filter-fn
+                    (filter filter-fn (<sub [subs-key]))
+                    (<sub [subs-key])))
+   :on-change #(>evt [:edit-current-receipt field-key %])])
 
 
 (defn login-panel []

        [login-panel]))))

(defn about-panel []
  (let [about-server (re-frame/subscribe [:about-server])]
    (fn []
      [re-com/v-box
       :gap title-gap
       :children [(panel-title "About")
                  [:div
                   [:p "Third iteration of a simple receipts management program."]
                   [:p "This time, my focus is on learning Vase, Datomic, and Pedestal."]
                   [:h4 "Status"]
                   [:p (goog.string/format "Currently holding %d purchases." (or (:purchases-count @about-server) 0))]
                   [:h4 (goog.string/format "Version %s" (:version @about-server))]
                   [:h5 "Includes libraries:"]
                   [:small
                    [:ul
                     (map (fn [[dependency version]]
                            ^{:key dependency}[:li (goog.string/format "%s:%s" dependency version)])
                          (sort-by first (:dependencies @about-server)))]]
                   [:p
                    [:em "Copyright (c) 2017, David Goldfarb <deg@degel.com>"]
                    [:br]
                    [:em "Portions copyright 2013-2016."]]]]])))

(def date-format (time-format/formatter "ddMMMyy"))
(def time-format (time-format/formatter "HH:mm:ss"))

   :disabled? true])

(defn history-panel []
  (if (<sub [:user])
    (let [consumer? (:user/isConsumer (<sub [:user]))
          editor? (:user/isEditor (<sub [:user]))
          admin? (:user/isAdmin (<sub [:user]))]
      [re-com/v-box
       :gap title-gap
       :children [(panel-title "History")
                  [re-com/scroller
                   :scroll :auto
                   :child [history-table (<sub [:history])]]
                  (when admin?
                    [history-csv (<sub [:history-csv])])
                  [re-com/h-box
                   :children [(button [:get-history] "Refresh History" "Load history from server")]]]])
    [login-panel]))

(defn formatted-schema [title schema-part only-dynamic?]
  [re-com/v-box
