working on ui improvements.
This commit is contained in:
@@ -290,7 +290,6 @@
|
||||
(re-frame/reg-event-fx
|
||||
::change-expense-accounts
|
||||
(fn [{:keys [db]} [_ id]]
|
||||
(println "HELLLO")
|
||||
{:dispatch [::events/modal-status ::change-expense-accounts {:visible? true}]
|
||||
:db (assoc-in db [::change-expense-accounts :invoice] (get (by :id (get-in db [::invoice-page :invoices])) id))}))
|
||||
|
||||
@@ -529,6 +528,16 @@
|
||||
:action-text "Create"
|
||||
:save-event [::create-invoice]
|
||||
:can-submit? (s/valid? ::invoice/invoice data)}
|
||||
(when-not @(re-frame/subscribe [::subs/company])
|
||||
[horizontal-field
|
||||
[:label.label "Company"]
|
||||
[bind-field
|
||||
[typeahead {:matches (map (fn [x] [(:id x) (:name x)]) @(re-frame/subscribe [::subs/companies]))
|
||||
:type "typeahead"
|
||||
:field [:company-id]
|
||||
:event change-event
|
||||
:spec ::invoice/company-id
|
||||
:subscription data}]]])
|
||||
|
||||
[horizontal-field
|
||||
[:label.label "Vendor"]
|
||||
@@ -552,16 +561,7 @@
|
||||
:spec ::invoice/date
|
||||
:subscription data}]]]
|
||||
|
||||
(when-not @(re-frame/subscribe [::subs/company])
|
||||
[horizontal-field
|
||||
[:label.label "Company"]
|
||||
[bind-field
|
||||
[typeahead {:matches (map (fn [x] [(:id x) (:name x)]) @(re-frame/subscribe [::subs/companies]))
|
||||
:type "typeahead"
|
||||
:field [:company-id]
|
||||
:event change-event
|
||||
:spec ::invoice/company-id
|
||||
:subscription data}]]])
|
||||
|
||||
|
||||
[horizontal-field
|
||||
[:label.label "Invoice #"]
|
||||
@@ -583,7 +583,8 @@
|
||||
:event change-event
|
||||
:subscription data
|
||||
:spec ::invoice/total
|
||||
:step "0.01"}]]]]]]))
|
||||
:step "0.01"}]]]]]
|
||||
]))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user