 (ns expense-tracker.menu
   (:require [expense-tracker.globals :as g]))
+
+;; reset-app
+(defn ra [e m] (reset! g/app-page m) nil)
 
 (defn c-menu []
   [:div.navbar.navbar-default

                                         :aria-expanded "false"}
                     "Accounts" [:span.caret]]
       [:ul.dropdown-menu
        [:li [:a {:href "#" :onClick #(reset! g/app-page {:page :acc-view})} "View"]]
        [:li [:a {:href "#" :onClick #(reset! g/app-page {:page :acc-add})} "Add New"]]]]
      [:li.dropdown [:a.dropdown-toggle {:href "#"
                                         :data-toggle "dropdown"
                                         :role "button"

                                         :aria-expanded "false"}
                     "Reports by" [:span.caret]]
       [:ul.dropdown-menu
        [:li [:a {:href "#" :onClick #(ra % {:page :rep-pie})} "Time Period"]]
        #_[:li.divider {:role "separator"}]
        [:li [:a {:href "#" :onClick #(ra % {:page :rep-bar})} "Account"]]]]]]]])
