more viewing from UI.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
[auto-ap.db.vendors :as vendors]
|
||||
[auto-ap.db.companies :as companies]
|
||||
[auto-ap.datomic.clients :as d-clients]
|
||||
[auto-ap.datomic.vendors :as d-vendors]
|
||||
[auto-ap.db.users :as users]
|
||||
[auto-ap.db.checks :as checks]
|
||||
[auto-ap.routes.checks :as rchecks]
|
||||
@@ -40,6 +41,11 @@
|
||||
:address {:type :address}
|
||||
:locations {:type '(list String)}
|
||||
:bank_accounts {:type '(list :bank_account)}}}
|
||||
:contact
|
||||
{:fields {:id {:type 'String}
|
||||
:name {:type 'String}
|
||||
:email {:type 'String}
|
||||
:phone {:type 'String}}}
|
||||
|
||||
:bank_account
|
||||
{:fields {:id {:type 'String}
|
||||
@@ -56,20 +62,14 @@
|
||||
:state {:type 'String}
|
||||
:zip {:type 'String}}}
|
||||
:vendor
|
||||
{:fields {:id {:type 'Int}
|
||||
{:fields {:id {:type 'String}
|
||||
:name {:type 'String}
|
||||
:code {:type 'String}
|
||||
|
||||
:print_as {:type 'String}
|
||||
:primary_contact {:type 'String}
|
||||
:primary_contact {:type :contact}
|
||||
:secondary_contact {:type :contact}
|
||||
:address {:type :address}
|
||||
:primary_email {:type 'String}
|
||||
:primary_phone {:type 'String}
|
||||
|
||||
:secondary_contact {:type 'String}
|
||||
:secondary_email {:type 'String}
|
||||
:secondary_phone {:type 'String}
|
||||
|
||||
|
||||
:default_expense_account {:type 'Int}
|
||||
:invoice_reminder_schedule {:type 'String}}}
|
||||
@@ -453,10 +453,9 @@
|
||||
|
||||
(defn get-company [context args value]
|
||||
(println "GETTING COMPANY" (:id context))
|
||||
(doto (->graphql
|
||||
(filter #(can-see-company? (:id context) %)
|
||||
(d-clients/get-all)))
|
||||
println))
|
||||
(->graphql
|
||||
(filter #(can-see-company? (:id context) %)
|
||||
(d-clients/get-all))))
|
||||
|
||||
(defn join-companies [users]
|
||||
(let [companies (by :id (companies/get-all))]
|
||||
@@ -478,7 +477,7 @@
|
||||
|
||||
(defn get-vendor [context args value]
|
||||
(->graphql
|
||||
(vendors/get-all)))
|
||||
(d-vendors/get-all)))
|
||||
|
||||
(defn print-checks [context args value]
|
||||
|
||||
@@ -555,4 +554,4 @@
|
||||
(query id q nil ))
|
||||
([id q v]
|
||||
(println "executing graphql query" id q v)
|
||||
(simplify (execute schema q v {:id id}))))
|
||||
(time (simplify (execute schema q v {:id id})))))
|
||||
|
||||
Reference in New Issue
Block a user