 )
 
 
+(defn OnCalcLeaveDays [response]
+  ( let [ 
+    newdata (map leaves-to-map response)
+    leavecodes (map leaves-to-leavecodes response)
+  ]
+     
+     
+     (swap! app-state assoc :leavetypes  (into {} newdata) )
+     (swap! app-state assoc :leavecodes leavecodes) 
+  )
+   
+
+   ;(.log js/console (:leavetypes @app-state)) 
+
+)
+
+
 
 (defn error-handler [{:keys [status status-text]}]
   (.log js/console (str "something bad happened: " status " " status-text))

  )
)

(defn setcontrols []
  (setdatepickers)
  (setcalculatedfields)
)

(defn alertselected1 [event param]
  ;(js/alert (str event  "ClojureScript says 'Boo!'" ))
