added payment status and made checks sort correctly.

This commit is contained in:
2022-02-11 08:34:18 -08:00
parent 5d0d7afd99
commit 286c300dd0
5 changed files with 63 additions and 19 deletions

View File

@@ -375,7 +375,10 @@
(defn get-payment-page [context args value]
(let [args (assoc args :id (:id context))
[payments checks-count] (d-checks/get-graphql (update (<-graphql args) :payment-type enum->keyword "payment-type"))]
[payments checks-count] (d-checks/get-graphql (-> args
(<-graphql)
(update :payment-type enum->keyword "payment-type")
(update :status enum->keyword "payment-status")))]
[{:payments (->> payments
(map (fn [payment]
@@ -511,6 +514,7 @@
:args {:client_id {:type :id}
:vendor_id {:type :id}
:payment_type {:type :payment_type}
:status {:type :payment_status}
:exact_match_id {:type :id}
:date_range {:type :date_range}
:amount_lte {:type :money}
@@ -550,7 +554,11 @@
{:payment_type {:values [{:enum-value :check}
{:enum-value :cash}
{:enum-value :debit}
{:enum-value :credit}]}})
{:enum-value :credit}]}
:payment_status {:values [{:enum-value :voided}
{:enum-value :pending}
{:enum-value :cleared}]}})
(def resolvers
{:get-potential-payments get-potential-payments