mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
re-structure to monorepo.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// @ts-nocheck
|
||||
import t from '@/store/types';
|
||||
|
||||
export const setExchangeRateTableState = (queries) => {
|
||||
return {
|
||||
type: t.EXCHANGE_RATES_TABLE_STATE_SET,
|
||||
payload: { queries },
|
||||
};
|
||||
};
|
||||
14
packages/webapp/src/store/ExchangeRate/exchange.reducer.tsx
Normal file
14
packages/webapp/src/store/ExchangeRate/exchange.reducer.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
// @ts-nocheck
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import { createTableStateReducers } from '@/store/tableState.reducer';
|
||||
|
||||
const initialState = {
|
||||
tableState: {
|
||||
pageSize: 20,
|
||||
pageIndex: 0,
|
||||
},
|
||||
};
|
||||
|
||||
export default createReducer(initialState, {
|
||||
...createTableStateReducers('EXCHANGE_RATES'),
|
||||
});
|
||||
19
packages/webapp/src/store/ExchangeRate/exchange.selector.tsx
Normal file
19
packages/webapp/src/store/ExchangeRate/exchange.selector.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
// @ts-nocheck
|
||||
import { createDeepEqualSelector } from '@/utils';
|
||||
import { paginationLocationQuery } from '@/store/selectors';
|
||||
|
||||
const exchangeRateTableState = (state) => {
|
||||
return state.exchangeRates.tableState;
|
||||
};
|
||||
|
||||
export const getExchangeRatesTableStateFactory = () =>
|
||||
createDeepEqualSelector(
|
||||
paginationLocationQuery,
|
||||
exchangeRateTableState,
|
||||
(locationQuery, tableState) => {
|
||||
return {
|
||||
...locationQuery,
|
||||
...tableState,
|
||||
};
|
||||
},
|
||||
);
|
||||
4
packages/webapp/src/store/ExchangeRate/exchange.type.tsx
Normal file
4
packages/webapp/src/store/ExchangeRate/exchange.type.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
// @ts-nocheck
|
||||
export default {
|
||||
EXCHANGE_RATES_TABLE_STATE_SET: 'EXCHANGE_RATES/TABLE_STATE_SET',
|
||||
};
|
||||
Reference in New Issue
Block a user