started on expense accounts.

This commit is contained in:
Bryce Covert
2018-05-31 18:43:12 -07:00
parent d38059cb1d
commit b98d00a196
14 changed files with 128 additions and 12 deletions

View File

@@ -10,6 +10,9 @@
[auto-ap.views.components.modal :refer [modal]]
[clojure.spec.alpha :as s]
[auto-ap.views.utils :refer [login-url dispatch-value-change dispatch-event bind-field horizontal-field]]
[auto-ap.views.components.typeahead :refer [typeahead]]
[auto-ap.expense-accounts :refer [expense-accounts]]
[cljs.reader :as edn]
[auto-ap.routes :as routes]
[bidi.bidi :as bidi]))
@@ -187,13 +190,26 @@
:event ::events/change
:subscription editing-vendor}]]
" Never"]]]
[:h2.subtitle "Expense Accounts"]
[horizontal-field
[:label.label "Default"]
[bind-field
[typeahead {:matches (map (fn [[k v]] [k (:name v)]) expense-accounts)
:type "typeahead"
:field [:default-expense-account]
:spec ::entity/default-expense-account
:event ::events/change
:subscription editing-vendor}]]]
[:h2.subtitle "Clients"]
#_[:h2.subtitle "Clients"]
[horizontal-field
#_[horizontal-field
nil
[:div.control
[:div.control@(re-frame/subscribe [::subs/exp])
[:div.select.is-expanded
[bind-field
[:select {:type "select"
@@ -214,7 +230,7 @@
{:on-click (dispatch-event [::events/add-relationship])}
[:span.icon
[:i.fa.fa-plus]]]]]
[horizontal-field
#_[horizontal-field
nil
[:ul
(for [[i r] (map vector (range) (:relationships editing-vendor))]