weekly debits/credits.

This commit is contained in:
Bryce Covert
2020-05-30 11:49:21 -07:00
parent 3101dd1fe6
commit bb2df01d89
9 changed files with 140 additions and 56 deletions

View File

@@ -44,7 +44,8 @@
:email (:email new-client-data)
:locations (:locations new-client-data)
:matches (vec (:matches new-client-data))
:location-matches (:location-matches new-client-data)
:location-matches (:location-matches new-client-data) :weekly-credits (:weekly-credits new-client-data)
:weekly-debits (:weekly-debits new-client-data)
:address {:street1 (:street1 (:address new-client-data))
:street2 (:street2 (:address new-client-data)),
:city (:city (:address new-client-data))
@@ -90,7 +91,10 @@
:operation/name "EditClient"}
:venia/queries [{:query/data [:edit-client
{:edit-client new-client-req}
[:id :name :code :email :locations :matches [:location-matches [:location :match]] [:address [:street1 :street2 :city :state :zip]] [:bank-accounts [:id :number :check-number :name :code :bank-code :bank-name :routing :type :visible :yodlee-account-id :sort-order :locations]]]]}]}
[:id :name :code :email :locations :matches :weekly-debits :weekly-credits
[:location-matches [:location :match]]
[:address [:street1 :street2 :city :state :zip]]
[:bank-accounts [:id :number :check-number :name :code :bank-code :bank-name :routing :type :visible :yodlee-account-id :sort-order :locations]]]]}]}
:on-success [::save-complete]
:on-error [::forms/save-error ::new-client]}}
{:db new-client-form}))))
@@ -556,6 +560,27 @@
#_(when (:saving? new-client) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])
#_(println (s/explain-data ::entity/client new-client))
[:div.field
[:p.help "Weekly credits"]
[:div.control
[bind-field
[:input.input {:type "number"
:placeholder "250.00"
:field [:weekly-credits]
:step "0.01"
:event change-event
:subscription new-client}]]]]
[:div.field
[:p.help "Weekly debits"]
[:div.control
[bind-field
[:input.input {:type "number"
:placeholder "250.00"
:field [:weekly-debits]
:step "0.01"
:event change-event
:subscription new-client}]]]]
(when error
[:div.notification.is-warning.animated.fadeInUp
error])