Skip to content

Commit

Permalink
Merge branch 'main' into authed-patterns/aw/vadx-panel-discovery-1
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwhitlock1 committed Nov 27, 2024
2 parents f095785 + 521bb5d commit ac79e3f
Show file tree
Hide file tree
Showing 101 changed files with 13,734 additions and 1,478 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ src/applications/static-pages/health-care-manage-benefits/view-test-and-lab-resu
src/applications/facility-locator @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-platform-cop-frontend
src/applications/static-pages/facilities @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-platform-cop-frontend
src/applications/static-pages/tests/facilities @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-platform-cop-frontend
src/applications/static-pages/situation-updates-banner @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-platform-cop-frontend

# Caregiver

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
"@babel/runtime": "^7.15.4",
"@datadog/browser-logs": "^5.8.0",
"@datadog/browser-rum": "^4.49.0",
"@department-of-veterans-affairs/component-library": "^48.0.2",
"@department-of-veterans-affairs/component-library": "^48.1.0",
"@department-of-veterans-affairs/css-library": "^0.15.0",
"@department-of-veterans-affairs/formation": "^12.0.0",
"@department-of-veterans-affairs/react-jsonschema-form": "^1.2.5",
Expand Down
2 changes: 1 addition & 1 deletion script/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const argv = require('minimist')(process.argv.slice(2));
const printBuildHelp = require('./build-help');
const { runCommand } = require('./utils');

// Preset memory options 1gb -> 8gb
// Preset memory options 1gb -> 12gb
const memoryOptions = [1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 12288];

