tweaks to checkout.

This commit is contained in:
Bryce Covert
2018-07-12 19:12:40 -07:00
parent 2928b02eed
commit b95f43fd1d
5 changed files with 17 additions and 12 deletions

View File

@@ -26,5 +26,6 @@ services:
LETSENCRYPT_EMAIL: le@brycecovertoperations.com LETSENCRYPT_EMAIL: le@brycecovertoperations.com
database: database:
restart: always restart: always
ports: []
volumes: volumes:
- /opt/integreat/prod/var/lib/postgresql/data:/var/lib/postgresql/data - /opt/integreat/prod/var/lib/postgresql/data:/var/lib/postgresql/data

View File

@@ -3,8 +3,11 @@ services:
nginx-proxy: nginx-proxy:
restart: "always" restart: "always"
ports: ports:
- "8080:80" - "80:80"
- "443:443"
- "8443:443" - "8443:443"
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - /var/run/docker.sock:/tmp/docker.sock:ro
- /opt/integreat/staging/certs/:/etc/nginx/certs:ro - /opt/integreat/staging/certs/:/etc/nginx/certs:ro
@@ -22,7 +25,7 @@ services:
environment: environment:
config: /usr/local/config/staging.edn config: /usr/local/config/staging.edn
VIRTUAL_HOST: staging.app.integreatconsult.com VIRTUAL_HOST: staging.app.integreatconsult.com
LETSENCRYPT_HOST: staging.app.integreatconsult.com,app.integreatconsult.com LETSENCRYPT_HOST: staging.app.integreatconsult.com
LETSENCRYPT_EMAIL: le@brycecovertoperations.com LETSENCRYPT_EMAIL: le@brycecovertoperations.com
database: database:
restart: always restart: always

View File

@@ -27,8 +27,6 @@ services:
VIRTUAL_HOST: local.app.integreatconsult.com VIRTUAL_HOST: local.app.integreatconsult.com
database: database:
image: postgres:9-alpine image: postgres:9-alpine
ports:
- "5432:5432"
environment: environment:
POSTGRES_USER: ap POSTGRES_USER: ap
POSTGRES_PASSWORD: fifteen-invoices-imported! POSTGRES_PASSWORD: fifteen-invoices-imported!

View File

@@ -46,6 +46,11 @@
:name {:type 'String} :name {:type 'String}
:bank_code {:type 'String} :bank_code {:type 'String}
:bank_name {:type 'String}}} :bank_name {:type 'String}}}
:address
{:fields {:street1 {:type 'String}
:city {:type 'String}
:state {:type 'String}
:zip {:type 'String}}}
:vendor :vendor
{:fields {:id {:type 'Int} {:fields {:id {:type 'Int}
:name {:type 'String} :name {:type 'String}
@@ -53,6 +58,7 @@
:print_as {:type 'String} :print_as {:type 'String}
:primary_contact {:type 'String} :primary_contact {:type 'String}
:address {:type :address}
:primary_email {:type 'String} :primary_email {:type 'String}
:primary_phone {:type 'String} :primary_phone {:type 'String}
@@ -176,10 +182,7 @@
:start {:type 'Int} :start {:type 'Int}
:end {:type 'Int}}} :end {:type 'Int}}}
:check_result {:fields {:invoices {:type '(list :invoice)} :check_result {:fields {:invoices {:type '(list :invoice)}
:pdf_url {:type 'String}}} :pdf_url {:type 'String}}}}
}

View File

@@ -27,21 +27,21 @@
(let [query [[:all_invoices (let [query [[:all_invoices
{:company-id (query-params "company")} {:company-id (query-params "company")}
[:id :total :outstanding-balance :invoice-number :date [:id :total :outstanding-balance :invoice-number :date
[:checks [:amount [:check [:check-number]]]] [:checks [:amount [:check [:check-number :memo [:bank_account [:id :number :bank-name :bank-code]]]]]]
[:vendor [:name :id]] [:vendor [:name :id :primary_contact [:address [:street1 :city :state :zip]]]]
[:expense_accounts [:amount :id :expense_account_id :location [:expense_accounts [:amount :id :expense_account_id :location
[:expense_account [:id :name [:parent [:id :name]]]]]] [:expense_account [:id :name [:parent [:id :name]]]]]]
[:company [:name :id :locations]]]]] [:company [:name :id :locations]]]]]
invoices (graphql/query identity (venia/graphql-query {:venia/queries (->graphql query)}))] invoices (graphql/query identity (venia/graphql-query {:venia/queries (->graphql query)}))]
(list (:all-invoices (:data invoices))))) (list (:all-invoices (:data invoices)))))
(GET "/checks/export" {:keys [query-params]} (GET "/checks/export" {:keys [query-params identity]}
(assert-admin identity) (assert-admin identity)
(let [query [[:all_checks (let [query [[:all_checks
{:company-id (query-params "company")} {:company-id (query-params "company")}
[:id :check-number :amount :memo :date [:id :check-number :amount :memo :date
[:invoices [:invoice-id :amount]] [:invoices [:invoice-id :amount]]
[:bank-account [:number :bank-name :bank-code]] [:bank-account [:number :bank-name :bank-code]]
[:vendor [:name :id :primary-contact :primary-email :primary-phone :default-expense-account]] [:vendor [:name :id :primary-contact :primary-email :primary-phone :default-expense-account [:address [:street1 :city :state :zip]]]]
[:company [:id :name]] [:company [:id :name]]
]]] ]]]
checks (graphql/query identity (venia/graphql-query {:venia/queries (->graphql query)}))] checks (graphql/query identity (venia/graphql-query {:venia/queries (->graphql query)}))]