 (defn mutation-add-template []
   (let [add-data (r/atom {:isactive true})
         focus (r/atom nil)]
-    (fn [] [mutation-template "Mutation Add Form" add-data focus #(add-form-onclick add-data focus)])))
+    (fn [] [add-mutation-template "Mutation Add Form" add-data focus #(add-form-onclick add-data focus)])))
 
 
 (defn mutation-update-template [id dmt]

                             :districtid (.-id (.-district dmt))
                             :isactive true})
        focus (r/atom nil)]
    (fn [] [mutation-template
           "Mutation Update Form"
           update-data
           focus

       [form-input-element :o4number "O4 Number" "text" data-set focus]
       [form-input-element :o6number "O6 Number" "text" data-set focus]
       [form-input-element :racknumber "Rack Number" "text" data-set focus]
       [form-input-check-element :senddate "Send Date" "date" data-set focus]
       [form-input-element :remarks "Remarks" "text" data-set focus]
       ]
      [:div.box-footer
       [:button.btn.btn-default {:on-click form-cancel} "Cancel"]
       [:button.btn.btn-info.pull-right {:on-click save-function} "Save"]
       ;;[:span (str @data-set)]
       ]]]]])




(defn update-mutation-template [doc-name data-set focus save-function]
  [:div.container
   [:div.col-md-12
    [:div.box.box-info
     [:div.box-header.with-border
      [:h2.box-title doc-name]]
     [:div.form-horizontal
      [:div.box-body
       [form-input-element :mutationnumber "Mutation Number" "text" data-set focus]
       [form-input-element :nameofthefirstparty "Name of the First Party" "text" data-set focus ]
       [form-input-element :nameofthesecondparty "Name of the Second Party" "text" data-set focus]
       [form-input-element :dateofinstitution "Date of Institution" "date" data-set focus]
       [form-input-combo   :nameofpo "Name of PO" data-set focus]
       [form-input-element :dateofdecision "Date of Decision" "date" data-set focus]
       [form-input-element :title "Title" "text" data-set focus]
       [form-input-element :khasranumber "Khasra Number" "text" data-set focus]
       [form-input-element :area "Area" "text" data-set focus]
       [form-input-element :khatakhatuninumber "Khata Khatuni Number" "text" data-set focus]
       [form-dist-sel "District" :districtid (:districts @storage) data-set]
       [form-sub-sel "Sub-division Name" :subdivisionid (:subdivisions @storage) data-set]
       [form-villages-sel "Village Name" :villageid (:villages @storage) data-set]
       [form-input-element :o2number "O2 Number" "text" data-set focus]
       [form-input-element :o4number "O4 Number" "text" data-set focus]
       [form-input-element :o6number "O6 Number" "text" data-set focus]
       [form-input-element :racknumber "Rack Number" "text" data-set focus]
       [form-input-check-element :senddate "Send Date" "date" data-set focus]
       [form-input-check-element :receiveddate "Received Date" "date" data-set focus]
       [form-input-element :remarks "Remarks" "text" data-set focus]
       ]
      [:div.box-footer
       [:button.btn.btn-default {:on-click form-cancel} "Cancel"]
       [:button.btn.btn-info.pull-right {:on-click save-function} "Save"]
       ;;[:span (str @data-set)]
       ]]]]])


(defn map-mutation-data [mut]
  {:id (if (nil? (mut :id))0 (int (mut :id))) :nameofthefirstparty (mut :nameofthefirstparty)
