diff --git a/src/applications/static-pages/cta-widget/components/messages/RegisterFailed.jsx b/src/applications/static-pages/cta-widget/components/messages/RegisterFailed.jsx
index f2f172d03310..817de3f1b39a 100644
--- a/src/applications/static-pages/cta-widget/components/messages/RegisterFailed.jsx
+++ b/src/applications/static-pages/cta-widget/components/messages/RegisterFailed.jsx
@@ -1,12 +1,11 @@
import React from 'react';
-import PropTypes from 'prop-types';
import AdditionalInfo from '@department-of-veterans-affairs/component-library/AdditionalInfo';
import Telephone, {
CONTACTS,
} from '@department-of-veterans-affairs/component-library/Telephone';
import CallToActionAlert from '../CallToActionAlert';
-const RegisterFailed = ({ createAndUpgradeMHVAccount }) => {
+const RegisterFailed = () => {
const content = {
heading: 'We couldn’t create a MyHealtheVet account for you',
alertText: (
@@ -16,24 +15,11 @@ const RegisterFailed = ({ createAndUpgradeMHVAccount }) => {
use our online health tools, you’ll need to create an account.
What you can do
-
Please try again.
-
-
-
- If you try again and continue to see this error, you can create a My
- HealtheVet account in one of these ways:
-
-
- Call us at 877-327-0022. We’re here
- Monday through Friday, 8:00 a.m. to 8:00 p.m. ET. If you have
- hearing loss, call TTY: .
+ Call us at . We’re here Monday
+ through Friday, 8:00 a.m. to 8:00 p.m. ET. If you have hearing loss,
+ call TTY: .
Tell the representative that you tried to sign in to use the online
@@ -92,8 +78,4 @@ const RegisterFailed = ({ createAndUpgradeMHVAccount }) => {
return ;
};
-RegisterFailed.propTypes = {
- createAndUpgradeMHVAccount: PropTypes.func.isRequired,
-};
-
export default RegisterFailed;
diff --git a/src/applications/static-pages/cta-widget/components/messages/UpgradeFailed.jsx b/src/applications/static-pages/cta-widget/components/messages/UpgradeFailed.jsx
index eff5a5c99b28..c7dc8619d493 100644
--- a/src/applications/static-pages/cta-widget/components/messages/UpgradeFailed.jsx
+++ b/src/applications/static-pages/cta-widget/components/messages/UpgradeFailed.jsx
@@ -1,12 +1,11 @@
import React from 'react';
-import PropTypes from 'prop-types';
import AdditionalInfo from '@department-of-veterans-affairs/component-library/AdditionalInfo';
import Telephone, {
CONTACTS,
} from '@department-of-veterans-affairs/component-library/Telephone';
import CallToActionAlert from '../CallToActionAlert';
-const UpgradeFailed = ({ upgradeMHVAccount }) => {
+const UpgradeFailed = () => {
const content = {
heading: 'We couldn’t upgrade your My HealtheVet account',
alertText: (
@@ -17,21 +16,11 @@ const UpgradeFailed = ({ upgradeMHVAccount }) => {
until we can fix the problem.
What you can do
-
Please try again.
-
-
-
- If you try again and continue to see this error, you can upgrade
- your My HealtheVet account in one of these ways:
-
-
- Call us at 877-327-0022. We’re here
- Monday through Friday, 8:00 a.m. to 8:00 p.m. ET. If you have
- hearing loss, call TTY: .
+ Call us at . We’re here Monday
+ through Friday, 8:00 a.m. to 8:00 p.m. ET. If you have hearing loss,
+ call TTY: .
Tell the representative that you tried to sign in to use the online
@@ -90,8 +79,4 @@ const UpgradeFailed = ({ upgradeMHVAccount }) => {
return ;
};
-UpgradeFailed.propTypes = {
- upgradeMHVAccount: PropTypes.func.isRequired,
-};
-
export default UpgradeFailed;
diff --git a/src/applications/static-pages/cta-widget/index.js b/src/applications/static-pages/cta-widget/index.js
index ed8d4ce6fc51..b2c5658ec5b4 100644
--- a/src/applications/static-pages/cta-widget/index.js
+++ b/src/applications/static-pages/cta-widget/index.js
@@ -8,11 +8,8 @@ import { connect } from 'react-redux';
// Relative imports.
import LoadingIndicator from '@department-of-veterans-affairs/component-library/LoadingIndicator';
import recordEvent from 'platform/monitoring/record-event';
-import {
- createAndUpgradeMHVAccount,
- fetchMHVAccount,
- upgradeMHVAccount,
-} from 'platform/user/profile/actions';
+import { fetchMHVAccount } from 'platform/user/profile/actions';
+import { mhvUrl } from 'platform/site-wide/mhv/utilities';
import { isAuthenticatedWithSSOe } from 'platform/user/authentication/selectors';
import { isLoggedIn, selectProfile } from 'platform/user/selectors';
@@ -61,10 +58,8 @@ export class CallToActionWidget extends Component {
mviStatus: PropTypes.string,
profile: PropTypes.object,
// From mapDispatchToProps.
- createAndUpgradeMHVAccount: PropTypes.func.isRequired,
fetchMHVAccount: PropTypes.func.isRequired,
toggleLoginModal: PropTypes.func.isRequired,
- upgradeMHVAccount: PropTypes.func.isRequired,
ariaLabel: PropTypes.string,
ariaDescribedby: PropTypes.string,
};
@@ -117,7 +112,7 @@ export class CallToActionWidget extends Component {
this._toolUrl = url;
if (redirect && !this._popup) this.goToTool();
} else if (this.isHealthTool()) {
- const { accountLevel, accountState, loading } = this.props.mhvAccount;
+ const { accountState, loading } = this.props.mhvAccount;
if (loading) return;
@@ -129,11 +124,7 @@ export class CallToActionWidget extends Component {
// Since T&C is still required to support the existing account states,
// check the existence of a query param that gets appended after
// successful T&C acceptance to complete account creation or upgrade.
- if (!accountLevel && accountState !== 'register_failed') {
- this.props.createAndUpgradeMHVAccount();
- } else if (accountLevel && accountState !== 'upgrade_failed') {
- this.props.upgradeMHVAccount();
- }
+ /* We are no longer creating or upgrading MHV accounts on VA.gov */
}
}
}
@@ -292,6 +283,10 @@ export class CallToActionWidget extends Component {
return null;
};
+ sendToMHV = () => {
+ window.location = mhvUrl(this.props.authenticatedWithSSOe, 'home');
+ };
+
getInaccessibleHealthToolContent = () => {
const { accountState } = this.props.mhvAccount;
@@ -324,40 +319,11 @@ export class CallToActionWidget extends Component {
case ACCOUNT_STATES.MULTIPLE_IDS:
return ;
- /* Handling for these states to be re-introduced after brand consolidation
- * when VA patient and T&C acceptance checks will no longer gate access, so
- * access to these tools will be accurately reported by the services list.
- * For now, MHV account level requirements will be validated client-side.
- *
- * case 'no_account':
- * return {
- * heading: `You’ll need to create a My HealtheVet account before you can ${this._serviceDescription`,
- * primaryButtonText: 'Create a My HealtheVet Account',
- * primaryButtonHandler: this.props.createAndUpgradeMHVAccount,
- * status: 'continue'
- * };
-
- * case 'existing':
- * case 'registered':
- * return {
- * heading: `You’ll need to upgrade your account before you can ${this._serviceDescription}`,
- * primaryButtonText: 'Upgrade Your Account',
- * primaryButtonHandler: this.props.upgradeMHVAccount,
- * status: 'continue'
- * };
- */
-
case ACCOUNT_STATES.REGISTER_FAILED:
- return (
-
- );
+ return ;
case ACCOUNT_STATES.UPGRADE_FAILED:
- return (
-
- );
+ return ;
default: // Handle other content outside of block.
}
@@ -383,7 +349,7 @@ export class CallToActionWidget extends Component {
primaryButtonHandler={
accountState === 'needs_terms_acceptance'
? redirectToTermsAndConditions
- : this.props.createAndUpgradeMHVAccount
+ : this.sendToMHV
}
secondaryButtonHandler={this.signOut}
/>
@@ -396,7 +362,7 @@ export class CallToActionWidget extends Component {
primaryButtonHandler={
accountState === 'needs_terms_acceptance'
? redirectToTermsAndConditions
- : this.props.upgradeMHVAccount
+ : this.sendToMHV
}
/>
);
@@ -567,10 +533,8 @@ const mapStateToProps = state => {
};
const mapDispatchToProps = {
- createAndUpgradeMHVAccount,
fetchMHVAccount,
toggleLoginModal,
- upgradeMHVAccount,
};
export default connect(
diff --git a/src/applications/static-pages/cta-widget/tests/index.unit.spec.js b/src/applications/static-pages/cta-widget/tests/index.unit.spec.js
index 1112fd986989..2f9e3c31d4c0 100644
--- a/src/applications/static-pages/cta-widget/tests/index.unit.spec.js
+++ b/src/applications/static-pages/cta-widget/tests/index.unit.spec.js
@@ -260,79 +260,6 @@ describe('', () => {
tree.unmount();
});
- it('should create and upgrade MHV account when necessary', () => {
- const createAndUpgradeMHVAccount = sinon.spy();
- const tree = mount(
- ,
- );
- expect(createAndUpgradeMHVAccount.called).to.be.false;
-
- global.dom.reconfigure({ url: 'http://localhost?tc_accepted=true' });
- tree.setProps({
- isLoggedIn: true,
- mhvAccount: {
- loading: false,
- accountState: 'something',
- },
- });
-
- expect(createAndUpgradeMHVAccount.called).to.be.true;
- tree.unmount();
- global.dom.reconfigure({ url: 'http://localhost' });
- });
-
- it('should upgrade MHV account when necessary', () => {
- const upgradeMHVAccount = sinon.spy();
- const tree = mount(
- ,
- );
- expect(upgradeMHVAccount.called).to.be.false;
-
- global.dom.reconfigure({ url: 'http://localhost?tc_accepted=true' });
- tree.setProps({
- isLoggedIn: true,
- mhvAccount: {
- loading: false,
- accountState: 'something',
- accountLevel: 'Basic',
- },
- });
-
- expect(upgradeMHVAccount.called).to.be.true;
- tree.unmount();
- global.dom.reconfigure({ url: 'http://localhost' });
- });
-
it('should open myhealthevet popup', () => {
const { props, mockStore } = getData({
profile: { loading: false, verified: true, multifactor: false },
diff --git a/src/platform/user/authorization/containers/MHVApp.jsx b/src/platform/user/authorization/containers/MHVApp.jsx
index 3b13e5b45e3a..8f35d487d5bb 100644
--- a/src/platform/user/authorization/containers/MHVApp.jsx
+++ b/src/platform/user/authorization/containers/MHVApp.jsx
@@ -9,17 +9,12 @@ import LoadingIndicator from '@department-of-veterans-affairs/component-library/
import Telephone, {
CONTACTS,
} from '@department-of-veterans-affairs/component-library/Telephone';
+import { fetchMHVAccount } from 'platform/user/profile/actions';
import { mhvAccessError } from '../../../static-data/error-messages';
import backendServices from '../../profile/constants/backendServices';
import { selectProfile } from '../../selectors';
import SubmitSignInForm from '../../../static-data/SubmitSignInForm';
-import {
- createMHVAccount,
- fetchMHVAccount,
- upgradeMHVAccount,
-} from 'platform/user/profile/actions';
-
/* eslint-disable camelcase */
const INELIGIBLE_MESSAGES = {
needs_ssn_resolution: {
@@ -154,12 +149,9 @@ export class MHVApp extends React.Component {
}
case 'no_account':
- this.props.createMHVAccount();
- break;
-
case 'existing':
case 'registered':
- this.props.upgradeMHVAccount();
+ // We will no longer be creating or upgrading MHV accounts
break;
default: // Do nothing.
@@ -191,7 +183,7 @@ export class MHVApp extends React.Component {
return ;
};
- renderPlaceholderErrorMessage() {
+ renderPlaceholderErrorMessage = () => {
const alertProps = {
headline: (
We’re not able to process your My HealtheVet account
@@ -199,13 +191,9 @@ export class MHVApp extends React.Component {
content: (