Able to shohw ledger entries.

This commit is contained in:
Bryce Covert
2019-04-24 15:31:33 -07:00
parent f975ec100b
commit b5ca106260
5 changed files with 188 additions and 52 deletions

View File

@@ -10,6 +10,7 @@
[auto-ap.graphql.utils :refer [assert-admin can-see-client? assert-can-see-client]]
[auto-ap.datomic :refer [uri merge-query]]
[datomic.api :as d]
[clj-time.coerce :as coerce]
[auto-ap.datomic.clients :as d-clients]
[auto-ap.datomic.checks :as d-checks]
[auto-ap.datomic.users :as d-users]
@@ -23,6 +24,7 @@
[auto-ap.graphql.checks :as gq-checks]
[auto-ap.graphql.invoices :as gq-invoices]
[auto-ap.graphql.transactions :as gq-transactions]
[auto-ap.time :as time]
[clojure.walk :as walk]
[clojure.string :as str])
(:import
@@ -31,11 +33,12 @@
(def integreat-schema
{
:scalars {:id {
:parse (schema/as-conformer #(when % (Long/parseLong %)))
:scalars {:id {:parse (schema/as-conformer #(when % (Long/parseLong %)))
:serialize (schema/as-conformer #(.toString %))}
:ident {:parse (schema/as-conformer (fn [x] {:db/ident x}))
:serialize (schema/as-conformer #(or (:ident %) (:db/ident %) %))}}
:serialize (schema/as-conformer #(or (:ident %) (:db/ident %) %))}
:iso_date {:parse (schema/as-conformer #(coerce/to-date-time %))
:serialize (schema/as-conformer #(time/unparse % time/iso-date))}}
:objects
{
:client
@@ -331,6 +334,11 @@
:ledger_page {:type :ledger_page
:args {:client_id {:type :id}
:bank_account_id {:type :id}
:from_date {:type :iso_date}
:to_date {:type :iso_date}
:location {:type 'String}
:from_numeric_code {:type 'Int}
:to_numeric_code {:type 'Int}
:start {:type 'Int}
:sort_by {:type 'String}
:asc {:type 'Boolean}}