almost allow completely adding new clients and sorting and filtering.

This commit is contained in:
BC
2019-02-18 09:33:32 -08:00
parent a5d0579164
commit b8dffa45d6
9 changed files with 105 additions and 34 deletions

View File

@@ -465,7 +465,7 @@
:field :bank-account-id
:event ::edit-payment-bank-account
:subscription advanced-print-checks}
(for [{:keys [id number name]} (:bank-accounts current-client)]
(for [{:keys [id number name]} (sort-by :sort-order (:bank-accounts current-client))]
^{:key id} [:option {:value id} name])]]]]
[:table.table.is-fullwidth
@@ -512,7 +512,7 @@
:field :bank-account-id
:event change-event
:subscription handwrite-checks}
(for [{:keys [id number name]} (:bank-accounts current-client)]
(for [{:keys [id number name]} (->> current-client :bank-accounts (filter #(= (:type %) :check)) (sort-by :sort-order))]
^{:key id} [:option {:value id} name])]]]]
[horizontal-field
@@ -776,7 +776,7 @@
[:div.dropdown-menu {:role "menu"}
[:div.dropdown-content
(list
(for [{:keys [id number name type]} (:bank-accounts current-client)]
(for [{:keys [id number name type]} (->> (:bank-accounts current-client) (filter :visible) (sort-by :sort-order))]
(if (= :cash type)
^{:key id} [:a.dropdown-item {:on-click (dispatch-event [::print-checks id :cash])} "With cash"]
(list