adding new invoices has validation.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[reagent.core :as r]
|
||||
[clojure.string :as str]
|
||||
[clojure.spec.alpha :as s]
|
||||
[auto-ap.entities.companies :as company]
|
||||
[auto-ap.entities.invoice :as invoice]
|
||||
[auto-ap.entities.vendors :as vendor]
|
||||
@@ -269,11 +270,11 @@
|
||||
(defn new-invoice-modal []
|
||||
(let [data @(re-frame/subscribe [::new-invoice])
|
||||
change-event [::events/change-form [::new-invoice]]]
|
||||
(println data)
|
||||
[action-modal {:id ::new-invoice
|
||||
:title "New Invoice"
|
||||
:action-text "Create"
|
||||
:save-event [::create-invoice]}
|
||||
:save-event [::create-invoice]
|
||||
:can-submit? (s/valid? ::invoice/invoice data)}
|
||||
[horizontal-field
|
||||
[:label.label "Vendor"]
|
||||
[bind-field
|
||||
|
||||
Reference in New Issue
Block a user