diff --git a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs index 2c961dd7..26564569 100644 --- a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs +++ b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs @@ -256,6 +256,7 @@ [[:journal-entries [:id :source :original-entity + :note :amount :alternate-description [:vendor diff --git a/src/cljs/auto_ap/views/pages/ledger/table.cljs b/src/cljs/auto_ap/views/pages/ledger/table.cljs index 99dada75..b0a4cc6c 100644 --- a/src/cljs/auto_ap/views/pages/ledger/table.cljs +++ b/src/cljs/auto_ap/views/pages/ledger/table.cljs @@ -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) ] diff --git a/src/cljs/auto_ap/views/pages/transactions.cljs b/src/cljs/auto_ap/views/pages/transactions.cljs index 4972b8a5..a33d1aac 100644 --- a/src/cljs/auto_ap/views/pages/transactions.cljs +++ b/src/cljs/auto_ap/views/pages/transactions.cljs @@ -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]))