remove excluded from ledger.

This commit is contained in:
Bryce Covert
2019-05-19 08:06:21 -07:00
parent 9396bbb7eb
commit cf2319b681
19 changed files with 3508 additions and 144 deletions

View File

@@ -4,7 +4,6 @@
[:id
:amount
:location
:exclude-from-ledger
:approval-status
[:matched-rule [:note :id]]
[:vendor [:name :id]]

View File

@@ -15,14 +15,13 @@
(re-frame/reg-sub
::submit-query
:<- [::forms/form ::form]
(fn [{{:keys [id vendor accounts exclude-from-ledger approval-status]} :data}]
(fn [{{:keys [id vendor accounts approval-status]} :data}]
{:venia/operation {:operation/type :mutation
:operation/name "EditTransaction"}
:venia/queries [{:query/data
[:edit-transaction
{:transaction {:id id
:vendor-id (:id vendor)
:exclude-from-ledger exclude-from-ledger
:approval-status approval-status
:accounts (map
(fn [{:keys [id account amount location]}]
@@ -51,7 +50,7 @@
(-> which
(select-keys [:vendor :amount :payment :client :description-original
:yodlee-merchant :id :potential-payment-matches
:exclude-from-ledger :location :accounts :approval-status
:location :accounts :approval-status
:matched-rule])
(assoc :potential-payment-matches (if (:matched-rule which)
nil
@@ -243,21 +242,7 @@
:locations locations}]]
[:div.field
[:label.checkbox
[raw-field
[:input
{:type "checkbox"
:field [:exclude-from-ledger]}]]
" Exclude from ledger"]]
[field "Include in ledger"
[button-radio
{:type "button-radio"
:field [:exclude-from-ledger]
:options [[true "Exclude from Ledger"]
[false "Include in Ledger"]
]}]]
[field "Approval Status"
[button-radio
@@ -265,7 +250,8 @@
:field [:approval-status]
:options [[:unapproved "Unapproved"]
[:requires-feedback "Client Review"]
[:approved "Approved"]]}]]
[:approved "Approved"]
[:excluded "Excluded from Ledger"]]}]]
[:hr]