feat: bulk transcations delete

This commit is contained in:
Ahmed Bouhuolia
2025-11-03 21:40:24 +02:00
parent 8161439365
commit a0bc9db9a6
107 changed files with 2213 additions and 156 deletions

View File

@@ -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,
};
};

View File

@@ -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);
},