lots of new features.

This commit is contained in:
Bryce Covert
2020-05-30 10:31:46 -07:00
parent d9bf9867e4
commit 3101dd1fe6
11 changed files with 61 additions and 23 deletions

View File

@@ -44,7 +44,7 @@
:graphql {:token token
:query-obj {:venia/queries [[:client
[:id :name :code :email :matches :locations [:location-matches [:location :match]] [:bank-accounts [:id :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations] ]
[:id :name :code :email :matches :locations [:location-matches [:location :match]] [:bank-accounts [:id :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]
[:address [:street1 :street2 :city :state :zip]]]]
[:vendor
[:id :name :hidden [:default-account [:name :id :location]] [:primary-contact [:name :phone :email :id]] [:secondary-contact [:id :name :phone :email]] :print-as :invoice-reminder-schedule :code
@@ -71,7 +71,7 @@
(fn [{:keys [db]} [_ token user]]
{:graphql {:token token
:query-obj {:venia/queries [[:client
[:id :name :code :matches :locations [:location-matches [:location :match]] [:address [:street1 :street2 :city :state :zip]] [:bank-accounts [:id :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations] ]]]
[:id :name :code :matches :locations [:location-matches [:location :match]] [:address [:street1 :street2 :city :state :zip]] [:bank-accounts [:id :code :number :bank-name :bank-code :check-number :name :routing :type :sort-order :visible :yodlee-account-id :locations :include-in-reports] ]]]
[:vendor
[:id :name :hidden [:default-account [:name :id :location]] [:primary-contact [:name :phone :email :id]] [:secondary-contact [:id :name :phone :email]] :print-as :invoice-reminder-schedule :code]]
[:accounts [:numeric-code :name :location :type :account_set :applicability :id [:client-overrides [:name [:client [:name :id]]]]]]]}

View File

@@ -75,10 +75,9 @@
[:a.navbar-item {:class [(active-when ap = :payments)]
:href (bidi/path-for routes/routes :payments)}
"Payments" ]
(when (not= "manager" (:user/role @user))
[:a.navbar-item {:class [(active-when ap = :transactions)]
:href (bidi/path-for routes/routes :transactions)}
"Transactions" ])
[:a.navbar-item {:class [(active-when ap = :transactions)]
:href (bidi/path-for routes/routes :transactions)}
"Transactions" ]
(when (not= "manager" (:user/role @user))
[:a.navbar-item {:class [(active-when ap = :ledger)]

View File

@@ -50,10 +50,11 @@
:city (:city (:address new-client-data))
:state (:state (:address new-client-data))
:zip (:zip (:address new-client-data))}
:bank-accounts (map (fn [{:keys [number name check-number type id code bank-name routing bank-code new? sort-order visible yodlee-account-id locations]}]
:bank-accounts (map (fn [{:keys [number name check-number include-in-reports type id code bank-name routing bank-code new? sort-order visible yodlee-account-id locations]}]
{:number number
:name name
:check-number check-number
:include-in-reports include-in-reports
:type type
:id id
:sort-order sort-order
@@ -415,7 +416,16 @@
[:ul
(for [location locations]
^{:key location} [:li location ])]
[:i "This account applies to all locations"])]])
[:i "This account applies to all locations"])]
[:div.field
[:label.checkbox
[bind-field
[:input {:type "checkbox"
:field [:bank-accounts sort-order :include-in-reports]
:event change-event
:subscription new-client}]]
" Include in reports"]
]])
(when active?
[:footer.card-footer

View File

@@ -162,15 +162,13 @@
params @(re-frame/subscribe [::params]) ;; Keep to make sure it doens'nt get disposed
ap @(re-frame/subscribe [::subs/active-page])
user (re-frame/subscribe [::subs/user])]
(if (not= "manager" (:user/role @user))
[side-bar-layout
{:side-bar [side-bar/side-bar]
:main [:div ^{:key approval-status}
[content]]
:bottom [:div
[manual/modal {:import-completed [::manual-import-completed ]}]]
:right-side-bar [appearing-side-bar
{:visible? transaction-bar-active?}
[edit/form {:edit-completed [::edit-completed]}]]}]
[:div "Not authorized"])))}))
[side-bar-layout
{:side-bar [side-bar/side-bar]
:main [:div ^{:key approval-status}
[content]]
:bottom [:div
[manual/modal {:import-completed [::manual-import-completed ]}]]
:right-side-bar [appearing-side-bar
{:visible? transaction-bar-active?}
[edit/form {:edit-completed [::edit-completed]}]]}]))}))