adds support for bulk voids.

This commit is contained in:
2022-02-18 07:53:34 -08:00
parent ea490c5859
commit 0f8dcd43e1
6 changed files with 325 additions and 193 deletions

View File

@@ -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