adds total.
This commit is contained in:
@@ -30,13 +30,14 @@
|
||||
(defn get-invoice-page [context args _]
|
||||
|
||||
(let [args (assoc args :id (:id context))
|
||||
[invoices invoice-count outstanding] (-> args
|
||||
(assoc :id (:id context))
|
||||
(<-graphql)
|
||||
(update :status enum->keyword "invoice-status")
|
||||
(d-invoices/get-graphql))]
|
||||
[invoices invoice-count outstanding total-amount] (-> args
|
||||
(assoc :id (:id context))
|
||||
(<-graphql)
|
||||
(update :status enum->keyword "invoice-status")
|
||||
(d-invoices/get-graphql))]
|
||||
[{:invoices (mapv #(->graphql % (:id context)) invoices)
|
||||
:outstanding outstanding
|
||||
:total_amount total-amount
|
||||
:total invoice-count
|
||||
:count (count invoices)
|
||||
:start (:start args 0)
|
||||
@@ -307,6 +308,7 @@
|
||||
|
||||
:invoice_page {:fields {:invoices {:type '(list :invoice)}
|
||||
:outstanding {:type :money}
|
||||
:total_amount {:type :money}
|
||||
:count {:type 'Int}
|
||||
:total {:type 'Int}
|
||||
:start {:type 'Int}
|
||||
|
||||
Reference in New Issue
Block a user