(ns auto-ap.views.pages.admin.accounts.side-bar
  (:require
   [auto-ap.views.pages.data-page :as data-page]
   [auto-ap.views.utils :refer [dispatch-value-change]]
   [re-frame.core :as re-frame]))

(defn accounts-side-bar [{:keys [data-page]}]
  [:div
   [:p.menu-label "Name"]

   [:div.field
    [:div.control [:input.input {:placeholder "Food Cost"
                                 :value @(re-frame/subscribe [::data-page/filter data-page :name-like])
                                 :on-change (dispatch-value-change [::data-page/filter-changed data-page :name-like])} ]]]

   [:p.menu-label "Code"]

   [:div.field
    [:div.control [:input.input {:placeholder "11000"
                                 :value @(re-frame/subscribe [::data-page/filter data-page :numeric-code])
                                 :on-change (dispatch-value-change [::data-page/filter-changed data-page :numeric-code])}]]]]) 


