added support
This commit is contained in:
@@ -230,6 +230,46 @@
|
||||
:subscription editing-vendor}]]
|
||||
" Never"]]]
|
||||
|
||||
|
||||
[:h2.subtitle "Clients"]
|
||||
|
||||
[horizontal-field
|
||||
nil
|
||||
[:div.control
|
||||
[:div.select.is-expanded
|
||||
[bind-field
|
||||
[:select {:type "select"
|
||||
:field :new-relationship-company
|
||||
:event ::events/change
|
||||
:subscription editing-vendor
|
||||
}
|
||||
(for [company @(re-frame/subscribe [::subs/companies])]
|
||||
[:option {:value (:id company)} (:name company)])]]]]
|
||||
[:div.control
|
||||
[bind-field
|
||||
[:input.input {:type "text"
|
||||
:field :new-relationship-account-number
|
||||
:subscription editing-vendor
|
||||
:event ::events/change
|
||||
:placeholder "Account number"}]]]
|
||||
[:div.control
|
||||
[:button.button.is-primary
|
||||
{:on-click (dispatch-event [::events/add-relationship])}
|
||||
[:span.icon
|
||||
[:i.fa.fa-plus]]]]]
|
||||
[horizontal-field
|
||||
nil
|
||||
[:ul
|
||||
(for [[i r] (map vector (range) (:relationships editing-vendor))]
|
||||
^{:key i}
|
||||
[:li (:account-number r)
|
||||
(:company-id r)
|
||||
[:a
|
||||
{:on-click (dispatch-event [::events/remove-relationship i])}
|
||||
[:span.icon
|
||||
[:i.fa.fa-times]]]]
|
||||
)]]
|
||||
|
||||
|
||||
(when (:saving? editing-vendor) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user