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
|
[[:journal-entries [:id
|
||||||
:source
|
:source
|
||||||
:original-entity
|
:original-entity
|
||||||
|
:note
|
||||||
:amount
|
:amount
|
||||||
:alternate-description
|
:alternate-description
|
||||||
[:vendor
|
[:vendor
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
[drop-down drop-down-contents]]
|
[drop-down drop-down-contents]]
|
||||||
[auto-ap.views.components.grid :as grid]
|
[auto-ap.views.components.grid :as grid]
|
||||||
[auto-ap.views.pages.data-page :as data-page]
|
[auto-ap.views.pages.data-page :as data-page]
|
||||||
|
[clojure.string :as str]
|
||||||
[auto-ap.views.utils
|
[auto-ap.views.utils
|
||||||
:refer
|
:refer
|
||||||
[date->str dispatch-event-with-propagation nf action-cell-width]]
|
[date->str dispatch-event-with-propagation nf action-cell-width]]
|
||||||
@@ -15,14 +16,20 @@
|
|||||||
[cemerick.url :as url]
|
[cemerick.url :as url]
|
||||||
[re-frame.core :as re-frame]))
|
[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]}]
|
:keys [selected-client accounts-by-id bank-accounts-by-id]}]
|
||||||
[:<>
|
[:<>
|
||||||
[grid/row {:class (:class i) :id id}
|
[grid/row {:class (:class i) :id id}
|
||||||
(when-not selected-client
|
(when-not selected-client
|
||||||
[grid/cell {} (:name 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)
|
(:name vendor)
|
||||||
|
|
||||||
|
:else
|
||||||
[:i.has-text-grey (or (when alternate-description (str "Bank Description: " alternate-description))
|
[:i.has-text-grey (or (when alternate-description (str "Bank Description: " alternate-description))
|
||||||
"Unknown Merchant")])]
|
"Unknown Merchant")])]
|
||||||
[grid/cell {} (date->str date) ]
|
[grid/cell {} (date->str date) ]
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
:owns-state {:single ::delete-selected}
|
:owns-state {:single ::delete-selected}
|
||||||
:query-obj
|
:query-obj
|
||||||
{:venia/operation {:operation/type :mutation
|
{:venia/operation {:operation/type :mutation
|
||||||
:operation/name "UnapproveTransactions"}
|
:operation/name "DeleteTransactions"}
|
||||||
:venia/queries [{:query/data
|
:venia/queries [{:query/data
|
||||||
[:delete-transactions
|
[:delete-transactions
|
||||||
{:filters (some-> checked-params data-params->query-params)
|
{: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]))
|
:disabled (or (status/disabled-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||||
(not (seq checked)))}
|
(not (seq checked)))}
|
||||||
"Unapprove selected"]
|
"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])
|
[: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]))
|
: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]))
|
:disabled (or (status/disabled-for @(re-frame/subscribe [::status/single ::bulk-change-transaction-status]))
|
||||||
|
|||||||
Reference in New Issue
Block a user