tons of bug fixes
This commit is contained in:
@@ -184,7 +184,6 @@
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::succeeded
|
||||
[(forms/triggers-stop ::form)]
|
||||
(fn [{:keys [db]} [_ {:keys [invoice-created invoice-printed]} command result]]
|
||||
(let [invoice (condp = command
|
||||
:edit (:edit-invoice result)
|
||||
@@ -192,11 +191,13 @@
|
||||
:create (:add-invoice result)
|
||||
|
||||
:add-and-print (first (:invoices (:add-and-print-invoice result))))]
|
||||
|
||||
|
||||
{:db (cond-> db
|
||||
(#{:create :add-and-print} command) (forms/start-form ::form {:client @(re-frame/subscribe [::subs/client])
|
||||
:status :unpaid
|
||||
:date (date->str (c/now) standard)}))
|
||||
:date (date->str (c/now) standard)})
|
||||
(= :edit command) (forms/stop-form ::form))
|
||||
:dispatch-n (cond-> [(conj invoice-created invoice)]
|
||||
(= :add-and-print command) (conj (conj invoice-printed (:pdf-url (:add-and-print-invoice result)))))})))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user