From a2cd6d075955a660508ede0aece9e23898627735 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Fri, 12 Apr 2019 18:09:11 -0700 Subject: [PATCH] removing cruft. --- src/clj/auto_ap/graphql.clj | 16 +++------------- src/clj/auto_ap/graphql/expense_accounts.clj | 9 --------- src/clj/auto_ap/routes/exports.clj | 4 ++-- .../components/expense_accounts_dialog.cljs | 2 +- 4 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 src/clj/auto_ap/graphql/expense_accounts.clj diff --git a/src/clj/auto_ap/graphql.clj b/src/clj/auto_ap/graphql.clj index 31773678..8e7ed9f5 100644 --- a/src/clj/auto_ap/graphql.clj +++ b/src/clj/auto_ap/graphql.clj @@ -22,7 +22,6 @@ [auto-ap.graphql.clients :as gq-clients] [auto-ap.graphql.vendors :as gq-vendors] [auto-ap.graphql.checks :as gq-checks] - [auto-ap.graphql.expense-accounts :as expense-accounts] [auto-ap.graphql.invoices :as gq-invoices] [auto-ap.graphql.transactions :as gq-transactions] [clojure.walk :as walk] @@ -180,11 +179,7 @@ :role {:type 'String} :clients {:type '(list :client)}}} - :expense_account {:fields {:id {:type :id} - :location {:type 'String} - :name {:type 'String} - :parent {:type :expense_account - :resolve :get-expense-account-parent}}} + :account {:fields {:id {:type :id} :numeric_code {:type 'Int} @@ -197,11 +192,8 @@ {:fields {:id {:type :id} :invoice_id {:type 'String} :account {:type :account} - :expense_account_id {:type 'Int} :location {:type 'String} - :expense_account {:type :expense_account - :resolve :get-expense-account - } + :amount {:type 'String}}} :invoice @@ -668,9 +660,7 @@ :mutation/unvoid-invoice gq-invoices/unvoid-invoice :mutation/void-payment gq-checks/void-check :mutation/edit-expense-accounts gq-invoices/edit-expense-accounts - :get-vendor get-vendor - :get-expense-account expense-accounts/get-expense-account - :get-expense-account-parent expense-accounts/get-parent}) + :get-vendor get-vendor}) schema/compile)) diff --git a/src/clj/auto_ap/graphql/expense_accounts.clj b/src/clj/auto_ap/graphql/expense_accounts.clj deleted file mode 100644 index 1092c8da..00000000 --- a/src/clj/auto_ap/graphql/expense_accounts.clj +++ /dev/null @@ -1,9 +0,0 @@ -(ns auto-ap.graphql.expense-accounts - (:require [auto-ap.graphql.utils :refer [->graphql]] - [auto-ap.expense-accounts :as expense-accounts])) - -(defn get-expense-account [context args value] - (->graphql (expense-accounts/expense-accounts (:expense_account_id value)))) - -(defn get-parent [context args value] - (->graphql (expense-accounts/expense-accounts (:parent value)))) diff --git a/src/clj/auto_ap/routes/exports.clj b/src/clj/auto_ap/routes/exports.clj index 7c51d20e..08e92f02 100644 --- a/src/clj/auto_ap/routes/exports.clj +++ b/src/clj/auto_ap/routes/exports.clj @@ -27,8 +27,8 @@ [:id :total :outstanding-balance :invoice-number :date :status :original-id [:payments [:amount [:payment [:check-number :memo [:bank_account [:id :name :number :bank-name :bank-code :code]]]]]] [:vendor [:name :id [:primary_contact [:name]] [:address [:street1 :city :state :zip]]]] - [:expense_accounts [:amount :id :expense_account_id :location - [:expense_account [:id :name [:parent [:id :name]]]]]] + [:expense_accounts [:amount :id :location + [:account [:id :numeric-code :name]]]] [:client [:name :id :code :locations]]]]] invoices (graphql/query identity (venia/graphql-query {:venia/queries (->graphql query)}))] diff --git a/src/cljs/auto_ap/views/components/expense_accounts_dialog.cljs b/src/cljs/auto_ap/views/components/expense_accounts_dialog.cljs index 3d7c9aa1..f18fdc02 100644 --- a/src/cljs/auto_ap/views/components/expense_accounts_dialog.cljs +++ b/src/cljs/auto_ap/views/components/expense_accounts_dialog.cljs @@ -93,7 +93,7 @@ expense-accounts)} [:id :total :outstanding-balance :invoice-number :date :status [:vendor [:name :id]] - [:expense_accounts [:amount :id :location :expense_account_id + [:expense_accounts [:amount :id :location [:account [:id :name :numeric-code :location]]]] [:client [:name :id :locations]] [:payments [:amount :id [:payment [:amount :s3_url :check_number ]]]]]]}]}