you can't add an existing invoice.
This commit is contained in:
@@ -22,9 +22,10 @@
|
||||
foot])]])
|
||||
|
||||
(defn action-modal [{:keys [title action-text id save-event can-submit?] :or {can-submit? true}} & rest]
|
||||
(let [{:keys [visible? saving?]} @(re-frame/subscribe [::subs/modal-state id])]
|
||||
(let [{:keys [visible? saving? error-message]} @(re-frame/subscribe [::subs/modal-state id])]
|
||||
(when visible?
|
||||
(-> [modal {:title title
|
||||
(-> [modal {:title [:span title
|
||||
]
|
||||
:foot [:input.button.is-primary {:type "submit"
|
||||
:tab-index "0"
|
||||
:form id
|
||||
@@ -45,7 +46,10 @@
|
||||
(into [:form {:id id
|
||||
:on-submit (fn [e]
|
||||
(.preventDefault e)
|
||||
(re-frame/dispatch [::events/modal-status id {:saving? true}])
|
||||
(re-frame/dispatch save-event))}]
|
||||
(re-frame/dispatch [::events/modal-status id {:saving? true :error-message nil}])
|
||||
(re-frame/dispatch save-event))}
|
||||
(when error-message
|
||||
[:div.notification.is-warning error-message])]
|
||||
|
||||
(r/children (r/current-component)) )]
|
||||
(into [(when saving? [:div.is-overlay {:style {"backgroundColor" "rgba(150,150,150, 0.5)"}}])])))))
|
||||
|
||||
Reference in New Issue
Block a user