mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
feat: document the Redux mutation methods
This commit is contained in:
@@ -76,17 +76,29 @@ const mapDipatchToProps = (dispatch: any): WithBankingActionsProps => ({
|
|||||||
),
|
),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the excluded selected transactions
|
* Resets the excluded selected transactions.
|
||||||
*/
|
*/
|
||||||
resetExcludedTransactionsSelected: () =>
|
resetExcludedTransactionsSelected: () =>
|
||||||
dispatch(resetExcludedTransactionsSelected()),
|
dispatch(resetExcludedTransactionsSelected()),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selected transactions to categorize or match.
|
||||||
|
* @param {Array<string | number>} ids
|
||||||
|
*/
|
||||||
setTransactionsToCategorizeSelected: (ids: Array<string | number>) =>
|
setTransactionsToCategorizeSelected: (ids: Array<string | number>) =>
|
||||||
dispatch(setTransactionsToCategorizeSelected({ ids })),
|
dispatch(setTransactionsToCategorizeSelected({ ids })),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the selected transactions to categorize or match.
|
||||||
|
*/
|
||||||
resetTransactionsToCategorizeSelected: () =>
|
resetTransactionsToCategorizeSelected: () =>
|
||||||
dispatch(resetTransactionsToCategorizeSelected()),
|
dispatch(resetTransactionsToCategorizeSelected()),
|
||||||
|
|
||||||
enableMultipleCategorization: (enable) =>
|
/**
|
||||||
|
* Enables/Disables the multiple selection to categorize or match.
|
||||||
|
* @param {boolean} enable
|
||||||
|
*/
|
||||||
|
enableMultipleCategorization: (enable: boolean) =>
|
||||||
dispatch(enableMultipleCategorization({ enable })),
|
dispatch(enableMultipleCategorization({ enable })),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,11 @@ export const PlaidSlice = createSlice({
|
|||||||
state.excludedTransactionsSelected = [];
|
state.excludedTransactionsSelected = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the selected transactions to categorize or match.
|
||||||
|
* @param {StorePlaidState} state
|
||||||
|
* @param {PayloadAction<{ ids: Array<string | number> }>} action
|
||||||
|
*/
|
||||||
setTransactionsToCategorizeSelected: (
|
setTransactionsToCategorizeSelected: (
|
||||||
state: StorePlaidState,
|
state: StorePlaidState,
|
||||||
action: PayloadAction<{ ids: Array<string | number> }>,
|
action: PayloadAction<{ ids: Array<string | number> }>,
|
||||||
@@ -111,6 +116,11 @@ export const PlaidSlice = createSlice({
|
|||||||
state.transactionsToCategorizeSelected = action.payload.ids;
|
state.transactionsToCategorizeSelected = action.payload.ids;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a transaction to selected transactions to categorize or match.
|
||||||
|
* @param {StorePlaidState} state
|
||||||
|
* @param {PayloadAction<{ id: string | number }>} action
|
||||||
|
*/
|
||||||
addTransactionsToCategorizeSelected: (
|
addTransactionsToCategorizeSelected: (
|
||||||
state: StorePlaidState,
|
state: StorePlaidState,
|
||||||
action: PayloadAction<{ id: string | number }>,
|
action: PayloadAction<{ id: string | number }>,
|
||||||
@@ -121,6 +131,11 @@ export const PlaidSlice = createSlice({
|
|||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a transaction from the selected transactions to categorize or match.
|
||||||
|
* @param {StorePlaidState} state
|
||||||
|
* @param {PayloadAction<{ id: string | number }>} action
|
||||||
|
*/
|
||||||
removeTransactionsToCategorizeSelected: (
|
removeTransactionsToCategorizeSelected: (
|
||||||
state: StorePlaidState,
|
state: StorePlaidState,
|
||||||
action: PayloadAction<{ id: string | number }>,
|
action: PayloadAction<{ id: string | number }>,
|
||||||
@@ -131,10 +146,19 @@ export const PlaidSlice = createSlice({
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the selected transactions to categorize or match.
|
||||||
|
* @param {StorePlaidState} state
|
||||||
|
*/
|
||||||
resetTransactionsToCategorizeSelected: (state: StorePlaidState) => {
|
resetTransactionsToCategorizeSelected: (state: StorePlaidState) => {
|
||||||
state.transactionsToCategorizeSelected = [];
|
state.transactionsToCategorizeSelected = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables/Disables the multiple selection to categorize or match.
|
||||||
|
* @param {StorePlaidState} state
|
||||||
|
* @param {PayloadAction<{ enable: boolean }>} action
|
||||||
|
*/
|
||||||
enableMultipleCategorization: (
|
enableMultipleCategorization: (
|
||||||
state: StorePlaidState,
|
state: StorePlaidState,
|
||||||
action: PayloadAction<{ enable: boolean }>,
|
action: PayloadAction<{ enable: boolean }>,
|
||||||
|
|||||||
Reference in New Issue
Block a user