mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
WIP Toasts localizations.
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
fetchCurrencies,
|
||||
submitCurrencies,
|
||||
deleteCurrency,
|
||||
editCurrency,
|
||||
} from 'store/currencies/currencies.actions';
|
||||
import { getDialogPayload } from 'store/dashboard/dashboard.reducer';
|
||||
import { getCurrencyById } from 'store/currencies/currencies.selector';
|
||||
|
||||
export const mapStateToProps = (state, props) => {
|
||||
const dialogPayload = getDialogPayload(state, 'currency-form');
|
||||
|
||||
return {
|
||||
currencies: state.currencies.preferences.currencies,
|
||||
name: 'currency-form',
|
||||
payload: { action: 'new', id: null, ...dialogPayload },
|
||||
editCurrency:
|
||||
dialogPayload && dialogPayload.action === 'edit'
|
||||
? state.currencies.preferences.currencies[dialogPayload.currency_code]
|
||||
: {},
|
||||
getCurrencyId: (id) =>
|
||||
getCurrencyById(state.currencies.preferences.currencies, id),
|
||||
};
|
||||
};
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
requestFetchCurrencies: () => dispatch(fetchCurrencies({})),
|
||||
requestSubmitCurrencies: (form) => dispatch(submitCurrencies({ form })),
|
||||
requestEditCurrency: (id, form) => dispatch(editCurrency({ id, form })),
|
||||
requestDeleteCurrency: (currency_code) =>
|
||||
dispatch(deleteCurrency({ currency_code })),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
@@ -1,21 +0,0 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
fetchJournalSheet
|
||||
} from 'store/financialStatement/financialStatements.actions';
|
||||
import {
|
||||
getFinancialSheetIndexByQuery,
|
||||
getFinancialSheet,
|
||||
} from 'store/financialStatement/financialStatements.selectors';
|
||||
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
getJournalSheetIndex: (query) => getFinancialSheetIndexByQuery(state.financialStatements.journal.sheets, query),
|
||||
getJournalSheet: (index) => getFinancialSheet(state.financialStatements.journal.sheets, index),
|
||||
journalSheetLoading: state.financialStatements.journal.loading,
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
fetchJournalSheet: (query) => dispatch(fetchJournalSheet({ query })),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
@@ -1,21 +0,0 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
makeJournalEntries,
|
||||
fetchManualJournal,
|
||||
editManualJournal,
|
||||
} from 'store/manualJournals/manualJournals.actions';
|
||||
import {
|
||||
getManualJournal,
|
||||
} from 'store/manualJournals/manualJournals.reducers';
|
||||
|
||||
export const mapStateToProps = (state, props) => ({
|
||||
getManualJournal: (id) => getManualJournal(state, id),
|
||||
});
|
||||
|
||||
export const mapDispatchToProps = (dispatch) => ({
|
||||
requestMakeJournalEntries: (form) => dispatch(makeJournalEntries({ form })),
|
||||
fetchManualJournal: (id) => dispatch(fetchManualJournal({ id })),
|
||||
requestEditManualJournal: (id, form) => dispatch(editManualJournal({ id, form }))
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps);
|
||||
Reference in New Issue
Block a user