mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: bulk transcations delete
This commit is contained in:
@@ -15,4 +15,14 @@ export const resetAccountsTableState = () => {
|
||||
return {
|
||||
type: t.ACCOUNTS_TABLE_STATE_RESET,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the selected rows for accounts table.
|
||||
*/
|
||||
export const setAccountsSelectedRows = (selectedRows) => {
|
||||
return {
|
||||
type: 'ACCOUNTS/SET_SELECTED_ROWS',
|
||||
payload: selectedRows,
|
||||
};
|
||||
};
|
||||
@@ -13,6 +13,7 @@ export const defaultTableQuery = {
|
||||
|
||||
const initialState = {
|
||||
tableState: defaultTableQuery,
|
||||
selectedRows: [],
|
||||
};
|
||||
|
||||
const STORAGE_KEY = 'bigcapital:accounts';
|
||||
@@ -26,6 +27,10 @@ const CONFIG = {
|
||||
const reducerInstance = createReducer(initialState, {
|
||||
...createTableStateReducers('ACCOUNTS', defaultTableQuery),
|
||||
|
||||
[`ACCOUNTS/SET_SELECTED_ROWS`]: (state, action) => {
|
||||
state.selectedRows = action.payload;
|
||||
},
|
||||
|
||||
[t.RESET]: () => {
|
||||
purgeStoredState(CONFIG);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user