allowing saving after saving.
This commit is contained in:
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
(def email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$")
|
(def email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$")
|
||||||
(s/def ::id int)
|
(s/def ::id int)
|
||||||
(s/def ::identifier (s/nilable string?))
|
(s/def ::identifier (s/nilable string?)) (s/def ::required-identifier (s/and string?
|
||||||
(s/def ::required-identifier (s/and string?
|
|
||||||
#(not (str/blank? %))))
|
#(not (str/blank? %))))
|
||||||
|
|
||||||
(s/def ::name ::required-identifier)
|
(s/def ::name ::required-identifier)
|
||||||
@@ -17,14 +16,14 @@
|
|||||||
(s/def ::phone (s/nilable string?))
|
(s/def ::phone (s/nilable string?))
|
||||||
|
|
||||||
(s/def ::invoice-reminder-schedule (s/nilable #{"Weekly" "Never" nil}))
|
(s/def ::invoice-reminder-schedule (s/nilable #{"Weekly" "Never" nil}))
|
||||||
(s/def ::primary-contact ::identifier)
|
(s/def ::primary-contact (s/nilable ::identifier))
|
||||||
(s/def ::primary-email ::email)
|
(s/def ::primary-email (s/nilable ::email))
|
||||||
(s/def ::primary-phone ::phone)
|
(s/def ::primary-phone (s/nilable ::phone))
|
||||||
|
|
||||||
(s/def ::secondary-contact ::identifier)
|
(s/def ::secondary-contact (s/nilable ::identifier))
|
||||||
(s/def ::secondary-email ::email)
|
(s/def ::secondary-email (s/nilable ::email))
|
||||||
(s/def ::secondary-phone ::phone)
|
(s/def ::secondary-phone (s/nilable ::phone))
|
||||||
(s/def ::address ::address/address)
|
(s/def ::address (s/nilable ::address/address))
|
||||||
(s/def ::default-expense-account int?)
|
(s/def ::default-expense-account int?)
|
||||||
|
|
||||||
(s/def ::code (s/nilable string?))
|
(s/def ::code (s/nilable string?))
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
[auto-ap.subs :as subs]))
|
[auto-ap.subs :as subs]))
|
||||||
|
|
||||||
(defn vendor-dialog [{:keys [vendor save-event change-event id] {:keys [name]} :vendor}]
|
(defn vendor-dialog [{:keys [vendor save-event change-event id] {:keys [name]} :vendor}]
|
||||||
|
|
||||||
(let [companies-by-id @(re-frame/subscribe [::subs/companies-by-id])]
|
(let [companies-by-id @(re-frame/subscribe [::subs/companies-by-id])]
|
||||||
[action-modal {:id id
|
[action-modal {:id id
|
||||||
:title [:span (if (:id vendor)
|
:title [:span (if (:id vendor)
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
:save-event save-event
|
:save-event save-event
|
||||||
:can-submit? (s/valid? ::entity/vendor vendor)}
|
:can-submit? (s/valid? ::entity/vendor vendor)}
|
||||||
|
|
||||||
(doto (s/explain ::entity/vendor vendor) println)
|
|
||||||
|
|
||||||
[horizontal-field
|
[horizontal-field
|
||||||
[:label.label "Name"]
|
[:label.label "Name"]
|
||||||
|
|||||||
Reference in New Issue
Block a user