Skip to content

Commit

Permalink
Flash success modal after submitting apiary surveys Refs #416
Browse files Browse the repository at this point in the history
Refs #416
  • Loading branch information
fungjj92 committed Jan 15, 2019
1 parent 2bb5b5f commit 59b1ba1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
import { connect } from 'react-redux';
import { func } from 'prop-types';

import { fetchUserApiaries } from '../actions';
import { fetchUserApiaries, flashSuccessModal } from '../actions';
import { SURVEY_TYPE_APRIL, COLONY_LOSS_REASONS } from '../constants';
import { arrayToSemicolonDelimitedString, getOrCreateSurveyRequest } from '../utils';
import { Survey } from '../propTypes';
Expand Down Expand Up @@ -134,6 +134,7 @@ class AprilSurveyForm extends Component {
.then(() => {
dispatch(fetchUserApiaries());
close();
dispatch(flashSuccessModal());
})
.catch(error => this.setState({ error: error.response.statusText }));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
import { connect } from 'react-redux';
import { func } from 'prop-types';

import { fetchUserApiaries } from '../actions';
import { fetchUserApiaries, flashSuccessModal } from '../actions';
import {
SURVEY_TYPE_NOVEMBER,
MITE_MANAGEMENT_OPTIONS,
Expand Down Expand Up @@ -169,6 +169,7 @@ class NovemberSurveyForm extends Component {
.then(() => {
dispatch(fetchUserApiaries());
close();
dispatch(flashSuccessModal());
})
.catch(error => this.setState({ error: error.response.statusText }));
}
Expand Down

0 comments on commit 59b1ba1

Please sign in to comment.