Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into vebt-898
Browse files Browse the repository at this point in the history
wafimohamed committed Jan 31, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents ed525ce + 522aa0a commit 355d0a1
Showing 42 changed files with 661 additions and 121 deletions.
4 changes: 3 additions & 1 deletion src/applications/appeals/995/components/ITFBanner.jsx
Original file line number Diff line number Diff line change
@@ -82,7 +82,9 @@ const ITFBanner = props => {
<div className="itf-inner vads-l-grid-container vads-u-padding-left--0 vads-u-padding-bottom--5">
<div className="usa-content">
{message}
<div className="vads-u-margin-top--2">{itfExpander}</div>
<div className="vads-u-margin-top--2 vads-u-padding-bottom--2">
{itfExpander}
</div>
<VaButtonPair
class="vads-u-margin-top--2"
continue
2 changes: 1 addition & 1 deletion src/applications/appeals/995/components/PrimaryPhone.jsx
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ export const PrimaryPhone = ({
<form onSubmit={handlers.onSubmit}>
<div name="topScrollElement" />
<VaRadio
class="vads-u-margin-y--2"
class="vads-u-margin-top--2 vads-u-margin-bottom--4"
label={content.label}
label-header-level={onReviewPage ? 4 : 3}
hint="We may need to contact you if we have questions about your Supplemental Claim."
Original file line number Diff line number Diff line change
@@ -7,7 +7,10 @@ export const content = {
'If you want to limit what we can request from your non-VA medical provider(s), describe the limitation (for example, you want your doctor to release only treatment dates or certain types of disabilities)',

info: (
<va-additional-info trigger="What does &quot;limiting consent&quot; mean?">
<va-additional-info
class="vads-u-margin-bottom--4"
trigger="What does &quot;limiting consent&quot; mean?"
>
<p>
If you choose to limit consent, you’re limiting the type or amount of
information that your doctor or medical facility can release to us. It
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ export const evidenceWillUploadTitle =
export const evidenceWillUploadInfo = (
<va-additional-info
trigger="Types of supporting evidence"
class="vads-u-margin-top--2"
class="vads-u-margin-top--2 vads-u-margin-bottom--4"
uswds
>
<div>
2 changes: 1 addition & 1 deletion src/applications/appeals/995/content/livingSituation.jsx
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ livingSituationReviewField.propTypes = {
export const domesticViolenceInfo = (
<va-additional-info
trigger="Are you experiencing domestic violence?"
class="vads-u-margin-bottom--4"
class="vads-u-margin-y--4"
>
If you need help because of domestic violence, call the National Domestic
Violence hotline <va-telephone contact="8007997233" /> (
2 changes: 1 addition & 1 deletion src/applications/appeals/995/content/optIn.jsx
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export const content = {
appeals process for the issues you have selected. You’re likely to get a
faster decision on your claim when you switch to the new process.
</p>
<p>
<p className="vads-u-margin-bottom--4">
If you want to continue your claim in the old appeals process, don’t
submit a Supplemental Claim. Check your decision notice for more details
about the appeals process.
5 changes: 4 additions & 1 deletion src/applications/appeals/995/content/optionForMst.jsx
Original file line number Diff line number Diff line change
@@ -7,7 +7,10 @@ export const optionForMstHint =
'This option is for an indicator on your health record and will not affect the status or decision for your claim.';

export const supportInfo = (
<va-additional-info trigger="How can I find support?">
<va-additional-info
trigger="How can I find support?"
class="vads-u-margin-bottom--4"
>
<div>
<p className="vads-u-margin-top--0">
<va-link
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ export default {
title: content.textAreaTitle,
hint: content.textAreaHint,
labelHeaderLevel: 3,
classNames: 'vads-u-margin-bottom--4',
required: () => true,
errorMessages: {
required: content.errorMessage,
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ export default {
[EVIDENCE_VA]: yesNoUI({
title: requestVaRecordsTitleOld,
enableAnalytics: true,
classNames: 'vads-u-margin-bottom--4',
labelHeaderLevel: '3',
labels: {
Y: 'Yes',
1 change: 1 addition & 0 deletions src/applications/appeals/995/pages/facilityTypes.js
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ export default {
...checkboxGroupUI({
title: facilityTypeTitle,
enableAnalytics: true,
classNames: 'vads-u-margin-bottom--6',
required: true,
labelHeaderLevel: '3',
labels: facilityTypeChoices,
1 change: 1 addition & 0 deletions src/applications/appeals/995/pages/housingRisk.js
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ export default {
uiSchema: {
housingRisk: yesNoUI({
title: housingRiskTitle,
classNames: 'vads-u-margin-bottom--4',
enableAnalytics: true,
labelHeaderLevel: '3',
labels: {
1 change: 1 addition & 0 deletions src/applications/appeals/995/pages/optionIndicator.js
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ export default {
...radioUI({
title: optionIndicatorLabel,
hint: optionIndicatorHint,
classNames: 'vads-u-margin-bottom--4',
enableAnalytics: true,
labelHeaderLevel: '3',
labels: optionIndicatorChoices,
5 changes: 4 additions & 1 deletion src/applications/appeals/995/pages/pointOfContact.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,10 @@ export default {
'ui:description': pointOfContactTitle,
},
pointOfContactName: textUI(pointOfContactNameLabel),
pointOfContactPhone: phoneUI(pointOfContactPhoneLabel),
pointOfContactPhone: phoneUI({
title: pointOfContactPhoneLabel,
classNames: 'vads-u-margin-bottom--4',
}),
},
schema: {
type: 'object',
6 changes: 2 additions & 4 deletions src/applications/appeals/shared/components/AddIssue.jsx
Original file line number Diff line number Diff line change
@@ -180,6 +180,7 @@ const AddIssue = ({
<VaTextInput
id="issue-name"
name="issue-name"
class="vads-u-margin-bottom--4"
type="text"
label={content.name.label}
required
@@ -188,13 +189,10 @@ const AddIssue = ({
onBlur={handlers.onInputBlur}
error={((submitted || inputDirty) && showIssueNameError) || null}
message-aria-describedby={content.name.hintText}
uswds
>
{content.name.hint}
</VaTextInput>

<br role="presentation" />

<VaMemorableDate
name="decision-date"
label={content.date.label}
@@ -211,7 +209,7 @@ const AddIssue = ({
month-select={false}
uswds
/>
<p>
<p className="vads-u-margin-top--6">
<va-button
id="cancel"
secondary
4 changes: 3 additions & 1 deletion src/applications/appeals/shared/components/FileField.jsx
Original file line number Diff line number Diff line change
@@ -644,7 +644,9 @@ const FileField = props => {
showButtons && (
<div
id="upload-wrap"
className={showUpload ? '' : 'vads-u-display--none'}
className={
showUpload ? 'vads-u-margin-bottom--2' : 'vads-u-display--none'
}
>
{/* eslint-disable jsx-a11y/label-has-associated-control */}
<label
Original file line number Diff line number Diff line change
@@ -88,9 +88,7 @@ const VeteranInformation = ({ formData }) => {
</p>
</div>

<br role="presentation" />

<p>
<p className="vads-u-margin-top--2 vads-u-margin-bottom--4">
<strong>Note:</strong> If you need to update your personal information,
you can call us at <va-telephone contact={CONTACTS.VA_BENEFITS} />.
We’re here Monday through Friday, 8:00 a.m. to 9:00 p.m.{' '}
Original file line number Diff line number Diff line change
@@ -171,7 +171,10 @@ NoneSelectedAlert.propTypes = {
};

export const ContestableIssuesAdditionalInfo = (
<va-additional-info trigger="Why isn’t my issue listed here?" uswds>
<va-additional-info
trigger="Why isn’t my issue listed here?"
class="vads-u-margin-top--3 vads-u-margin-bottom--4"
>
If you don’t see your issue or decision listed here, it may not be in our
system yet. This can happen if it’s a more recent claim decision. If you
have a decision date, you can add a new issue now.
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ export const debtSummaryText = (diaryCode, dateOfLetter, balance) => {
to pay this debt.
</DebtSummaryMessage>
);
case '081': // TODO: No Definition in mockup
// case '081': TODO: No Definition in mockup
case '500':
case '510':
case '503':

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -24,6 +24,34 @@ describe('debtSummaryText', () => {
expectedText: `Submit a Financial Status Report so that we can make a decision on your request.`,
},
{ diaryCode: '212', expectedText: `Contact us to update your address.` },
{
diaryCode: '061',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '065',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '070',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '440',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '442',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '448',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '453',
expectedText: `We’ve paused collection on this debt as you requested.`,
},
{
diaryCode: '439',
expectedText: `Pay your balance now or request help by ${endDate(
@@ -38,6 +66,20 @@ describe('debtSummaryText', () => {
'109',
)} to avoid more interest charges.`,
},
{
diaryCode: '117',
expectedText: `Pay your ${testBalance} past due balance in full or request help before ${endDate(
testDate,
'117',
)}.`,
},
{
diaryCode: '123',
expectedText: `Pay your ${testBalance} past due balance now or request help by ${endDate(
testDate,
'123',
)}.`,
},
{
diaryCode: '680',
expectedText: `Pay your ${testBalance} balance now or request help.`,
@@ -54,13 +96,69 @@ describe('debtSummaryText', () => {
diaryCode: '430',
expectedText: `We’re reducing your education benefits each month until your debt is paid.`,
},
{
diaryCode: '481',
expectedText: `We’re reviewing your account.`,
},
{
diaryCode: '482',
expectedText: `We’re reviewing your account.`,
},
{
diaryCode: '483',
expectedText: `We’re reviewing your account.`,
},
{
diaryCode: '484',
expectedText: `We’re reviewing your account.`,
},
{
diaryCode: '603',
expectedText: `Make a payment on your ${testBalance} balance or request help by ${endDate(
testDate,
'603',
)}.`,
},
{
diaryCode: '101',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '450',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '602',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '607',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '608',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '610',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '611',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '614',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '615',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '617',
expectedText: `We’re reducing your benefit payments each month until your debt is paid.`,
},
{
diaryCode: '080',
expectedText: `Contact the U.S. Department of the Treasury’s Debt Management Services at`,
@@ -69,6 +167,18 @@ describe('debtSummaryText', () => {
diaryCode: '500',
expectedText: `We’re referring this debt to the U.S. Department of the Treasury today.`,
},
{
diaryCode: '821',
expectedText: `Continue making monthly payments while we review your Notice of Disagreement.`,
},
{
diaryCode: '822',
expectedText: `Continue making monthly payments while we review your dispute.`,
},
{
diaryCode: '825',
expectedText: `Continue making monthly payments while we review your request for a hearing.`,
},
{
diaryCode: '811',
expectedText: `Continue making monthly payments while we review your compromise offer.`,
@@ -80,10 +190,25 @@ describe('debtSummaryText', () => {
'815',
)}.`,
},
{
diaryCode: '816',
expectedText: `We’re processing your compromise offer payment.`,
},
{
diaryCode: '801',
expectedText: `Continue making monthly payments while we review your waiver request.`,
},
{ diaryCode: '002', expectedText: `We’re updating your account.` },
{ diaryCode: '005', expectedText: `We’re updating your account.` },
{ diaryCode: '032', expectedText: `We’re updating your account.` },
{ diaryCode: '609', expectedText: `We’re updating your account.` },
{ diaryCode: '321', expectedText: `We’re updating your account.` },
{ diaryCode: '400', expectedText: `We’re updating your account.` },
{ diaryCode: '420', expectedText: `We’re updating your account.` },
{ diaryCode: '421', expectedText: `We’re updating your account.` },
{ diaryCode: '422', expectedText: `We’re updating your account.` },
{ diaryCode: '627', expectedText: `We’re updating your account.` },
{ diaryCode: '425', expectedText: `We’re updating your account.` },
{ diaryCode: 'unknown', expectedText: `We’re updating your account.` },
];

Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ export const IntroductionPageFormProcess = () => (
(VSO), can help you fill out your application.{' '}
</p>
<p>
<a href="/disability-benefits/apply/help/index.html">
<a href="/get-help-from-accredited-representative/">
Get help filing your claim
</a>
</p>
Original file line number Diff line number Diff line change
@@ -44,7 +44,12 @@ const getRedirectLink = formData => {
destinationPath = DISABILITY_SHARED_CONFIG.ratedDisabilities.path;
} else if (DISABILITY_SHARED_CONFIG.addDisabilities.depends(formData)) {
destinationPath = DISABILITY_SHARED_CONFIG.addDisabilities.path;
} else if (
DISABILITY_SHARED_CONFIG.addDisabilitiesPrevious.depends(formData)
) {
destinationPath = DISABILITY_SHARED_CONFIG.addDisabilitiesPrevious.path;
}

return (
<Link
aria-label="go back and add any missing disabilities"
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ const IntroductionPage = ({ router }) => {

return (
<article className="schemaform-intro">
<FormTitle title="35% exemption of the routine reporting" />
<FormTitle title="Request exemption from the 85/15 Rule reporting requirements" />
<p className="vads-u-margin-y--2">
35% exemption request from 85/15 Rule reporting requirement (VA Form
22-10216)
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ describe('22-10216 <IntroductionPage>', () => {
const wrapper = shallow(<IntroductionPage {...fakeStore.getState()} />);

expect(wrapper.find('FormTitle').props().title).to.contain(
'35% exemption of the routine reporting',
'Request exemption from the 85/15 Rule reporting requirements',
);

wrapper.unmount();
11 changes: 11 additions & 0 deletions src/applications/letters/containers/LetterPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

export function LetterPage() {
return (
<div className="usa-width-three-fourths letters">
<h1>New Letter page</h1>
</div>
);
}

export default LetterPage;
12 changes: 11 additions & 1 deletion src/applications/letters/routes.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
import React from 'react';
import { Navigate, Route, Routes } from 'react-router-dom-v5-compat';

import { Toggler } from 'platform/utilities/feature-toggles';
import AddressSection from './containers/AddressSection';
import App from './containers/App';
import DownloadLetters from './containers/DownloadLetters';
import LetterList from './containers/LetterList';
import Main from './containers/Main';
import { LetterPage } from './containers/LetterPage';

const letterPageFeatureFlagWrapper = (
<Toggler.Hoc toggleName={Toggler.TOGGLE_NAMES.lettersPageNewDesign}>
{toggleValue =>
toggleValue ? <LetterPage /> : <Navigate to="confirm-address" replace />
}
</Toggler.Hoc>
);

const routes = (
<Routes>
<Route path="/" element={<App />}>
<Route index element={<Navigate to="confirm-address" replace />} />
<Route index element={letterPageFeatureFlagWrapper} />
<Route element={<DownloadLetters />}>
<Route element={<AddressSection />} path="confirm-address" />
<Route element={<Main />}>
53 changes: 39 additions & 14 deletions src/applications/mhv-medical-records/actions/common.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { datadogRum } from '@datadog/browser-rum';
import { Actions } from '../util/actionTypes';
import { INITIAL_FHIR_LOAD_DURATION } from '../util/constants';
import * as rumActions from '../util/rumConstants';

const defaultRetryInterval = 2000;

const TIMEOUT_ERROR = 'Timed out while waiting for response';
const STATUS_SUCCESS = 'success';
const STATUS_ERROR = 'error';
const STATUS_TIMEDOUT = 'timedout';

/**
* Helper function to create a delay
*/
@@ -31,7 +38,7 @@ export const getListWithRetryRecursively = async (
endTimeParam === null ? now + INITIAL_FHIR_LOAD_DURATION : endTimeParam;

if (now >= endTime) {
throw new Error('Timed out while waiting for response');
throw new Error(TIMEOUT_ERROR);
}

let response = await getList();
@@ -52,25 +59,43 @@ export const getListWithRetryRecursively = async (
};

/**
* Wrapper for getListWithRetryRecursively(). Its sole function is to make sure the
* CLEAR_INITIAL_FHIR_LOAD action is called only once.
* Wrapper for getListWithRetryRecursively(). Its function is to make sure the
* CLEAR_INITIAL_FHIR_LOAD action is called only once, as well as handle logging.
*/
export const getListWithRetry = async (
dispatch,
getList,
retryInterval = defaultRetryInterval,
endTimeParam = null,
) => {
const response = await getListWithRetryRecursively(
dispatch,
getList,
retryInterval,
endTimeParam,
);
if (response?.id) {
// All successful FHIR calls should have an id, so this indicates a successful response, and we
// clear the initialFhirLoad.
dispatch({ type: Actions.Refresh.CLEAR_INITIAL_FHIR_LOAD });
const startTime = Date.now();
let status = null;
try {
const response = await getListWithRetryRecursively(
dispatch,
getList,
retryInterval,
endTimeParam,
);
if (response?.id) {
// All successful FHIR calls should have an id, so this indicates a successful response, and we
// clear the initialFhirLoad.
dispatch({ type: Actions.Refresh.CLEAR_INITIAL_FHIR_LOAD });
status = STATUS_SUCCESS;
}
return response;
} catch (error) {
if (error.message === TIMEOUT_ERROR) {
status = STATUS_TIMEDOUT;
} else {
status = STATUS_ERROR;
}
throw error;
} finally {
const totalDuration = Math.round((Date.now() - startTime) / 1000);
datadogRum.addAction(rumActions.INITIAL_FHIR_LOAD_DURATION, {
duration: totalDuration,
status,
});
}
return response;
};
1 change: 1 addition & 0 deletions src/applications/mhv-medical-records/util/rumConstants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const INITIAL_FHIR_LOAD_DURATION = 'initial_fhir_polling_duration';
7 changes: 5 additions & 2 deletions src/applications/post-911-gib-status/utils/helpers.jsx
Original file line number Diff line number Diff line change
@@ -176,7 +176,10 @@ export const serviceDowntimeErrorMessage = (
export const genericErrorMessage = (
<div>
<h3>We’re sorry. Something went wrong on our end. Please try again.</h3>
<Link className="usa-button usa-button-primary" to="/">
<Link
className="usa-button usa-button-primary"
to="https://www.va.gov/education/check-remaining-post-9-11-gi-bill-benefits/"
>
Back to Post-9/11 GI Bill
</Link>
</div>
@@ -212,7 +215,7 @@ export const authenticationErrorMessage = (
<li>
You haven’t applied yet for Post-9/11 GI Bill education benefits.
<br />
<Link to="/education/apply-for-benefits-form-22-1990/introduction">
<Link to="https://www.va.gov/education/apply-for-gi-bill-form-22-1990/introduction">
Apply for education benefits
</Link>
</li>
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import { datadogRum } from '@datadog/browser-rum';

import environment from '@department-of-veterans-affairs/platform-utilities/environment';

const DISABLED_ENVIRONMENTS = ['localhost', 'production'];
const DISABLED_ENVIRONMENTS = ['localhost'];

export const canUseRUM = () => {
const env = environment.vspEnvironment();
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ export default function InterstitialChanges() {
id="interstitialH1"
className="vads-u-margin-top--2 medium-screen:vads-u-margin-top--1 medium-screen:vads-u-margin-bottom--2"
>
You’ll need to sign in with a different account after January 31, 2025
You’ll need to sign in with a different account after March 4, 2025
</h1>
<p
className="vads-u-font-size--base section-content vads-u-measure--5"
@@ -68,7 +68,7 @@ export default function InterstitialChanges() {
<h2 id="interstitialH2">Or continue using your old account</h2>
<p className="vads-u-font-size--base" id="interstitialMhvP">
You can use your <strong>My HealtheVet</strong> account to sign in until
January 31, 2025.
March 4, 2025.
</p>
<VaLink
text="Continue with your My HealtheVet account for now"
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ describe('InterstitialChanges', () => {
await waitFor(() => {
expect(
screen.getByRole('heading', {
name: /Youll need to sign in with a different account after January 31, 2025/i,
name: /Youll need to sign in with a different account after March 4, 2025/i,
}),
).to.exist;
expect(screen.getByText(/After this date, we'll remove/i)).to.exist;
9 changes: 8 additions & 1 deletion src/applications/simple-forms/21-4138/config/constants.js
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ export const STATEMENT_TYPES = Object.freeze({
});

export const STATEMENT_TYPE_LABELS = Object.freeze({
[STATEMENT_TYPES.NEW_EVIDENCE]: 'I have new evidence to submit.',
[STATEMENT_TYPES.NEW_EVIDENCE]:
'I have new evidence to submit for an open claim.',
[STATEMENT_TYPES.DECISION_REVIEW]:
"I disagree with VA's decision on my benefit or claim, and I'd like to request a decision review.",
[STATEMENT_TYPES.BUDDY_STATEMENT]:
@@ -80,6 +81,12 @@ export const STATEMENT_TYPE_DESCRIPTIONS = Object.freeze({
[STATEMENT_TYPES.NOT_LISTED]: '',
});

export const STATEMENT_TYPE_PAGE = Object.freeze({
title: 'What would you like to do?',
description:
"We’ve improved how we process certain types of statements and requests. Before you continue with VA Form 21-4138, tell us what you’re trying to do and we'll check if there's a quicker way to help you.",
});

export const DECISION_REVIEW_TYPES = Object.freeze({
NEW_EVIDENCE: 'new-evidence',
ERROR_MADE: 'error-made',
18 changes: 6 additions & 12 deletions src/applications/simple-forms/21-4138/pages/statementType.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
titleUI,
radioUI,
radioSchema,
} from '~/platform/forms-system/src/js/web-component-patterns';
@@ -7,38 +8,31 @@ import {
STATEMENT_TYPES,
STATEMENT_TYPE_LABELS,
STATEMENT_TYPE_DESCRIPTIONS,
STATEMENT_TYPE_PAGE,
} from '../config/constants';

/** @type {PageSchema} */
export const statementTypePage = {
uiSchema: {
...titleUI(STATEMENT_TYPE_PAGE.title, STATEMENT_TYPE_PAGE.description),
statementType: {
...radioUI({
title: 'What would you like to do?',
description:
"We’ve improved how we process certain types of statements and requests. Before you continue with VA Form 21-4138, tell us what you’re trying to do and we'll check if there's a quicker way to help you.",
label: 'Select the option that describes what you want to do',
title: 'Select the option that describes what you want to do',
labels: STATEMENT_TYPE_LABELS,
descriptions: STATEMENT_TYPE_DESCRIPTIONS,
tile: true,
errorMessages: {
required: "Select the kind of statement you'd like to submit",
},
labelHeaderLevel: '1',
}),
},
'view:additionalInfoStatementType': {
'ui:description': ESCAPE_HATCH,
},
'view:additionalInfoStatementType': { 'ui:description': ESCAPE_HATCH },
},
schema: {
type: 'object',
properties: {
statementType: radioSchema(Object.values(STATEMENT_TYPES)),
'view:additionalInfoStatementType': {
type: 'object',
properties: {},
},
'view:additionalInfoStatementType': { type: 'object', properties: {} },
},
required: ['statementType'],
},
25 changes: 13 additions & 12 deletions src/applications/simple-forms/40-0247/components/FileField.jsx
Original file line number Diff line number Diff line change
@@ -135,28 +135,29 @@ const FileField = props => {

const Tag = formContext.onReviewPage && formContext.reviewMode ? 'dl' : 'div';

// hide upload & delete buttons on review & submit page when reviewing
const showButtons = !formContext.reviewMode && !isUploading;

const titleString =
typeof uiSchema['ui:title'] === 'string'
? uiSchema['ui:title']
: schema.title;

const getFileListId = index => `${idSchema.$id}_file_${index}`;
const checkForErrors = () =>
!files.some((file, index) => {
const errors =
errorSchema?.[index]?.__errors ||
[file.errorMessage].filter(error => error);

return errors.length > 0;
});

// This is always true if enableShortWorkflow is not enabled
// If enabled, do not allow upload if any error exist
const checkUploadVisibility = () =>
!enableShortWorkflow ||
(enableShortWorkflow &&
!files.some((file, index) => {
const errors =
errorSchema?.[index]?.__errors ||
[file.errorMessage].filter(error => error);

return errors.length > 0;
}));
!enableShortWorkflow || (enableShortWorkflow && checkForErrors());

// hide upload & delete buttons on review & submit page when reviewing
const showButtons =
!formContext.reviewMode && !isUploading && checkForErrors();

const focusAddAnotherButton = () => {
// Add a timeout to allow for the upload button to reappear in the DOM
Original file line number Diff line number Diff line change
@@ -1,11 +1,59 @@
import React from 'react';
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';

import { focusElement, scrollToTop } from 'platform/utilities/ui';

import { formatDateTime } from '../../../util/dates';

const ConfirmationPage = ({ appointment }) => {
useEffect(() => {
focusElement('h1');
scrollToTop('topScrollElement');
}, []);

const [formattedDate, formattedTime] = formatDateTime(
appointment.vaos.apiData.start,
);

const ConfirmationPage = () => {
return (
<div className="vads-u-margin-bottom--3">
<div>
<h1 tabIndex="-1">We’re processing your travel reimbursement claim</h1>
<va-alert status="success" visible>
<h2 slot="headline">Claim submitted</h2>
<p className="vads-u-margin-y--0">
This claim is for your appointment at{' '}
{appointment.vaos.apiData.location.attributes.name}{' '}
{appointment.vaos.apiData?.practitioners
? `with ${appointment.vaos.apiData.practitioners[0].name.given.join(
' ',
)} ${appointment.vaos.apiData.practitioners[0].name.family}`
: ''}{' '}
on {formattedDate}, {formattedTime}.
</p>
</va-alert>
<h2>What happens next</h2>
<p className="vads-u-margin-y--2">
You can check the status of your claim by going to the travel
reimbursement status page.
</p>
<va-link
href="/my-health/travel-pay/claims/"
text="Check your travel reimbursement claim status"
/>
<p className="vads-u-margin-y--2">
If you’re eligible for reimbursement, we’ll deposit your reimbursement
in your bank account.
</p>
<va-link
href="/resources/how-to-set-up-direct-deposit-for-va-travel-pay-reimbursement/"
text="Learn how to set up direct deposit for travel pay reimbursement"
/>
</div>
);
};

ConfirmationPage.propTypes = {
appointment: PropTypes.object,
};

export default ConfirmationPage;
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ const SubmitFlowWrapper = ({ homeAddress, mailingAddress }) => {
},
{
page: 'confirm',
component: <ConfirmationPage />,
component: <ConfirmationPage appointment={appointment} />,
},
];

Original file line number Diff line number Diff line change
@@ -4,9 +4,63 @@ import { render } from '@testing-library/react';

import ConfirmationPage from '../../../../components/submit-flow/pages/ConfirmationPage';

it('should render', () => {
const screen = render(<ConfirmationPage />);
it('should render with expected content', () => {
const screen = render(
<ConfirmationPage
appointment={{
vaos: {
apiData: {
location: { attributes: { name: 'VA location name' } },
start: '2025-01-15T21:39:27.698Z',
},
},
}}
/>,
);

expect(screen.getByText('We’re processing your travel reimbursement claim'))
.to.exist;

expect(
screen.container.querySelector(
'[href="/my-health/travel-pay/claims/"]',
'[text="Check your travel reimbursement claim status"]',
),
).to.exist;

expect(
screen.container.querySelector(
'[href="/resources/how-to-set-up-direct-deposit-for-va-travel-pay-reimbursement/"]',
'[text="Learn how to set up direct deposit for travel pay reimbursement"]',
),
).to.exist;
});

it('should render practictioner name if available', () => {
const screen = render(
<ConfirmationPage
appointment={{
vaos: {
apiData: {
location: { attributes: { name: 'VA location name' } },
start: '2025-01-15T21:39:27.698Z',
practitioners: [
{
name: { family: 'Last', given: ['First', 'Middle'] },
},
],
},
},
}}
/>,
);

expect(screen.getByText('We’re processing your travel reimbursement claim'))
.to.exist;

expect(
screen.queryAllByText((_, element) =>
element.textContent.includes('with First Middle Last'),
),
).to.not.be.empty;
});
6 changes: 5 additions & 1 deletion src/platform/user/authentication/components/LoginActions.jsx
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ export default function LoginActions({ externalApplication, isUnifiedSignIn }) {
<h3 id="mhvH3">
My HealtheVet sign-in option
<span className="vads-u-display--block vads-u-font-size--md vads-u-font-family--sans">
Available through January 31, 2025
Available through March 4, 2025
</span>
</h3>
<p>
@@ -66,6 +66,10 @@ export default function LoginActions({ externalApplication, isUnifiedSignIn }) {
ariaDescribedBy="mhvH3"
actionLocation={actionLocation}
/>
{/* <va-link
text="Learn how to access your benefits and set up your new account"
href="/resources/what-to-do-if-you-havent-switched-to-logingov-or-idme-yet"
/> */}
</>
)}
{dslogon && (
44 changes: 11 additions & 33 deletions src/platform/user/authentication/components/LoginInfo.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import React from 'react';
import { useFeatureToggle } from '~/platform/utilities/feature-toggles/useFeatureToggle';
import SubmitSignInForm from 'platform/static-data/SubmitSignInForm';

export default () => {
const { useToggleValue, TOGGLE_NAMES } = useFeatureToggle();
const mhvButtonDeprecated = useToggleValue(
TOGGLE_NAMES.mhvCredentialButtonDisabled,
);
const supportLinks = [
{ text: 'Sign-in errors', url: '"/resources/signing-in-to-vagov/"' },
{ text: 'Sign-in errors', url: '/resources/signing-in-to-vagov/' },
{
text: 'Verifying your identity',
url: '/resources/verifying-your-identity-on-vagov/',
@@ -26,36 +21,19 @@ export default () => {
<div className="row">
<div className="columns print-full-width sign-in-wrapper">
<div className="help-info">
<h2 className="vads-u-margin-top--0">
{mhvButtonDeprecated
? 'Help and support'
: 'Having trouble signing in?'}
</h2>
{mhvButtonDeprecated ? (
<h2 className="vads-u-margin-top--0">Having trouble signing in?</h2>

<div>
<div>
<div>
<div role="list" className="vads-u-padding-bottom--3">
{supportLinks.map((link, idx) => (
<li className="vads-u-margin--0" key={idx}>
<a href={link.url}>{link.text}</a>
</li>
))}
</div>
<div role="list" className="vads-u-padding-bottom--3">
{supportLinks.map((link, idx) => (
<li className="vads-u-margin--0" key={idx}>
<a href={link.url}>{link.text}</a>
</li>
))}
</div>
</div>
) : (
<p>
Get answers to common{' '}
<a href="/resources/signing-in-to-vagov/">
questions about signing in
</a>{' '}
and{' '}
<a href="/resources/verifying-your-identity-on-vagov/">
verifying your identity
</a>
.
</p>
)}
</div>
<p>
<SubmitSignInForm startSentence /> We're here 24/7.
</p>
Original file line number Diff line number Diff line change
@@ -4,20 +4,7 @@ import { renderInReduxProvider } from 'platform/testing/unit/react-testing-libra
import LoginInfo from 'platform/user/authentication/components/LoginInfo';

describe('LoginInfo', () => {
it('renders 4 links when toggle is off', () => {
const { container } = renderInReduxProvider(<LoginInfo />, {
initialState: {
featureToggles: {
// eslint-disable-next-line camelcase
mhv_credential_button_disabled: false,
},
},
});
const links = container.querySelectorAll('a');
expect(links.length).to.eql(4);
});

it('renders 5 links when toggle is on', () => {
it('renders 5 links', () => {
const { container } = renderInReduxProvider(<LoginInfo />, {
initialState: {
featureToggles: {
Original file line number Diff line number Diff line change
@@ -117,6 +117,7 @@
"incomeAndAssetsFormEnabled": "income_and_assets_form_enabled",
"intentToFileLighthouseEnabled": "intent_to_file_lighthouse_enabled",
"lettersCheckDiscrepancies": "letters_check_discrepancies",
"lettersPageNewDesign": "letters_page_new_design",
"loopPages": "loop_pages",
"manageDependents": "dependents_management",
"meb160630Automation": "meb_1606_30_automation",

0 comments on commit 355d0a1

Please sign in to comment.