cleanup.
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
(= (:asc args) false) (reverse)))
|
||||
|
||||
(defn apply-sort-2 [args results ]
|
||||
|
||||
(let [comparator (if (= (:asc args) false)
|
||||
(fn [x y] (compare y x))
|
||||
(fn [x y] (compare x y)))]
|
||||
@@ -50,14 +49,13 @@
|
||||
|
||||
(:sort-by args) (add-sorter-field {"client" ['[?e :transaction/client ?c]
|
||||
'[?c :client/name ?sorter]]
|
||||
"account" #_['[(get-else $ ?e :transaction/account 0) ?sorter]]
|
||||
['[?e :transaction/date]
|
||||
'(or-join [?e ?sorter]
|
||||
(and [?e :transaction/account ?c]
|
||||
[?c :account/name ?sorter])
|
||||
(and
|
||||
(not [?e :transaction/account])
|
||||
[(ground "") ?sorter]))]
|
||||
"account" ['[?e :transaction/date]
|
||||
'(or-join [?e ?sorter]
|
||||
(and [?e :transaction/account ?c]
|
||||
[?c :account/name ?sorter])
|
||||
(and
|
||||
(not [?e :transaction/account])
|
||||
[(ground "") ?sorter]))]
|
||||
"description-original" ['[?e :transaction/description-original ?sorter]]
|
||||
"date" ['[?e :transaction/date ?sorter]]
|
||||
"amount" ['[?e :transaction/amount ?sorter]]
|
||||
|
||||
Reference in New Issue
Block a user