mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
WIP feature/Bulk delete items
This commit is contained in:
@@ -76,3 +76,19 @@ export const deleteItem = ({ id }) => {
|
||||
}).catch((error) => { reject(error); });
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
export const deleteBulkItems = ({ ids }) => {
|
||||
return dispatch => new Promise((resolve, reject) => {
|
||||
ApiService.delete(`items`, { params: { ids }}).then((response) => {
|
||||
dispatch({
|
||||
type: t.ITEMS_BULK_DELETE,
|
||||
payload: { ids }
|
||||
});
|
||||
resolve(response);
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user