working on new panel.
This commit is contained in:
@@ -204,7 +204,7 @@
|
||||
[:form
|
||||
[:h1.title.is-2 "Add client"]
|
||||
[:div.field
|
||||
[:label.label "Name"]
|
||||
[:p.help "Name"]
|
||||
[:div.control
|
||||
[bind-field
|
||||
[:input.input {:type "text"
|
||||
@@ -214,7 +214,7 @@
|
||||
:subscription new-client}]]]]
|
||||
|
||||
[:div.field
|
||||
[:label.label "Client code"]
|
||||
[:p.help "Client code"]
|
||||
[:div.control
|
||||
[bind-field
|
||||
[:input.input {:type "code"
|
||||
@@ -224,7 +224,7 @@
|
||||
:subscription new-client}]]]]
|
||||
|
||||
[:div.field
|
||||
[:label.label "Email"]
|
||||
[:p.help "Email"]
|
||||
[:div.control
|
||||
[bind-field
|
||||
[:input.input {:type "email"
|
||||
@@ -234,7 +234,7 @@
|
||||
:subscription new-client}]]]]
|
||||
|
||||
[:div.field
|
||||
[:label.label "Locations"]
|
||||
[:p.help "Locations"]
|
||||
[:div.control
|
||||
[:div.field.has-addons
|
||||
[:p.control
|
||||
@@ -253,9 +253,33 @@
|
||||
[address-field {:field [:address]
|
||||
:event ::change-new
|
||||
:subscription new-client}]]
|
||||
[:nav.panel
|
||||
[:p.panel-heading "Bank accounts"]
|
||||
(for [{:keys [type code name number check-number id]} (:bank-accounts new-client)]
|
||||
(if id
|
||||
^{:key code}
|
||||
|
||||
[:a.panel-block {:style {:position "relative"}}
|
||||
[:span.panel-icon
|
||||
(if (= type :check)
|
||||
[:span.icon-check-payment-sign]
|
||||
[:span.icon-accounting-bill])]
|
||||
code ": " name]
|
||||
|
||||
^{:key code}
|
||||
[:li [:strong "* " code ": " name] [:button.button {:on-click (dispatch-event [::remove-new-bank-account code])} [:span.icon [:i.fa.fa-times]]]]))
|
||||
[:div.panel-block
|
||||
[:nav.level
|
||||
[:div.level-item.has-text-centered
|
||||
[:button.button.is-outlined.is-primary.is-fullwidth "Add Checking Account"]]
|
||||
[:div.level-item.has-text-centered
|
||||
|
||||
[:button.button.is-outlined.is-primary.is-fullwidth "Add Cash Account"]]]]
|
||||
#_(for [[index {:keys [name code number check-number]}] (map vector (range) (:new-bank-accounts new-client))]
|
||||
^{:key index} [:li [:strong "* " code ": " name] [:button.button {:on-click (dispatch-event [::remove-new-bank-account index])} [:span.icon [:i.fa.fa-times]]]])]
|
||||
|
||||
[:h2.subtitle "Add bank account"]
|
||||
[:div {:style {:padding-bottom "0.75em" :padding-top "0.75em" :background "hsl(0, 0%, 96%)"}}
|
||||
#_[:h2.subtitle "Add bank account"]
|
||||
#_[:div {:style {:padding-bottom "0.75em" :padding-top "0.75em" :background "hsl(0, 0%, 96%)"}}
|
||||
[:label.label "General"]
|
||||
[horizontal-field
|
||||
nil
|
||||
@@ -348,21 +372,7 @@
|
||||
"disabled")
|
||||
:on-click (dispatch-event [::add-new-bank-account])} "Add"]]]]
|
||||
|
||||
[:section.section {:style {:padding-bottom "0.75em" :padding-top "0.75em"}}
|
||||
[:h2.subtitle "Bank Accounts"]
|
||||
[:div.field
|
||||
nil
|
||||
[:div.control
|
||||
[:ul
|
||||
|
||||
(for [{:keys [code name number check-number id]} (:bank-accounts new-client)]
|
||||
(if id
|
||||
^{:key code}
|
||||
[:li code ": " name]
|
||||
^{:key code}
|
||||
[:li [:strong "* " code ": " name] [:button.button {:on-click (dispatch-event [::remove-new-bank-account code])} [:span.icon [:i.fa.fa-times]]]]))
|
||||
(for [[index {:keys [name code number check-number]}] (map vector (range) (:new-bank-accounts new-client))]
|
||||
^{:key index} [:li [:strong "* " code ": " name] [:button.button {:on-click (dispatch-event [::remove-new-bank-account index])} [:span.icon [:i.fa.fa-times]]]])]]]]
|
||||
|
||||
|
||||
#_(when (:saving? new-client) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])
|
||||
#_(println (s/explain-data ::entity/client new-client))
|
||||
|
||||
Reference in New Issue
Block a user