implementing sorting for checks.
This commit is contained in:
@@ -61,14 +61,11 @@
|
||||
|
||||
(defn change-handler [form customize-fn]
|
||||
(fn [db [_ & path-pairs]]
|
||||
(println "CHA" form path-pairs)
|
||||
(reduce
|
||||
(fn [db [path value]]
|
||||
(println "PATH" path "VALUE" value)
|
||||
(let [updated (assoc-in db (into [::forms form :data] path) value)]
|
||||
(reduce
|
||||
(fn [updated [path value ]]
|
||||
(println "custom PATH" path "custom VALUE" value)
|
||||
(assoc-in updated (into [::forms form :data] path) value))
|
||||
updated
|
||||
(partition 2 (customize-fn (get-in updated [::forms form :data]) path value)))))
|
||||
@@ -118,7 +115,7 @@
|
||||
(.stopPropagation e)
|
||||
(.preventDefault e))
|
||||
(when can-submit
|
||||
(re-frame/dispatch-sync (conj submit-event params))))}
|
||||
(re-frame/dispatch-sync (vec (conj submit-event params)))))}
|
||||
[:h1.title.is-2 title]
|
||||
|
||||
]
|
||||
|
||||
@@ -167,9 +167,9 @@
|
||||
:create)]
|
||||
{:graphql
|
||||
{:token user
|
||||
:query-obj @(re-frame/subscribe (if (:id data)
|
||||
@(re-frame/subscribe [::edit-query])
|
||||
@(re-frame/subscribe [::create-query])))
|
||||
:query-obj (if (:id data)
|
||||
@(re-frame/subscribe [::edit-query])
|
||||
@(re-frame/subscribe [::create-query]))
|
||||
:on-success [::succeeded params command]
|
||||
:on-error [::forms/save-error ::form]}})))
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
|
||||
|
||||
(defn potential-payment-matches-box [{:keys [potential-payment-matches] :as params}]
|
||||
(println potential-payment-matches)
|
||||
[:div.box
|
||||
[:div.columns
|
||||
[:div.column
|
||||
@@ -154,7 +155,7 @@
|
||||
|
||||
(if (and (seq (:potential-payment-matches data))
|
||||
(not (:payment data)))
|
||||
[potential-payment-matches-box {:matches (:potential-payment-matches data)
|
||||
[potential-payment-matches-box {:potential-payment-matches (:potential-payment-matches data)
|
||||
:edit-completed edit-completed}]
|
||||
|
||||
[:div
|
||||
|
||||
Reference in New Issue
Block a user