Tons of small fixes
This commit is contained in:
@@ -186,6 +186,16 @@
|
||||
(if (= which (:id i))
|
||||
(assoc-in i f v)
|
||||
i))))))
|
||||
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::action-failed
|
||||
[(re-frame/path [::invoice-page])]
|
||||
(fn [db [_ result]]
|
||||
(-> db
|
||||
(assoc :action-notification (first (map :message result)))
|
||||
(assoc :print-checks-loading? false))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::edit-handwritten-payment
|
||||
(fn [db [_ which f v]]
|
||||
@@ -224,7 +234,8 @@
|
||||
bank-account-id
|
||||
type
|
||||
(:client db))
|
||||
:on-success [::checks-created]}}))
|
||||
:on-success [::checks-created]
|
||||
:on-error [::action-failed]}}))
|
||||
|
||||
|
||||
|
||||
@@ -273,6 +284,7 @@
|
||||
invoices)))
|
||||
(assoc-in [::invoice-page :checked] nil)
|
||||
(assoc-in [::invoice-page :print-checks-loading?] false)
|
||||
(assoc-in [::invoice-page :action-notification] nil)
|
||||
(assoc-in [::advanced-print-checks :printing?] false)
|
||||
(assoc-in [::advanced-print-checks :shown?] false))
|
||||
:dispatch [::checks-printed pdf-url]})))
|
||||
@@ -614,10 +626,13 @@
|
||||
]))))
|
||||
|
||||
(defn unpaid-invoices-content [{:keys [status] :as params}]
|
||||
(let [{:keys [checked print-checks-shown? print-checks-loading? advanced-print-shown? vendor-filter]} @(re-frame/subscribe [::invoice-page])
|
||||
(let [{:keys [checked action-notification print-checks-shown? print-checks-loading? advanced-print-shown? vendor-filter]} @(re-frame/subscribe [::invoice-page])
|
||||
current-client @(re-frame/subscribe [::subs/client])]
|
||||
[:div
|
||||
#_[:h1.title (str (str/capitalize (or status "all")) " invoices")]
|
||||
(when action-notification
|
||||
[:div.notification
|
||||
action-notification])
|
||||
(when (= status :unpaid)
|
||||
[pay-button {:print-checks-shown? print-checks-shown? :checked-invoices checked :print-checks-loading? print-checks-loading?}])
|
||||
[table/invoice-table {:id :unpaid
|
||||
|
||||
Reference in New Issue
Block a user