adds support for bulk voids.
This commit is contained in:
@@ -132,7 +132,9 @@
|
||||
::voided-selected
|
||||
(fn [cofx [_]]
|
||||
{:dispatch-n [[::modal/modal-closed]
|
||||
[::params-change @(re-frame/subscribe [::data-page/params ::page])]]}))
|
||||
[::params-change @(re-frame/subscribe [::data-page/params ::page])]
|
||||
[::data-page/reset-checked :invoices]]}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::void-selected
|
||||
(fn [cofx [_ which]]
|
||||
@@ -142,15 +144,14 @@
|
||||
:owns-state {:single ::void-selected}
|
||||
:query-obj
|
||||
{:venia/operation {:operation/type :mutation
|
||||
:operation/name "DeleteTransactions"}
|
||||
:operation/name "VoidInvoices"}
|
||||
:venia/queries [{:query/data
|
||||
[:void-invoices
|
||||
{:filters (some-> checked-params table/data-params->query-params)
|
||||
:ids specific-invoices}
|
||||
[:message]]}]}
|
||||
:on-success (fn [result]
|
||||
[::voided-selected])}
|
||||
:dispatch [::data-page/reset-checked ::page]})))
|
||||
:on-success (fn [_]
|
||||
[::voided-selected])}})))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::void-selected-requested
|
||||
|
||||
Reference in New Issue
Block a user