Adds the ability to set up read only users, adds linking filtering
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
(defn raw-graphql-ids
|
||||
([args] (raw-graphql-ids (dc/db conn) args))
|
||||
([db args]
|
||||
(auto-ap.logging/peek args)
|
||||
(let [valid-clients (extract-client-ids (:clients args)
|
||||
(:client-id args)
|
||||
(when (:client-code args)
|
||||
@@ -104,6 +105,20 @@
|
||||
:where ['[?e :transaction/approval-status ?approval-status]]}
|
||||
:args [(:approval-status args)]})
|
||||
|
||||
(= (:linked-to args) :payment)
|
||||
(merge-query {:query {:where ['[?e :transaction/payment]]}})
|
||||
|
||||
(= (:linked-to args) :expected-deposit)
|
||||
(merge-query {:query {:where ['[?e :transaction/expected-deposit]]}})
|
||||
|
||||
(= (:linked-to args) :invoice)
|
||||
(merge-query {:query {:where ['[?e :transaction/payment ?p]
|
||||
'[_ :invoice-payment/payment ?p]]}})
|
||||
|
||||
(= (:linked-to args) :none)
|
||||
(merge-query {:query {:where ['(not [?e :transaction/payment])
|
||||
'(not [?e :transaction/expected-deposit])]}})
|
||||
|
||||
(:original-id args)
|
||||
(merge-query {:query {:in ['?original-id]
|
||||
:where ['[?e :transaction/client ?c]
|
||||
|
||||
Reference in New Issue
Block a user