showing matched rule.
This commit is contained in:
@@ -151,6 +151,12 @@
|
||||
false
|
||||
%))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::is-admin?
|
||||
:<- [::user]
|
||||
(fn [user]
|
||||
(= "admin" (:user/role user))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
::user
|
||||
(fn [db]
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:amount
|
||||
:location
|
||||
:exclude-from-ledger
|
||||
[:matched-rule [:note :id]]
|
||||
[:vendor [:name :id]]
|
||||
[:accounts [:id :amount :location [:account [:name :id :location :numeric-code]]]]
|
||||
:date
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
(-> which
|
||||
(select-keys [:vendor :amount :payment :client :description-original
|
||||
:yodlee-merchant :id :potential-payment-matches
|
||||
:exclude-from-ledger :location :accounts :transaction-approval-status])
|
||||
:exclude-from-ledger :location :accounts :transaction-approval-status
|
||||
:matched-rule])
|
||||
(assoc :potential-payment-matches potential-payment-matches)
|
||||
(update :accounts expense-accounts-field/from-graphql (:amount which) locations))))))
|
||||
|
||||
@@ -114,7 +115,6 @@
|
||||
|
||||
|
||||
(defn potential-payment-matches-box [{:keys [potential-payment-matches] :as params}]
|
||||
(println potential-payment-matches)
|
||||
[:div.box
|
||||
[:div.columns
|
||||
[:div.column
|
||||
@@ -140,10 +140,18 @@
|
||||
locations @(re-frame/subscribe [::subs/locations-for-client (:id (:client data))])
|
||||
{:keys [form field raw-field error-notification submit-button ]} transaction-form]
|
||||
[form {:title "Hello" :edit-completed edit-completed}
|
||||
[field "Merchant"
|
||||
[:input.input {:type "text"
|
||||
:field [:yodlee-merchant :name]
|
||||
:disabled "disabled"}]]
|
||||
|
||||
(when @(re-frame/subscribe [::subs/is-admin?])
|
||||
[field "Merchant"
|
||||
[:input.input {:type "text"
|
||||
:field [:yodlee-merchant :name]
|
||||
:disabled "disabled"}]])
|
||||
|
||||
(when @(re-frame/subscribe [::subs/is-admin?])
|
||||
[field "Matched Rule"
|
||||
[:input.input {:type "text"
|
||||
:field [:matched-rule :note]
|
||||
:disabled "disabled"}]])
|
||||
[field "Amount"
|
||||
[:input.input {:type "text"
|
||||
:field [:amount]
|
||||
|
||||
Reference in New Issue
Block a user