If user chooses Imported Entry, then the note will appear. Also add ability to exclude.
This commit is contained in:
@@ -256,6 +256,7 @@
|
||||
[[:journal-entries [:id
|
||||
:source
|
||||
:original-entity
|
||||
:note
|
||||
:amount
|
||||
:alternate-description
|
||||
[:vendor
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
[drop-down drop-down-contents]]
|
||||
[auto-ap.views.components.grid :as grid]
|
||||
[auto-ap.views.pages.data-page :as data-page]
|
||||
[clojure.string :as str]
|
||||
[auto-ap.views.utils
|
||||
:refer
|
||||
[date->str dispatch-event-with-propagation nf action-cell-width]]
|
||||
@@ -15,14 +16,20 @@
|
||||
[cemerick.url :as url]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(defn ledger-row [{{:keys [client vendor alternate-description status date amount id line-items source original-entity] :as i} :row
|
||||
(defn ledger-row [{{:keys [client vendor alternate-description note status date amount id line-items source original-entity] :as i} :row
|
||||
:keys [selected-client accounts-by-id bank-accounts-by-id]}]
|
||||
[:<>
|
||||
[grid/row {:class (:class i) :id id}
|
||||
(when-not selected-client
|
||||
[grid/cell {} (:name client)])
|
||||
[grid/cell {} (if vendor
|
||||
[grid/cell {} (cond
|
||||
(and (= "Imported Entry" (:name vendor)) (not (str/blank? note)))
|
||||
note
|
||||
|
||||
vendor
|
||||
(:name vendor)
|
||||
|
||||
:else
|
||||
[:i.has-text-grey (or (when alternate-description (str "Bank Description: " alternate-description))
|
||||
"Unknown Merchant")])]
|
||||
[grid/cell {} (date->str date) ]
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
:owns-state {:single ::delete-selected}
|
||||
:query-obj
|
||||
{:venia/operation {:operation/type :mutation
|
||||
:operation/name "UnapproveTransactions"}
|
||||
:operation/name "DeleteTransactions"}
|
||||
:venia/queries [{:query/data
|
||||
[:delete-transactions
|
||||
{:filters (some-> checked-params data-params->query-params)
|
||||
@@ -165,6 +165,12 @@
|
||||
:disabled (or (status/disabled-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||
(not (seq checked)))}
|
||||
"Unapprove selected"]
|
||||
|
||||
[:button.button.is-warning {:on-click (dispatch-event [::bulk-change-transaction-status :excluded params])
|
||||
:class (status/class-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||
:disabled (or (status/disabled-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||
(not (seq checked)))}
|
||||
"Exclude selected"]
|
||||
[:button.button.is-warning {:on-click (dispatch-event [::bulk-change-transaction-status :requires-feedback params])
|
||||
:class (status/class-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||
:disabled (or (status/disabled-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||
|
||||
Reference in New Issue
Block a user