1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-25 23:23:21 -05:00

Re-fetch securities on successful import

This commit is contained in:
Aaron Lindsay 2017-06-10 14:38:40 -04:00
parent c4268ddfc8
commit 8cb222a107
3 changed files with 4 additions and 0 deletions

View File

@ -781,6 +781,7 @@ class AccountRegister extends React.Component {
handleImportComplete() {
this.props.onCloseImportModal();
this.props.onFetchAllAccounts();
this.props.onFetchAllSecurities();
if (this.props.selectedAccount != -1) {
this.props.onFetchTransactionPage(this.props.accounts[this.props.selectedAccount], this.props.pageSize, this.props.transactionPage.page);
}

View File

@ -721,6 +721,7 @@ class AccountsTab extends React.Component {
transactionPage={this.props.transactionPage}
imports={this.props.imports}
onFetchAllAccounts={this.props.onFetchAllAccounts}
onFetchAllSecurities={this.props.onFetchAllSecurities}
onCreateTransaction={this.props.onCreateTransaction}
onUpdateTransaction={this.props.onUpdateTransaction}
onDeleteTransaction={this.props.onDeleteTransaction}

View File

@ -1,5 +1,6 @@
var connect = require('react-redux').connect;
var SecurityActions = require('../actions/SecurityActions');
var AccountActions = require('../actions/AccountActions');
var TransactionActions = require('../actions/TransactionActions');
var ImportActions = require('../actions/ImportActions');
@ -31,6 +32,7 @@ function mapDispatchToProps(dispatch) {
onUpdateAccount: function(account) {dispatch(AccountActions.update(account))},
onDeleteAccount: function(account) {dispatch(AccountActions.remove(account))},
onSelectAccount: function(accountId) {dispatch(AccountActions.select(accountId))},
onFetchAllSecurities: function() {dispatch(SecurityActions.fetchAll())},
onCreateTransaction: function(transaction) {dispatch(TransactionActions.create(transaction))},
onUpdateTransaction: function(transaction) {dispatch(TransactionActions.update(transaction))},
onDeleteTransaction: function(transaction) {dispatch(TransactionActions.remove(transaction))},