This commit is contained in:
Bryce Covert
2019-04-11 15:13:53 -07:00
parent 5d93e3a5a3
commit e217bad88e

View File

@@ -28,7 +28,6 @@
(= (:asc args) false) (reverse))) (= (:asc args) false) (reverse)))
(defn apply-sort-2 [args results ] (defn apply-sort-2 [args results ]
(let [comparator (if (= (:asc args) false) (let [comparator (if (= (:asc args) false)
(fn [x y] (compare y x)) (fn [x y] (compare y x))
(fn [x y] (compare x y)))] (fn [x y] (compare x y)))]
@@ -50,8 +49,7 @@
(:sort-by args) (add-sorter-field {"client" ['[?e :transaction/client ?c] (:sort-by args) (add-sorter-field {"client" ['[?e :transaction/client ?c]
'[?c :client/name ?sorter]] '[?c :client/name ?sorter]]
"account" #_['[(get-else $ ?e :transaction/account 0) ?sorter]] "account" ['[?e :transaction/date]
['[?e :transaction/date]
'(or-join [?e ?sorter] '(or-join [?e ?sorter]
(and [?e :transaction/account ?c] (and [?e :transaction/account ?c]
[?c :account/name ?sorter]) [?c :account/name ?sorter])