handling errors

This commit is contained in:
Bryce Covert
2018-04-09 14:46:10 -07:00
parent d69b1f2b81
commit 3da61b0057
3 changed files with 48 additions and 30 deletions

View File

@@ -90,6 +90,9 @@
(if (::entity/id editing-vendor)
(str "Edit " (or (::entity/name editing-vendor) "<vendor>"))
(str "Add " (or (::entity/name editing-vendor) "<new vendor>")))]
(when (:error editing-vendor)
[:span.icon.has-text-danger
[:i.fa.fa-exclamation-triangle]])
[:button.delete {:on-click (fn [] (re-frame/dispatch [::events/edit nil]))}]]
[:section.modal-card-body
[horizontal-field
@@ -208,23 +211,23 @@
[horizontal-field
[:label.label "Invoice Reminders"]
[:div.control
[:label.radio
[bind-field
[:input {:type "radio"
:name "schedule"
:value "Weekly"
:field ::entity/invoice-reminder-schedule
:subscription editing-vendor}]]
[:label.radio
[bind-field
[:input {:type "radio"
:name "schedule"
:value "Weekly"
:field ::entity/invoice-reminder-schedule
:subscription editing-vendor}]]
" Send weekly"]
" Send weekly"]
[:label.radio
[bind-field
[:input {:type "radio"
:name "schedule"
:value "Never"
:field ::entity/invoice-reminder-schedule
:subscription editing-vendor}]]
" Never"]]]
[:label.radio
[bind-field
[:input {:type "radio"
:name "schedule"
:value "Never"
:field ::entity/invoice-reminder-schedule
:subscription editing-vendor}]]
" Never"]]]
(when (:saving? editing-vendor) [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])]