renamed company to client.

This commit is contained in:
Bryce Covert
2019-01-18 07:44:12 -08:00
parent 583752d740
commit 775150131e
38 changed files with 250 additions and 306 deletions

View File

@@ -1,6 +1,6 @@
(ns auto-ap.views.pages.transactions
(:require [re-frame.core :as re-frame]
[auto-ap.entities.companies :as company]
[auto-ap.entities.clients :as client]
[auto-ap.entities.vendors :as vendor]
[reagent.core :as reagent]
[goog.string :as gstring]
@@ -33,7 +33,7 @@
(assoc-in [::params] params))
:graphql {:token (-> cofx :db :user)
:query-obj {:venia/queries [[:transaction_page
(assoc params :client-id (:id @(re-frame/subscribe [::subs/company])))
(assoc params :client-id (:id @(re-frame/subscribe [::subs/client])))
[[:transactions [:id
:amount
:date
@@ -68,8 +68,8 @@
(fn [{:keys [id transaction-page status on-params-change vendors checked]}]
(let [{:keys [sort-by asc]} @state
{:keys [transactions start end count total]} @transaction-page
selected-company @(re-frame/subscribe [::subs/company])
percentage-size (if selected-company "25%" "33%")]
selected-client @(re-frame/subscribe [::subs/client])
percentage-size (if selected-client "25%" "33%")]
[:div
[paginator {:start start :end end :count count :total total
:on-change (fn [p ]
@@ -79,7 +79,7 @@
[:table.table.is-fullwidth
[:thead
[:tr
(when-not selected-company
(when-not selected-client
[sorted-column {:on-sort opc
:style {:width percentage-size :cursor "pointer"}
:sort-key "client"
@@ -126,7 +126,7 @@
^{:key id}
[:tr {:class (:class i)}
(when-not selected-company
(when-not selected-client
[:td (:name client)])
[:td description-original]
[:td (date->str date) ]
@@ -145,7 +145,7 @@
::manual-yodlee-import
(fn [{:keys [db]} _]
{:dispatch [::events/modal-status ::manual-yodlee-import {:visible? true}]
:db (assoc-in db [::manual-yodlee-import] {:company-id (:id @(re-frame/subscribe [::subs/company]))
:db (assoc-in db [::manual-yodlee-import] {:client-id (:id @(re-frame/subscribe [::subs/client]))
:data ""})}))
(re-frame/reg-sub
@@ -201,7 +201,7 @@
(with-meta
(fn []
(let [notification (re-frame/subscribe [::notification])
current-company @(re-frame/subscribe [::subs/company])
current-client @(re-frame/subscribe [::subs/client])
user @(re-frame/subscribe [::subs/user])]
[:div