Merge branch 'staging' into add-scheduled-payment-filter

This commit is contained in:
Bryce Covert
2021-01-11 12:09:10 -08:00
7 changed files with 73 additions and 40 deletions

View File

@@ -3,7 +3,8 @@
[auto-ap.datomic :refer [uri merge-query apply-sort-3 apply-pagination add-sorter-fields conn]]
[auto-ap.graphql.utils :refer [limited-clients]]
[clj-time.coerce :as c]
[clj-time.coerce :as coerce]))
[clj-time.coerce :as coerce]
[clojure.tools.logging :as log]))
(defn sort-fn [sort-by]
(cond
@@ -102,7 +103,8 @@
:args [(:location args)]})
(:unresolved args)
(merge-query {:query {:where ['(or-join [?e]
(merge-query {:query {:where ['[?e :transaction/date]
'(or-join [?e]
(not [?e :transaction/accounts])
(and [?e :transaction/accounts ?tas]
(not [?tas :transaction-account/account])))]}})
@@ -136,6 +138,7 @@
(merge-query {:query {:find ['?sort-default '?e]
:where ['[?e :transaction/id]
'[?e :transaction/date ?sort-default]]}}))]
(log/info "query is" query)
(cond->> query
true (d/query)
true (apply-sort-3 args)