// Caching the input memory arg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { snakeCase } = require('lodash');
const profileToggles = {
aedpVADX: false,
profileUseExperimental: false,
coeAccess: false,
coeAccess: true,
showEduBenefits1990Wizard: true,
showEduBenefits0994Wizard: true,
showEduBenefits1995Wizard: true,
Expand Down
51 changes: 12 additions & 39 deletions src/applications/appeals/10182/components/ConfirmationPageV2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { hearingTypeLabels } from '../content/hearingType';
import {
ConfirmationTitle,
ConfirmationAlert,
ConfirmationSummary,
ConfirmationReturnLink,
} from '../../shared/components/ConfirmationCommon';
import ConfirmationPersonalInfo from '../../shared/components/ConfirmationPersonalInfo';
import ConfirmationPdfMessages from '../../shared/components/ConfirmationPdfMessages';
import ConfirmationIssues from '../../shared/components/ConfirmationIssues';
import { showValueOrNotSelected } from '../../shared/utils/confirmation';

Expand Down Expand Up @@ -48,48 +48,18 @@ export const ConfirmationPageV2 = () => {
// Fix this after Lighthouse sets up the download URL
const downloadUrl = ''; // NOD_PDF_DOWNLOAD_URL;

const alertTitle = 'Your Board Appeal request submission is in progress';
const alertContent = (
<p>
You submitted the request on {submitDate}. It can take a few days for the
Board to receive your request. We’ll send you a confirmation letter, once
we’ve processed your request.
</p>
);

return (
<>
<ConfirmationTitle pageTitle="Request a Board Appeal" />
<ConfirmationAlert alertTitle={alertTitle} alertContent={alertContent} />

<div className="screen-only">
{downloadUrl && (
<va-summary-box uswds class="vads-u-margin-top--2">
<h3 slot="headline" className="vads-u-margin-top--0">
Save a PDF copy of your Board Appeal request
</h3>
<p>
If you’d like to save a PDF copy of your completed Board Appeal
request for your records, you can download it now.
</p>
<p>
<ConfirmationPdfMessages pdfApi={downloadUrl} />
</p>
<p>
<strong>Note:</strong> This PDF is for your records only. You’ve
already submitted your completed Board Appeal request. We ask that
you don’t send us another copy.
</p>
</va-summary-box>
)}

<h3>Print this confirmation page</h3>
<ConfirmationAlert alertTitle="Your Board Appeal request submission is in progress">
<p>
You can print this page, which includes a summary of the information
you submitted in your Board Appeal request.
You submitted the request on {submitDate}. It can take a few days for
the Board to receive your request. We’ll send you a confirmation
letter, once we’ve processed your request.
</p>
<va-button onClick={window.print} text="Print this page" />
</div>
</ConfirmationAlert>

<ConfirmationSummary name="Board Appeal" downloadUrl={downloadUrl} />

<h2>What to expect next</h2>
<p>
Expand Down Expand Up @@ -192,7 +162,10 @@ export const ConfirmationPageV2 = () => {
veteran={data.veteran}
/>

<ConfirmationIssues data={data}>
<ConfirmationIssues
data={data}
text="The issues you’re asking the board to review"
>
<>
<li>
<div className="vads-u-margin-bottom--0p5 vads-u-color--gray vads-u-font-size--sm">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,20 @@ describe('Confirmation page', () => {
</Provider>,
);
expect($$('ul', container).length).to.eq(4);
expect(
$$('.dd-privacy-hidden[data-dd-action-name]', container).length,
).to.eq(9);

const v2Content = $$('.dd-privacy-hidden[data-dd-action-name]', container);
expect(v2Content.length).to.eq(10);
expect(v2Content.map(el => el.textContent)).to.deep.equal([
'Foo Man Choo, Esq.',
'', // DoB
'Not selected', // Homelessness
'', // Mobile phone
'', // Email
', ', // Address
'Not selected', // Extension
'Not selected', // VA health care benefits
'test 543Decision date: ', // issues
'', // Board review option
]);
});
});
66 changes: 20 additions & 46 deletions src/applications/appeals/996/components/ConfirmationPageV2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import {
RepresentativeEmailTitle,
} from '../content/InformalConferenceRep';
import { CONFERENCE_TIMES_V2_5 } from '../constants';
import { formTitle } from '../content/title';

import {
ConfirmationTitle,
ConfirmationAlert,
ConfirmationSummary,
ConfirmationReturnLink,
} from '../../shared/components/ConfirmationCommon';
import ConfirmationPersonalInfo from '../../shared/components/ConfirmationPersonalInfo';
import ConfirmationPdfMessages from '../../shared/components/ConfirmationPdfMessages';
import ConfirmationIssues from '../../shared/components/ConfirmationIssues';

export const ConfirmationPageV2 = () => {
Expand Down Expand Up @@ -67,53 +68,26 @@ export const ConfirmationPageV2 = () => {
false;
const { informalConferenceRep = {} } = data;

const alertTitle = 'We’ve received your request for a Higher-Level Review';
const alertContent = (
<>
<p className="vads-u-margin-top--0">
If you requested an informal conference, we’ll contact you to schedule
your conference.
</p>
<p className="vads-u-margin-bottom--0">
After we’ve completed our review, we’ll mail you a decision packet with
the details of our decision.
</p>
</>
);

return (
<>
<ConfirmationTitle pageTitle="Request a Higher-Level Review" />
<ConfirmationAlert alertTitle={alertTitle} alertContent={alertContent} />

<div className="screen-only">
{downloadUrl && (
<va-summary-box uswds class="vads-u-margin-top--2">
<h3 slot="headline" className="vads-u-margin-top--0">
Save a PDF copy of your Higher-Level Review request
</h3>
<p>
If you’d like to save a PDF copy of your completed Higher-Level
Review request for your records, you can download it now.
</p>
<p>
<ConfirmationPdfMessages pdfApi={downloadUrl} />
</p>
<p>
<strong>Note:</strong> This PDF is for your records only. You’ve
already submitted your completed Higher-Level Review request. We
ask that you don’t send us another copy.
</p>
</va-summary-box>
)}

<h3>Print this confirmation page</h3>
<p>
You can print this page, which includes a summary of the information
you submitted in your Higher-Level Review request.
</p>
<va-button onClick={window.print} text="Print this page" />
</div>
<ConfirmationTitle pageTitle={formTitle} />
<ConfirmationAlert alertTitle="We’ve received your request for a Higher-Level Review">
<>
<p className="vads-u-margin-top--0">
If you requested an informal conference, we’ll contact you to
schedule your conference.
</p>
<p className="vads-u-margin-bottom--0">
After we’ve completed our review, we’ll mail you a decision packet
with the details of our decision.
</p>
</>
</ConfirmationAlert>

<ConfirmationSummary
name="Higher-Level Review"
downloadUrl={downloadUrl}
/>

<h2>What to expect next</h2>
<p>
Expand Down
3 changes: 2 additions & 1 deletion src/applications/appeals/996/containers/ConfirmationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { resetStoredSubTask } from '@department-of-veterans-affairs/platform-for
import { Toggler } from 'platform/utilities/feature-toggles';

import ConfirmationPageV2 from '../components/ConfirmationPageV2';
import { formTitle } from '../content/title';
import ConfirmationDecisionReviews from '../../shared/components/ConfirmationDecisionReviews';

const alertContent = (
Expand Down Expand Up @@ -32,7 +33,7 @@ export const ConfirmationPage = () => {
<Toggler.Disabled>
<ConfirmationDecisionReviews
appType="request"
pageTitle="Request a Higher-Level Review"
pageTitle={formTitle}
alertTitle="We’ve received your request for a Higher-Level Review"
alertContent={alertContent}
>
Expand Down
44 changes: 41 additions & 3 deletions src/applications/appeals/shared/components/ConfirmationCommon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import PropTypes from 'prop-types';
import scrollTo from '@department-of-veterans-affairs/platform-utilities/scrollTo';
import { waitForRenderThenFocus } from '@department-of-veterans-affairs/platform-utilities/ui';

import ConfirmationPdfMessages from './ConfirmationPdfMessages';

export const ConfirmationTitle = ({ pageTitle }) => (
<div className="print-only">
<img
Expand All @@ -19,7 +21,7 @@ ConfirmationTitle.propTypes = {
pageTitle: PropTypes.string,
};

export const ConfirmationAlert = ({ alertTitle, alertContent }) => {
export const ConfirmationAlert = ({ alertTitle, children }) => {
const alertRef = useRef(null);

useEffect(
Expand All @@ -37,15 +39,51 @@ export const ConfirmationAlert = ({ alertTitle, alertContent }) => {
<div>
<va-alert status="success" ref={alertRef}>
<h2 slot="headline">{alertTitle}</h2>
{alertContent}
{children}
</va-alert>
</div>
);
};

ConfirmationAlert.propTypes = {
alertContent: PropTypes.element,
alertTitle: PropTypes.string,
children: PropTypes.element,
};

export const ConfirmationSummary = ({ name, downloadUrl }) => (
<div className="screen-only">
{downloadUrl && (
<va-summary-box uswds class="vads-u-margin-top--2">
<h3 slot="headline" className="vads-u-margin-top--0">
{`Save a PDF copy of your ${name} request`}
</h3>
<p>
{`If you’d like to save a PDF copy of your completed ${name} request for your records, you can download it now.`}
</p>
<p>
<ConfirmationPdfMessages
pdfApi={downloadUrl}
successLinkText={`Download a copy of your completed ${name} request (PDF)`}
/>
</p>
<p>
<strong>Note:</strong>
{` This PDF is for your records only. You’ve already submitted your completed ${name} request. We ask that you don’t send us another copy.`}
</p>
</va-summary-box>
)}

<h3>Print this confirmation page</h3>
<p>
{`You can print this page, which includes a summary of the information you submitted in your ${name} request.`}
</p>
<va-button onClick={window.print} text="Print this page" />
</div>
);

ConfirmationSummary.propTypes = {
downloadUrl: PropTypes.string,
name: PropTypes.string,
};

export const ConfirmationReturnLink = () => (
Expand Down
23 changes: 16 additions & 7 deletions src/applications/appeals/shared/components/ConfirmationIssues.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@ import React from 'react';
import PropTypes from 'prop-types';

import { getReadableDate } from '../utils/dates';
import { getIssueName, getIssueDate } from '../utils/issues';
import { getSelected, getIssueName, getIssueDate } from '../utils/issues';
import { disagreeWith } from '../utils/areaOfDisagreement';

const ConfirmationIssues = ({ data, children = null }) => {
const ConfirmationIssues = ({
data,
text = 'You’ve selected these issues for review',
children = null,
}) => {
const hasAod = data.areaOfDisagreement?.length > 0;
const issues = hasAod ? data.areaOfDisagreement : getSelected(data);
return (
<>
<h3 className="vads-u-margin-top--2">Issues for review</h3>
{/* Adding a `role="list"` to `ul` with `list-style: none` to work around
a problem with Safari not treating the `ul` as a list. */}
a problem with Safari not treating the `ul` as a list. */}
{/* eslint-disable-next-line jsx-a11y/no-redundant-roles */}
<ul className="remove-bullets" role="list">
{children}
{/* List item that is common for all Decision Review forms */}
<li>
<div className="vads-u-margin-bottom--0p5 vads-u-color--gray vads-u-font-size--sm vads-u-margin-top--2">
The issues you’re asking the board to review:
{text}:
</div>
{/* Adding a `role="list"` to `ul` with `list-style: none` to work around
a problem with Safari not treating the `ul` as a list. */}
a problem with Safari not treating the `ul` as a list. */}
{/* eslint-disable-next-line jsx-a11y/no-redundant-roles */}
<ul className="remove-bullets" role="list">
{data.areaOfDisagreement?.map((issue, index) => (
{issues?.map((issue, index) => (
<li
key={index}
className="vads-u-margin-bottom--2 dd-privacy-hidden"
Expand All @@ -33,7 +39,7 @@ const ConfirmationIssues = ({ data, children = null }) => {
{getIssueName(issue)}
</strong>
<div>Decision date: {getReadableDate(getIssueDate(issue))}</div>
<div>{disagreeWith(issue)}</div>
{hasAod && <div>{disagreeWith(issue)}</div>}
</li>
))}
</ul>
Expand All @@ -46,11 +52,14 @@ const ConfirmationIssues = ({ data, children = null }) => {
ConfirmationIssues.propTypes = {
children: PropTypes.element,
data: PropTypes.shape({
additionalIssues: PropTypes.arrayOf(PropTypes.shape({})),
appealingVHADenial: PropTypes.bool,
areaOfDisagreement: PropTypes.arrayOf(PropTypes.shape({})),
contestedIssues: PropTypes.arrayOf(PropTypes.shape({})),
extensionReason: PropTypes.string,
requestingExtension: PropTypes.bool,
}),
text: PropTypes.string,
};

export default ConfirmationIssues;
Loading

0 comments on commit ac79e3f

Please sign in to comment.