mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix bugs in items form.
This commit is contained in:
@@ -24,6 +24,7 @@ export const mapStateToProps = (state, props) => {
|
||||
state.items.items, viewPages, state.items.currentPage),
|
||||
|
||||
bulkSelected: state.items.bulkActions,
|
||||
itemsTableLoading: state.items.loading,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -37,6 +38,14 @@ export const mapDispatchToProps = (dispatch) => ({
|
||||
removeBulkActionItem: (id) => dispatch({
|
||||
type: t.ITEM_BULK_ACTION_REMOVE, itemId: id,
|
||||
}),
|
||||
|
||||
setItemsTableQuery: (key, value) => dispatch({
|
||||
type: t.ITEMS_TABLE_QUERY_SET, key, value,
|
||||
}),
|
||||
addItemsTableQueries: (queries) =>
|
||||
dispatch({
|
||||
type: t.ITEMS_TABLE_QUERIES_ADD, queries,
|
||||
}),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
@@ -12,6 +12,7 @@ export const mapStateToProps = (state, props) => {
|
||||
const dialogPayload = getDialogPayload(state, 'item-form');
|
||||
return {
|
||||
categories: state.itemCategories.categories,
|
||||
categoriesList: Object.values(state.itemCategories.categories),
|
||||
name: 'item-form',
|
||||
payload: { action: 'new', id: null },
|
||||
editItemCategory:
|
||||
@@ -21,6 +22,7 @@ export const mapStateToProps = (state, props) => {
|
||||
getCategoryId: id => getCategoryId(state, id)
|
||||
};
|
||||
};
|
||||
|
||||
export const mapDispatchToProps = dispatch => ({
|
||||
requestSubmitItemCategory: form => dispatch(submitItemCategory({ form })),
|
||||
requestFetchItemCategories: () => dispatch(fetchItemCategories()),
|
||||
|
||||
Reference in New Issue
Block a user