tons of small fixes.
This commit is contained in:
@@ -31,13 +31,16 @@
|
||||
[typeahead-entity {:matches @(re-frame/subscribe [::subs/vendors])
|
||||
:type "typeahead-entity"
|
||||
:auto-focus true
|
||||
:match->text :name
|
||||
:match->text (fn [x]
|
||||
(str (:name x) " (" (reduce + 0 (map :count (:usage x))) " usages)") )
|
||||
:field [:from]}])
|
||||
|
||||
|
||||
(field "To Vendor"
|
||||
[typeahead-entity {:matches @(re-frame/subscribe [::subs/vendors])
|
||||
:type "typeahead-entity"
|
||||
:match->text :name
|
||||
:match->text (fn [x]
|
||||
(str (:name x) " (" (reduce + 0 (map :count (:usage x))) " usages)") )
|
||||
:field [:to]}])])))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
|
||||
@@ -40,7 +40,11 @@
|
||||
(for [v (:data page)]
|
||||
^{:key (str (:id v))}
|
||||
[grid/row {:class (:class v) :id (:id v)}
|
||||
[grid/cell {} (:name v)]
|
||||
[grid/cell {} (:name v)
|
||||
(let [total-usage (reduce + 0 (map :count (:usage v)))]
|
||||
(if (> total-usage 0 )
|
||||
[:div.mx-2.tag.is-info.is-light total-usage " usages, " (count (:usage v)) " clients" ]
|
||||
[:div.mx-2.tag.is-warning.is-light "Unused"]))]
|
||||
[grid/cell {} (:email (:primary-contact v))]
|
||||
[grid/cell {} (-> v :default-account :id accounts :name)]
|
||||
[grid/cell {}
|
||||
|
||||
Reference in New Issue
Block a user