             [ajax.core :refer [GET POST]]
             [clojure.string :as str]
             [om-bootstrap.button :as b]
+            [om-bootstrap.panel :as p]
+            
   )
   (:import goog.History)
 )

)


(defn getLeaveTypes [data]
 (.log js/console (str "token: " " " (:token  (first (:token @t5pcore/app-state)))       ))

 
  (GET "http://localhost/T5PWebAPI/api/leavetype" {:handler OnGetLeaveTypes
                                            :error-handler error-handler
                                            :headers {:content-type "application/json" :Authorization (str "Bearer "  (:token  (first (:token @t5pcore/app-state)))) }
                                            })

     )
   )
  )
  
   ;(.log js/console (str "#" "leavefromdate" )) 

    (jquery
     (fn []
       (-> (jquery (str "#" "leavefromdate") )
         (.datepicker {})
       )      
     )
    )
)

(defcomponent leave-page-view [data owner]
  (did-mount [_]
    (onMount data)
  )
  (did-update [this prev-props prev-state]
    ;(.log js/console "did updated!!!!!!!!!!!!!" )  
    (setdatepickers)
  )
  (render [_]
    (p/panel (merge {:header (dom/h3 "休假申请" )} {:bs-style "primary"}
      
      )

      (dom/div {:className "panel-body"}
