Skip to content

Commit

Permalink
Merge branch 'main' into EDM-493-521-finalize-lacs-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholashibbits authored Jan 17, 2025
2 parents baeda0c + fff0657 commit abbff68
Show file tree
Hide file tree
Showing 56 changed files with 1,227 additions and 1,045 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:
name: Unit Tests
needs: [fetch-allow-lists, tests-prep]
timeout-minutes: 30
runs-on: ubuntu-16-cores-latest
runs-on: ubuntu-16-cores-22.04
outputs:
app_folders: ${{ steps.get-changed-apps.outputs.folders }}
changed-files: ${{ steps.get-changed-apps.outputs.changed_files }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ const FacilitySearch = props => {
</h3>
<p>
You’ll need to find and select the VA medical center or clinic where
the Veteran receives or plans to recieve care.
the Veteran receives or plans to receive care.
</p>
<p>
The VA medical center or clinic may be in a different city, state, or
Expand Down
49 changes: 0 additions & 49 deletions src/applications/claims-status/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,55 +225,6 @@ export const getClaim = (id, navigate) => {

export const clearClaim = () => ({ type: CLEAR_CLAIM_DETAIL });

export function submitRequest(id, cstClaimPhasesEnabled = false) {
return dispatch => {
dispatch({
type: SUBMIT_DECISION_REQUEST,
});

if (canUseMocks()) {
dispatch({ type: SET_DECISION_REQUESTED });
dispatch(
setNotification({
title: 'Request received',
body:
'Thank you. We have your claim request and will make a decision.',
}),
);
return Promise.resolve();
}

return makeAuthRequest(
`/v0/evss_claims/${id}/request_decision`,
{ method: 'POST' },
dispatch,
() => {
dispatch({ type: SET_DECISION_REQUESTED });
if (cstClaimPhasesEnabled) {
dispatch(
setNotification({
title: 'We received your evidence waiver',
body:
'Thank you. We’ll move your claim to the next step as soon as possible.',
}),
);
} else {
dispatch(
setNotification({
title: 'Request received',
body:
'Thank you. We have your claim request and will make a decision.',
}),
);
}
},
error => {
dispatch({ type: SET_DECISION_REQUEST_ERROR, error });
},
);
};
}

export function submit5103(id, trackedItemId, cstClaimPhasesEnabled = false) {
return dispatch => {
dispatch({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ import {
import {
// START ligthouse_migration
submit5103 as submit5103Action,
submitRequest as submitRequestAction,
// END lighthouse_migration
} from '../../actions';
// START lighthouse_migration
import { cstUseLighthouse } from '../../selectors';
// END lighthouse_migration
import { setUpPage } from '../../utils/page';

import withRouter from '../../utils/withRouter';
Expand All @@ -33,8 +29,6 @@ function Default5103EvidenceNotice({
navigate,
params,
submit5103,
submitRequest,
useLighthouse5103,
}) {
const [addedEvidence, setAddedEvidence] = useState(false);
const [checkboxErrorMessage, setCheckboxErrorMessage] = useState(undefined);
Expand All @@ -58,11 +52,7 @@ function Default5103EvidenceNotice({

const submit = () => {
if (addedEvidence) {
if (useLighthouse5103) {
submit5103(params.id, params.trackedItemId, true);
} else {
submitRequest(params.id, true);
}
submit5103(params.id, params.trackedItemId, true);
} else {
setCheckboxErrorMessage(
`You must confirm you’re done adding evidence before submitting the evidence waiver`,
Expand Down Expand Up @@ -138,6 +128,7 @@ function Default5103EvidenceNotice({
review stage as quickly as possible.
</p>
<p>
{' '}
<strong>Note:</strong> You can add evidence to support your claim at any
time. However, if you add evidence later, your claim will move back to
this step, so we encourage you to add all your evidence now.
Expand Down Expand Up @@ -177,17 +168,11 @@ function mapStateToProps(state) {
decisionRequested: claimsState.claimAsk.decisionRequested,
decisionRequestError: claimsState.claimAsk.decisionRequestError,
loadingDecisionRequest: claimsState.claimAsk.loadingDecisionRequest,
// START lighthouse_migration
useLighthouse5103: cstUseLighthouse(state, '5103'),
// END lighthouse_migration
};
}

const mapDispatchToProps = {
// START lighthouse_migration
submit5103: submit5103Action,
submitRequest: submitRequestAction,
// END lighthouse_migration
};

export default withRouter(
Expand All @@ -204,11 +189,7 @@ Default5103EvidenceNotice.propTypes = {
loadingDecisionRequest: PropTypes.bool,
navigate: PropTypes.func,
params: PropTypes.object,
// START lighthouse_migration
submit5103: PropTypes.func,
submitRequest: PropTypes.func,
useLighthouse5103: PropTypes.bool,
// END lighthouse_migration
};

export { Default5103EvidenceNotice };
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function DefaultPage({
}) {
return (
<div id="default-page" className="vads-u-margin-bottom--3">
<h1 className="claims-header">Request for {item.displayName}</h1>
<h1 className="claims-header">{item.displayName}</h1>
{item.status === 'NEEDED_FROM_YOU' ? (
<DueDate date={item.suspenseDate} />
) : null}
Expand Down
30 changes: 6 additions & 24 deletions src/applications/claims-status/containers/AskVAPage.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';

import { VaCheckbox } from '@department-of-veterans-affairs/component-library/dist/react-bindings';

import {
// START ligthouse_migration
submit5103 as submit5103Action,
submitRequest as submitRequestAction,
// END lighthouse_migration
getClaim as getClaimAction,
submit5103 as submit5103Action,
} from '../actions';
import NeedHelp from '../components/NeedHelp';
import ClaimsBreadcrumbs from '../components/ClaimsBreadcrumbs';
// START lighthouse_migration
import { cstUseLighthouse } from '../selectors';
// END lighthouse_migration
import NeedHelp from '../components/NeedHelp';
import { setDocumentTitle } from '../utils/helpers';
import { setUpPage } from '../utils/page';
import withRouter from '../utils/withRouter';
import { setDocumentTitle } from '../utils/helpers';

class AskVAPage extends React.Component {
constructor() {
Expand Down Expand Up @@ -54,11 +49,8 @@ class AskVAPage extends React.Component {
decisionRequestError,
params,
submit5103,
submitRequest,
useLighthouse5103,
} = this.props;

const submitFunc = useLighthouse5103 ? submit5103 : submitRequest;
const submitDisabled =
!this.state.submittedDocs ||
loadingDecisionRequest ||
Expand Down Expand Up @@ -127,7 +119,7 @@ class AskVAPage extends React.Component {
submit
class="button-primary vads-u-margin-top--1"
text={buttonMsg}
onClick={() => submitFunc(params.id)}
onClick={() => submit5103(params.id)}
/>
{!loadingDecisionRequest ? (
<va-button
Expand All @@ -154,18 +146,12 @@ function mapStateToProps(state) {
loadingDecisionRequest: claimsState.claimAsk.loadingDecisionRequest,
decisionRequested: claimsState.claimAsk.decisionRequested,
decisionRequestError: claimsState.claimAsk.decisionRequestError,
// START lighthouse_migration
useLighthouse5103: cstUseLighthouse(state, '5103'),
// END lighthouse_migration
};
}

const mapDispatchToProps = {
// START lighthouse_migration
submit5103: submit5103Action,
submitRequest: submitRequestAction,
// END lighthouse_migration
getClaim: getClaimAction,
submit5103: submit5103Action,
};

export default withRouter(
Expand All @@ -182,11 +168,7 @@ AskVAPage.propTypes = {
loadingDecisionRequest: PropTypes.bool,
navigate: PropTypes.func,
params: PropTypes.object,
// START lighthouse_migration
submit5103: PropTypes.func,
submitRequest: PropTypes.func,
useLighthouse5103: PropTypes.bool,
// END lighthouse_migration
};

export { AskVAPage };
29 changes: 0 additions & 29 deletions src/applications/claims-status/selectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,6 @@ export const isLoadingFeatures = state => toggleValues(state).loading;
export const showClaimLettersFeature = state =>
toggleValues(state)[FEATURE_FLAG_NAMES.claimLettersAccess];

// 'cst_use_lighthouse'
// endpoint - one of '5103', 'index', 'show'
export const cstUseLighthouse = (state, endpoint) => {
const flipperOverrideMode = sessionStorage.getItem('cstFlipperOverrideMode');
if (flipperOverrideMode) {
switch (flipperOverrideMode) {
case 'featureToggle':
break;
case 'evss':
return false;
case 'lighthouse':
return true;
default:
break;
}
}

// Returning true here because the feature toggle sometimes returns
// undefined and the feature toggle should always return true anyways
// Note: Checking for window.Cypress here because some of the Cypress
// tests are written for EVSS and will fail if this only returns true

if (endpoint === 'show' && !window.Cypress) return true;

return toggleValues(state)[
FEATURE_FLAG_NAMES[`cstUseLighthouse#${endpoint}`]
];
};

// 'cst_include_ddl_boa_letters'
export const cstIncludeDdlBoaLetters = state =>
toggleValues(state)[FEATURE_FLAG_NAMES.cstIncludeDdlBoaLetters];
Expand Down
Loading

0 comments on commit abbff68

Please sign in to comment.