filtering down to just active invoices/etc.
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
:else
|
||||
q)))
|
||||
|
||||
(defn base-graphql [{:keys [company-id vendor-id check-number bank-account-id status amount id]}]
|
||||
(defn base-graphql [{:keys [company-id vendor-id check-number bank-account-id status amount id statuses]}]
|
||||
|
||||
(cond-> base-query
|
||||
(limited-companies id) (helpers/merge-where [:in :company-id (limited-companies id)])
|
||||
@@ -89,7 +89,8 @@
|
||||
(not (nil? vendor-id)) (helpers/merge-where [:= :vendor-id vendor-id])
|
||||
(not (nil? check-number)) (helpers/merge-where [:= :check-number check-number])
|
||||
(not (nil? status)) (helpers/merge-where [:= :status status])
|
||||
(not (nil? amount)) (helpers/merge-where [:= :amount amount])))
|
||||
(not (nil? amount)) (helpers/merge-where [:= :amount amount])
|
||||
(seq statuses ) (helpers/merge-where [:in :status statuses])))
|
||||
|
||||
(defn get-graphql [{:keys [start sort-by asc id limit] :as args :or {limit 20}}]
|
||||
(query
|
||||
|
||||
Reference in New Issue
Block a user