diff --git a/.eslintrc.js b/.eslintrc.js index 73021f311090..370efba534eb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -112,6 +112,12 @@ module.exports = { 'jsx-a11y/no-static-element-interactions': 1, // 20 }, overrides: [ + { + files: ['*'], + rules: { + 'cypress/unsafe-to-chain-command': 'warn', + }, + }, { files: [ '**/*.spec.jsx', @@ -120,6 +126,7 @@ module.exports = { 'src/platform/testing/**/*.jsx', ], rules: { + 'cypress/unsafe-to-chain-command': 'warn', 'no-restricted-imports': ['error', 'raven'], 'no-unused-expressions': 0, 'react/no-find-dom-node': 0, @@ -130,9 +137,9 @@ module.exports = { { files: ['**/*.cypress.spec.js'], rules: { + 'cypress/unsafe-to-chain-command': 'warn', '@department-of-veterans-affairs/axe-check-required': 1, '@department-of-veterans-affairs/cypress-viewport-deprecated': 1, - 'cypress/unsafe-to-chain-command': 0, }, }, ], diff --git a/package.json b/package.json index 8df8a68c464e..b1e305a6acbe 100644 --- a/package.json +++ b/package.json @@ -244,6 +244,7 @@ "private": true, "dependencies": { "@babel/runtime": "^7.15.4", + "@department-of-veterans-affairs/css-library": "^0.1.0-rc4", "@department-of-veterans-affairs/component-library": "^19.1.0", "@department-of-veterans-affairs/formation": "^7.0.8", "@department-of-veterans-affairs/react-jsonschema-form": "^1.2.5", diff --git a/src/applications/claims-status/components/ClosedClaimMessage.jsx b/src/applications/claims-status/components/ClosedClaimMessage.jsx index f7f5c02df866..948e036f8db2 100644 --- a/src/applications/claims-status/components/ClosedClaimMessage.jsx +++ b/src/applications/claims-status/components/ClosedClaimMessage.jsx @@ -1,7 +1,15 @@ import React from 'react'; import { Link } from 'react-router'; +import { + format, + getUnixTime, + isAfter, + isValid, + parseISO, + startOfDay, + subDays, +} from 'date-fns'; import { orderBy } from 'lodash'; -import moment from 'moment'; import PropTypes from 'prop-types'; import recordEvent from 'platform/monitoring/record-event'; @@ -25,22 +33,16 @@ const getRecentlyClosedClaims = claims => { // Check if this is an appeal, if so we want to filter it out // if it was closed more than 60 days ago if (isAppeal(claim)) { - const sixtyDaysAgo = moment() - .add(-60, 'days') - .startOf('day'); + const sixtyDaysAgo = startOfDay(subDays(new Date(), 60)); const events = orderBy( claim.attributes.events, - [e => moment(e.date).unix()], + [e => getUnixTime(parseISO(e.date))], ['desc'], ); const lastEvent = events[0]; + const lastEventDate = startOfDay(parseISO(lastEvent.date)); - return ( - !claim.attributes.active && - moment(lastEvent.date) - .startOf('day') - .isAfter(sixtyDaysAgo) - ); + return !claim.attributes.active && isAfter(lastEventDate, sixtyDaysAgo); } // START lighthouse_migration @@ -52,22 +54,16 @@ const getRecentlyClosedClaims = claims => { // If the claim is not an appeal, we want to filter it out // if it was closed more than 30 days ago - return ( - isClosed && - moment(dateClosed || null) - .startOf('day') - .isAfter( - moment() - .add(-30, 'days') - .startOf('day'), - ) - ); + const thirtyDaysAgo = startOfDay(subDays(new Date(), 30)); + const startOfCloseDate = startOfDay(parseISO(dateClosed)); + + return isClosed && isAfter(startOfCloseDate, thirtyDaysAgo); }) .map(c => { if (isAppeal(c)) { const events = orderBy( c.attributes.events, - [e => moment(e.date).unix()], + [e => getUnixTime(parseISO(e.date))], ['desc'], ); return { @@ -98,7 +94,13 @@ const getClaimDate = claim => { }; // END lighthouse_migration -const formatDate = date => moment(date || null).format('MMMM D, YYYY'); +const formatDate = date => { + const parsedDate = parseISO(date); + + return isValid(parsedDate) + ? format(parsedDate, 'MMMM d, yyyy') + : 'Invalid date'; +}; const getLinkText = claim => { const claimType = isAppeal(claim) diff --git a/src/applications/disability-benefits/all-claims/content/itfWrapper.jsx b/src/applications/disability-benefits/all-claims/content/itfWrapper.jsx index 19bc496875b1..512abcc6eb37 100644 --- a/src/applications/disability-benefits/all-claims/content/itfWrapper.jsx +++ b/src/applications/disability-benefits/all-claims/content/itfWrapper.jsx @@ -7,9 +7,13 @@ import { recordEventOnce } from 'platform/monitoring/record-event'; // EVSS returns dates like '2014-07-28T19:53:45.810+0000' const evssDateFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZ'; -const outputDateFormat = 'MMMM DD, YYYY'; +const outputDateFormat = 'dddd MMMM Do[,] Y [at] h[:]ma'; +// Adding 1 hour to the displayDate output will display the time in the ET timezone as the returned time and date +// is in the central timezone const displayDate = dateString => - moment(dateString, evssDateFormat).format(outputDateFormat); + moment(dateString, evssDateFormat) + .add(1, 'hours') + .format(outputDateFormat); export const itfMessage = (headline, content, status) => ( // Inline style to match .full-page-alert bottom margin because usa-grid > :last-child has a @@ -80,15 +84,15 @@ export const itfSuccess = (

Thank you for submitting your Intent to File request for disability compensation. Your Intent to File will expire on{' '} - {displayDate(expirationDate)}. + {displayDate(expirationDate)} ET.

{hasPreviousItf && (

Please note: We found a previous Intent to File request - in our records that expired on {displayDate(prevExpirationDate)}. This - ITF might have been from an application you started, but didn’t finish - before the ITF expired. Or, it could have been from a claim you already - submitted. + in our records that expired on{' '} + {displayDate(prevExpirationDate)} ET. This ITF might + have been from an application you started, but didn’t finish before the + ITF expired. Or, it could have been from a claim you already submitted.

)} {expander} @@ -100,7 +104,7 @@ export const itfActive = expirationDate => (

Our records show that you already have an Intent to File for disability compensation. Your Intent to File will expire on{' '} - {displayDate(expirationDate)}. You’ll need to submit your claim by this + {displayDate(expirationDate)} ET. You’ll need to submit your claim by this date in order to receive payments starting from your effective date.

{expander} diff --git a/src/applications/ds-v3-playground/pages/V3BasePage.jsx b/src/applications/ds-v3-playground/pages/V3BasePage.jsx index e2a8b725aaa6..a67d59f5b8f0 100644 --- a/src/applications/ds-v3-playground/pages/V3BasePage.jsx +++ b/src/applications/ds-v3-playground/pages/V3BasePage.jsx @@ -113,15 +113,15 @@ export default function V3BasePage() { return ( <> -
-
+
+

V3 Without Formation Demo

{/* Text Input */} -
-

Text input component

-
+
+

Text input component

+
{/* Number Input */} -
-

Number input component

-
+
+

Number input component

+
{/* Select */} -
-

Select component

-
+
+

Select component

+
{/* Radio */} -
-

Radio component

-
+
+

Radio component

+
{/* Checkbox */} -
-

Checkbox component

-
+
+

Checkbox component

+
{/* Memorable Date */} -
-

Memorable date component

-
+
+

Memorable date component

+
{/* Textarea */} -
-

Textarea component

-
+
+

Textarea component

+
{/* Button pair */} -
-

Button pair

-
+
+

Button pair

+
@@ -267,9 +267,9 @@ export default function V3BasePage() {
{/* Button */} -
-

Button

-
+
+

Button

+
handleClick('v3ButtonValue', 'V3 edit')} text="Edit" @@ -280,9 +280,9 @@ export default function V3BasePage() {
{/* Modal */} -
-

Modal

-
+
+

Modal

+
{/* Privacy Agreement */} -
-

Privacy Agreement

-
+
+

Privacy Agreement

+
@@ -326,9 +326,9 @@ export default function V3BasePage() {
{/* Alert */} -
-

Alert

-
+
+

Alert

+

Statuses

{/* Progress bar - segmented */} -
-

Progress bar - segmented

-
+
+

Progress bar - segmented

+
{/* Additional Info */} -
-

Additional Info

-
+
+

Additional Info

+
Here are some items
    diff --git a/src/applications/ds-v3-playground/sass/ds-v3-playground.scss b/src/applications/ds-v3-playground/sass/ds-v3-playground.scss index 199eb310f7f6..c8eeed7c40bf 100644 --- a/src/applications/ds-v3-playground/sass/ds-v3-playground.scss +++ b/src/applications/ds-v3-playground/sass/ds-v3-playground.scss @@ -1,4 +1,4 @@ - +@import "~@department-of-veterans-affairs/css-library/dist/utilities.css"; @font-face { font-family: "Font Awesome 5 Free"; @@ -10,8 +10,20 @@ font-display: swap; } -.grid-container { - font-family: var(--font-source-sans); +@font-face { + font-family: "Source Sans Pro Web"; + src: url("/generated/sourcesanspro-regular-webfont.woff2") format("woff2"); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Source Sans Pro Web"; + src: url("/generated/sourcesanspro-bold-webfont.woff2") format("woff2"); + font-weight: bold; + font-style: normal; + font-display: swap; } .border-bottom { diff --git a/src/applications/edu-benefits/1990/config/form.js b/src/applications/edu-benefits/1990/config/form.js index e6a8e9baa177..a54c83cc629d 100644 --- a/src/applications/edu-benefits/1990/config/form.js +++ b/src/applications/edu-benefits/1990/config/form.js @@ -31,7 +31,6 @@ import seniorRotcUI from '../../definitions/seniorRotc'; import createDirectDepositPage1990 from '../pages/DirectDeposit'; import * as toursOfDuty from '../../definitions/toursOfDuty'; -import serviceBefore1977UI from '../../definitions/serviceBefore1977'; import IntroductionPage from '../containers/IntroductionPage'; import ConfirmationPage from '../containers/ConfirmationPage'; @@ -52,8 +51,6 @@ import { import { urlMigration } from '../../config/migrations'; -import { hasServiceBefore1977 } from '../../utils/helpers.jsx'; - import { benefitsLabels } from '../../utils/labels'; const { @@ -79,7 +76,6 @@ const { year, currentlyActiveDuty, address, - serviceBefore1977, usaPhone, } = fullSchema1990.definitions; @@ -118,7 +114,6 @@ const formConfig = { ssn, year, address, - serviceBefore1977, usaPhone, }, title: 'Apply for education benefits', @@ -567,21 +562,6 @@ const formConfig = { 'ui:title': 'Contact information', }, }), - dependents: { - title: 'Dependent information', - path: 'personal-information/dependents', - depends: hasServiceBefore1977, - uiSchema: { - 'ui:title': 'Dependents', - serviceBefore1977: serviceBefore1977UI, - }, - schema: { - type: 'object', - properties: { - serviceBefore1977, - }, - }, - }, directDeposit: createDirectDepositPage1990(), }, }, diff --git a/src/applications/edu-benefits/1990/tests/config/dependents.unit.spec.jsx b/src/applications/edu-benefits/1990/tests/config/dependents.unit.spec.jsx deleted file mode 100644 index 06e9afc1fbb2..000000000000 --- a/src/applications/edu-benefits/1990/tests/config/dependents.unit.spec.jsx +++ /dev/null @@ -1,82 +0,0 @@ -import React from 'react'; -import { expect } from 'chai'; -import ReactTestUtils from 'react-dom/test-utils'; - -import { - DefinitionTester, - getFormDOM, -} from 'platform/testing/unit/schemaform-utils.jsx'; -import formConfig from '../../../1990/config/form.js'; - -describe('Edu 1990 dependents', () => { - const { - schema, - uiSchema, - depends, - } = formConfig.chapters.personalInformation.pages.dependents; - it('should render', () => { - const form = ReactTestUtils.renderIntoDocument( - , - ); - const formDOM = getFormDOM(form); - - expect(formDOM.querySelectorAll('input, select').length).to.equal(6); - }); - it('should show errors if submitted without information', () => { - const form = ReactTestUtils.renderIntoDocument( - , - ); - const formDOM = getFormDOM(form); - formDOM.submitForm(); - - expect(formDOM.querySelectorAll('.usa-input-error').length).to.equal(3); - }); - it('should show page only if served before 1977', () => { - expect( - depends({ - toursOfDuty: [ - { - dateRange: { - from: '1970-01-01', - to: '1990-01-01', - }, - }, - ], - }), - ).to.be.true; - expect( - depends({ - toursOfDuty: [ - { - dateRange: { - from: '1977-01-02', - to: '1990-01-01', - }, - }, - ], - }), - ).to.be.false; - }); -}); diff --git a/src/applications/edu-benefits/1990/tests/e2e/fixtures/data/minimal.json b/src/applications/edu-benefits/1990/tests/e2e/fixtures/data/minimal.json index 543b61f28713..390fa478bab9 100644 --- a/src/applications/edu-benefits/1990/tests/e2e/fixtures/data/minimal.json +++ b/src/applications/edu-benefits/1990/tests/e2e/fixtures/data/minimal.json @@ -38,6 +38,5 @@ }, "veteranSocialSecurityNumber": "111223333", "veteranDateOfBirth": "1980-01-01", - "serviceBefore1977": {}, "bankAccount": {} } diff --git a/src/applications/edu-benefits/1995/config/chapters.js b/src/applications/edu-benefits/1995/config/chapters.js index 2690ee631df0..526e5fa0784a 100644 --- a/src/applications/edu-benefits/1995/config/chapters.js +++ b/src/applications/edu-benefits/1995/config/chapters.js @@ -1,5 +1,6 @@ import fullSchema1995 from 'vets-json-schema/dist/22-1995-schema.json'; import createApplicantInformationPage from 'platform/forms/pages/applicantInformation'; +import environment from 'platform/utilities/environment'; import createContactInformationPage from '../../pages/contactInformation'; import createOldSchoolPage from '../../pages/oldSchool'; import createDirectDepositChangePage from '../../pages/directDepositChange'; @@ -80,7 +81,10 @@ export const chapters = { title: 'Dependents', path: 'personal-information/dependents', depends: form => { - return form['view:hasServiceBefore1978'] === true; + return ( + environment.isProduction() && + form['view:hasServiceBefore1978'] === true + ); }, uiSchema: dependents.uiSchema, schema: dependents.schema, diff --git a/src/applications/edu-benefits/1995/tests/config/dependents.unit.spec.jsx b/src/applications/edu-benefits/1995/tests/config/dependents.unit.spec.jsx deleted file mode 100644 index ddc89a3993ca..000000000000 --- a/src/applications/edu-benefits/1995/tests/config/dependents.unit.spec.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import { findDOMNode } from 'react-dom'; -import { expect } from 'chai'; -import ReactTestUtils from 'react-dom/test-utils'; - -import { - DefinitionTester, - submitForm, -} from 'platform/testing/unit/schemaform-utils.jsx'; -import formConfig from '../../../1995/config/form'; - -describe('Edu 1995 dependents', () => { - const { - schema, - uiSchema, - } = formConfig.chapters.personalInformation.pages.dependents; - it('should render', () => { - const form = ReactTestUtils.renderIntoDocument( - , - ); - - const formDOM = findDOMNode(form); - - expect(formDOM.querySelectorAll('input').length).to.equal(6); - }); - it('should have all fields set as required', () => { - const form = ReactTestUtils.renderIntoDocument( - , - ); - - const formDOM = findDOMNode(form); - submitForm(form); - - expect(formDOM.querySelectorAll('.usa-input-error').length).to.equal(3); - }); -}); diff --git a/src/applications/facility-locator/components/SearchControls.jsx b/src/applications/facility-locator/components/SearchControls.jsx index 1acdd172f7fc..ccd68f9d5e95 100644 --- a/src/applications/facility-locator/components/SearchControls.jsx +++ b/src/applications/facility-locator/components/SearchControls.jsx @@ -1,6 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; import recordEvent from 'platform/monitoring/record-event'; -import omit from 'platform/utilities/data/omit'; import { focusElement } from 'platform/utilities/ui'; import classNames from 'classnames'; import { VaModal } from '@department-of-veterans-affairs/component-library/dist/react-bindings'; @@ -267,7 +266,6 @@ const SearchControls = props => { }; const renderServiceTypeDropdown = () => { - const { searchCovid19Vaccine } = props; const { facilityType, serviceType, serviceTypeChanged } = currentQuery; const disabled = ![ LocationType.HEALTH, @@ -278,12 +276,8 @@ const SearchControls = props => { ].includes(facilityType); const showError = serviceTypeChanged && !disabled && !serviceType; + const filteredHealthServices = healthServices; - let filteredHealthServices = healthServices; - - if (!searchCovid19Vaccine) { - filteredHealthServices = omit(['Covid19Vaccine'], healthServices); - } let services; // Determine what service types to display for the location type (if any). switch (facilityType) { diff --git a/src/applications/facility-locator/components/search-results-items/Covid19Result.jsx b/src/applications/facility-locator/components/search-results-items/Covid19Result.jsx index be6ad4323184..b156efc90aeb 100644 --- a/src/applications/facility-locator/components/search-results-items/Covid19Result.jsx +++ b/src/applications/facility-locator/components/search-results-items/Covid19Result.jsx @@ -22,10 +22,10 @@ const Covid19Result = ({ detailedServices, phone, } = location.attributes; - const appointmentPhone = detailedServices - ? detailedServices[0]?.appointmentPhones[0] - : null; - const infoURL = detailedServices ? detailedServices[0]?.path : null; + + const appointmentPhone = + detailedServices?.[0]?.appointmentPhones?.[0] || null; + const infoURL = detailedServices?.[0]?.path || null; return (
    diff --git a/src/applications/facility-locator/containers/FacilitiesMap.jsx b/src/applications/facility-locator/containers/FacilitiesMap.jsx index cb2f0d6508c4..69b2f0a32101 100644 --- a/src/applications/facility-locator/containers/FacilitiesMap.jsx +++ b/src/applications/facility-locator/containers/FacilitiesMap.jsx @@ -26,7 +26,6 @@ import { facilitiesPpmsSuppressCommunityCare, facilitiesPpmsSuppressPharmacies, facilityLocatorPredictiveLocationSearch, - facilityLocatorLighthouseCovidVaccineQuery, } from '../utils/featureFlagSelectors'; import ResultsList from '../components/ResultsList'; import PaginationWrapper from '../components/PaginationWrapper'; @@ -433,7 +432,6 @@ const FacilitiesMap = props => { suppressPPMS={props.suppressPPMS} suppressCCP={props.suppressCCP} suppressPharmacies={props.suppressPharmacies} - searchCovid19Vaccine={props.searchCovid19Vaccine} clearSearchText={props.clearSearchText} /> {(isEmergencyCareType || isCppEmergencyCareTypes) && ( @@ -664,7 +662,6 @@ const mapStateToProps = state => ({ suppressPharmacies: facilitiesPpmsSuppressPharmacies(state), suppressCCP: facilitiesPpmsSuppressCommunityCare(state), usePredictiveGeolocation: facilityLocatorPredictiveLocationSearch(state), - searchCovid19Vaccine: facilityLocatorLighthouseCovidVaccineQuery(state), results: state.searchResult.results, searchError: state.searchResult.error, resultTime: state.searchResult.resultTime, diff --git a/src/applications/facility-locator/tests/e2e/facilitySearch.cypress.spec.js b/src/applications/facility-locator/tests/e2e/facilitySearch.cypress.spec.js index 86cd359431d4..c065d4f70639 100644 --- a/src/applications/facility-locator/tests/e2e/facilitySearch.cypress.spec.js +++ b/src/applications/facility-locator/tests/e2e/facilitySearch.cypress.spec.js @@ -9,6 +9,7 @@ const healthServices = { All: 'All VA health services', PrimaryCare: 'Primary care', MentalHealthCare: 'Mental health care', + Covid19Vaccine: 'COVID-19 vaccine', DentalServices: 'Dental services', UrgentCare: 'Urgent care', EmergencyCare: 'Emergency care', diff --git a/src/applications/facility-locator/utils/featureFlagSelectors.js b/src/applications/facility-locator/utils/featureFlagSelectors.js index 1c25f134325a..347f5d94a286 100644 --- a/src/applications/facility-locator/utils/featureFlagSelectors.js +++ b/src/applications/facility-locator/utils/featureFlagSelectors.js @@ -15,11 +15,6 @@ export const facilityLocatorPredictiveLocationSearch = state => FEATURE_FLAG_NAMES.facilityLocatorPredictiveLocationSearch ]; -export const facilityLocatorLighthouseCovidVaccineQuery = state => - toggleValues(state)[ - FEATURE_FLAG_NAMES.facilityLocatorLighthouseCovidVaccineQuery - ]; - export const facilityLocatorShowOperationalHoursSpecialInstructions = state => toggleValues(state)[ FEATURE_FLAG_NAMES.facilityLocatorShowOperationalHoursSpecialInstructions diff --git a/src/applications/hca/components/ConfirmationPage/ConfirmationPrintView.jsx b/src/applications/hca/components/ConfirmationPage/ConfirmationPrintView.jsx index 3011506c357b..57cb6855bf7d 100644 --- a/src/applications/hca/components/ConfirmationPage/ConfirmationPrintView.jsx +++ b/src/applications/hca/components/ConfirmationPage/ConfirmationPrintView.jsx @@ -31,17 +31,22 @@ const ConfirmationPrintView = ({ name, timestamp }) => {
    -
    +
    Veteran’s name
    -
    {name}
    +
    {name}
    {!!timestamp && (
    Date you applied
    -
    {moment(timestamp).format('MMM D, YYYY')}
    +
    + {moment(timestamp).format('MMM D, YYYY')} +
    )}
    diff --git a/src/applications/hca/components/ConfirmationPage/ConfirmationScreenView.jsx b/src/applications/hca/components/ConfirmationPage/ConfirmationScreenView.jsx index 63a012e991d1..d4401da53a6c 100644 --- a/src/applications/hca/components/ConfirmationPage/ConfirmationScreenView.jsx +++ b/src/applications/hca/components/ConfirmationPage/ConfirmationScreenView.jsx @@ -34,14 +34,24 @@ const ConfirmationScreenView = ({ name, timestamp }) => {
    Veteran’s name
    -
    {name}
    +
    + {name} +
    {!!timestamp && (
    Date you applied
    -
    {moment(timestamp).format('MMM D, YYYY')}
    +
    + {moment(timestamp).format('MMM D, YYYY')} +
    )}
    diff --git a/src/applications/hca/components/FormPages/VeteranInformation.jsx b/src/applications/hca/components/FormPages/VeteranInformation.jsx new file mode 100644 index 000000000000..938c22b2bda4 --- /dev/null +++ b/src/applications/hca/components/FormPages/VeteranInformation.jsx @@ -0,0 +1,46 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +import FormNavButtons from 'platform/forms-system/src/js/components/FormNavButtons'; +import AuthProfileInformation from '../VeteranInformation/AuthProfileInformation'; +import GuestVerifiedInformation from '../VeteranInformation/GuestVerifiedInformation'; + +const VeteranInformation = props => { + const { + data, + user, + goBack, + goForward, + contentBeforeButtons, + contentAfterButtons, + } = props; + + return ( + <> + {data['view:isLoggedIn'] ? ( + + ) : ( + + )} + {contentBeforeButtons} + + {contentAfterButtons} + + ); +}; + +VeteranInformation.propTypes = { + contentAfterButtons: PropTypes.element, + contentBeforeButtons: PropTypes.element, + data: PropTypes.object, + goBack: PropTypes.func, + goForward: PropTypes.func, + user: PropTypes.object, +}; + +const mapStateToProps = state => ({ + user: state.user.profile, +}); + +export default connect(mapStateToProps)(VeteranInformation); diff --git a/src/applications/hca/components/FormPages/VeteranProfileInformation.jsx b/src/applications/hca/components/FormPages/VeteranProfileInformation.jsx deleted file mode 100644 index efaba525fa8d..000000000000 --- a/src/applications/hca/components/FormPages/VeteranProfileInformation.jsx +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import moment from 'moment'; - -import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts'; -import FormNavButtons from 'platform/forms-system/src/js/components/FormNavButtons'; -import { normalizeFullName } from '../../utils/helpers'; - -const VeteranProfileInformation = ({ goBack, goForward, user }) => { - const { userFullName, dob } = user; - const veteranDOB = dob && moment(dob).format('MMMM DD, YYYY'); - const veteranName = normalizeFullName(userFullName, true); - - return ( - <> -
    -

    - {dob - ? 'This is the personal information we have on file for you.' - : 'Here’s the name we have on file for you.'} -

    -
    -
    -

    - {veteranName} -

    - - {dob ? ( -

    - Date of birth: {veteranDOB} -

    - ) : null} -
    -
    -

    - Note: If you need to update your personal - information, call our VA benefits hotline at{' '} - ( - - ), Monday through Friday, 8:00 a.m. to 9:00 p.m.{' '} - - ET - - . -

    -

    - You can also call your VA medical center ( - ) to - get help changing your name on file with VA. Ask for the eligibility - department. -

    -
    - - - ); -}; - -VeteranProfileInformation.propTypes = { - goBack: PropTypes.func, - goForward: PropTypes.func, - user: PropTypes.object, -}; - -const mapStateToProps = state => ({ - user: state.user.profile, -}); - -export default connect(mapStateToProps)(VeteranProfileInformation); diff --git a/src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx b/src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx index 9ec97f67bcc6..e261fb7517ff 100644 --- a/src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx +++ b/src/applications/hca/components/IntroductionPage/GetStarted/ProcessTimeline.jsx @@ -4,182 +4,177 @@ import { CONTACTS } from '@department-of-veterans-affairs/component-library/cont const ProcessTimeline = () => ( <>

    Follow these steps to get started

    -
    -
      -
    1. -

      Check your eligibility

      + +
    2. +

      Check your eligibility

      +

      + Make sure you meet our eligibility requirements for enrollment before + you apply. +

      +

      + Note: We can help connect you with mental health + care—no matter your discharge status, service history, or eligibility + for VA health care.{' '} + +

      +

      - Make sure you meet our eligibility requirements for enrollment - before you apply. + You may be eligible to enroll in VA health care if all of these + statements are true: +

      +
        +
      • + You served in the active military, naval, or air service + (including being called up from the National Guard or Reserve by a + federal order), and +
      • +
      • + You didn’t receive a dishonorable discharge, and +
      • +
      • + You meet at least one of the service requirements for enrollment +
      • +
      + +

      You must meet at least one of these service requirements:

      +
        +
      • + You served at least 24 months in a row without a break (called + continuous), or for your full active-duty period,{' '} + or +
      • +
      • + You were discharged for a service-connected disability,{' '} + or +
      • +
      • + You were discharged for a hardship or “early out,”{' '} + or +
      • +
      • You served before September 7, 1980
      • +
      + +

      + Note: Time spent on active-duty status for training + purposes only doesn’t count toward the service requirements.

      - Note: We can help connect you with mental health - care—no matter your discharge status, service history, or - eligibility for VA health care.{' '} - + + Get instructions on how to apply for a discharge upgrade or + correction +

      - -

      - You may be eligible to enroll in VA health care if all of these - statements are true: -

      -
        -
      • - You served in the active military, naval, or air service - (including being called up from the National Guard or Reserve by - a federal order), and -
      • -
      • - You didn’t receive a dishonorable discharge,{' '} - and -
      • -
      • - You meet at least one of the service requirements for enrollment -
      • -
      +
      +
    3. -

      You must meet at least one of these service requirements:

      -
        -
      • - You served at least 24 months in a row without a break (called - continuous), or for your full active-duty period,{' '} - or -
      • -
      • - You were discharged for a service-connected disability,{' '} - or -
      • -
      • - You were discharged for a hardship or “early out,”{' '} - or -
      • -
      • You served before September 7, 1980
      • -
      +
    4. +

      Gather your information

      -

      - Note: Time spent on active-duty status for - training purposes only doesn’t count toward the service - requirements. -

      -

      - - Get instructions on how to apply for a discharge upgrade or - correction - -

      - -
    5. +

      Here’s what you’ll need to apply:

      +
        +
      • + Social Security numbers for you, your spouse, and + your qualified dependents. +
      • +
      • + Your military discharge information If you sign in + to apply, we may be able to fill in this information for you. If you + don’t sign in to apply, we’ll ask you to upload a copy of your DD214 + or other separation documents. +
      • +
      • + Insurance cards for all health insurance companies + that cover you. This includes any coverage that you get through a + spouse or significant other. This also includes Medicare, private + insurance, or insurance from your employer. +
      • +
      -
    6. -

      Gather your information

      +

      We’ll also ask you for this optional information:

      +
        +
      • + Last year’s gross household income for you, your + spouse, and your dependents. This includes income from a job and any + other sources. Gross household income is your income before taxes + and any other deductions. +
      • +
      • + Your deductible expenses for last year These + include certain health care and education costs. These expenses will + lower the amount of money we count as your income. +
      • +
      -

      Here’s what you’ll need to apply:

      + +

      When you apply, we review this information:

        +
      • Your service history
      • +
      • Your VA disability rating
      • - Social Security numbers for you, your spouse, and - your qualified dependents. + Your income level (and the income level of your spouse or other + qualified dependents)
      • - Your military discharge information If you sign - in to apply, we may be able to fill in this information for you. - If you don’t sign in to apply, we’ll ask you to upload a copy of - your DD214 or other separation documents. -
      • -
      • - Insurance cards for all health insurance - companies that cover you. This includes any coverage that you get - through a spouse or significant other. This also includes - Medicare, private insurance, or insurance from your employer. + Your eligibility for Medicaid, VA disability compensation, and VA + pension benefits
      - -

      We’ll also ask you for this optional information:

      +

      We use this information to help us decide these 3 things:

      • - Last year’s gross household income for you, your - spouse, and your dependents. This includes income from a job and - any other sources. Gross household income is your income before - taxes and any other deductions. + What types of VA health care benefits you’re eligible for,{' '} + and +
      • +
      • + How soon we can enroll you in VA health care, and
      • - Your deductible expenses for last year These - include certain health care and education costs. These expenses - will lower the amount of money we count as your income. + How much (if anything) you’ll have to pay toward the cost of your + care
      +

      + We give Veterans with service-connected disabilities the highest + priority. +

      +

      + Note: We ask about other health insurance for + billing only. Having other health insurance doesn’t affect your + eligibility for VA health care. +

      +
      +
    7. - -

      When you apply, we review this information:

      -
        -
      • Your service history
      • -
      • Your VA disability rating
      • -
      • - Your income level (and the income level of your spouse or other - qualified dependents) -
      • -
      • - Your eligibility for Medicaid, VA disability compensation, and - VA pension benefits -
      • -
      -

      We use this information to help us decide these 3 things:

      -
        -
      • - What types of VA health care benefits you’re eligible for,{' '} - and -
      • -
      • - How soon we can enroll you in VA health care,{' '} - and -
      • -
      • - How much (if anything) you’ll have to pay toward the cost of - your care -
      • -
      -

      - We give Veterans with service-connected disabilities the highest - priority. -

      -

      - Note: We ask about other health insurance for - billing only. Having other health insurance doesn’t affect your - eligibility for VA health care. -

      -
      - - -
    8. -
      -

      Start your application

      -
      +
    9. +
      +

      Start your application

      +
      +

      + We’ll take you through each step of the process. It should take about + 30 minutes. +

      + +

      + We process health care applications within about a week. We’ll send + you a letter in the mail with our decision. +

      - We’ll take you through each step of the process. It should take - about 30 minutes. + If you don’t receive your decision letter within a week after you + apply, please don’t apply again. Call us at{' '} + ( + + ). We’re here Monday through Friday, 8:00 a.m. to 8:00 p.m.{' '} + + ET + + .

      - -

      - We process health care applications within about a week. We’ll - send you a letter in the mail with our decision. -

      -

      - If you don’t receive your decision letter within a week after you - apply, please don’t apply again. Call us at{' '} - ( - - ). We’re here Monday through Friday, 8:00 a.m. to 8:00 p.m.{' '} - - ET - - . -

      -
      -
    10. -
    -
    + + + ); diff --git a/src/applications/hca/components/VeteranInformation/AuthProfileInformation.jsx b/src/applications/hca/components/VeteranInformation/AuthProfileInformation.jsx new file mode 100644 index 000000000000..dd6501fd24cc --- /dev/null +++ b/src/applications/hca/components/VeteranInformation/AuthProfileInformation.jsx @@ -0,0 +1,70 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import moment from 'moment'; + +import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts'; +import { normalizeFullName } from '../../utils/helpers'; + +const AuthProfileInformation = ({ user }) => { + const { userFullName, dob } = user; + const veteranDOB = dob ? moment(dob).format('MMMM DD, YYYY') : null; + const veteranName = normalizeFullName(userFullName, true); + return ( +
    +

    + {veteranDOB + ? 'This is the personal information we have on file for you.' + : 'Here\u2019s the name we have on file for you.'} +

    +
    +
    +
    +
    Full name:
    +
    + {veteranName} +
    +
    + {veteranDOB ? ( +
    +
    + Date of birth: +
    +
    + {veteranDOB} +
    +
    + ) : null} +
    +
    +

    + Note: If you need to update your personal information, + call our VA benefits hotline at{' '} + ( + + ), Monday through Friday, 8:00 a.m. to 9:00 p.m.{' '} + + ET + + . +

    +

    + You can also call your VA medical center ( + ) to + get help changing your name on file with VA. Ask for the eligibility + department. +

    +
    + ); +}; + +AuthProfileInformation.propTypes = { + user: PropTypes.object, +}; + +export default AuthProfileInformation; diff --git a/src/applications/hca/components/VeteranInformation/GuestVerifiedInformation.jsx b/src/applications/hca/components/VeteranInformation/GuestVerifiedInformation.jsx new file mode 100644 index 000000000000..509f49504ba1 --- /dev/null +++ b/src/applications/hca/components/VeteranInformation/GuestVerifiedInformation.jsx @@ -0,0 +1,65 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import moment from 'moment'; +import { normalizeFullName } from '../../utils/helpers'; + +const GuestVerifiedInformation = ({ user }) => { + const { + veteranFullName, + veteranDateOfBirth, + veteranSocialSecurityNumber, + } = user; + const veteranSSN = `xxx-xx-${veteranSocialSecurityNumber.substring( + veteranSocialSecurityNumber.length - 4, + )}`; + const veteranDOB = moment(veteranDateOfBirth).format('MMMM DD, YYYY'); + const veteranName = normalizeFullName(veteranFullName, true); + return ( +
    +

    + Confirm your information before you continue. +

    +
    +
    +
    +
    Full name:
    +
    + {veteranName} +
    +
    +
    +
    + Social Security number: +
    +
    + {veteranSSN} +
    +
    +
    +
    + Date of birth: +
    +
    + {veteranDOB} +
    +
    +
    +
    +
    + ); +}; + +GuestVerifiedInformation.propTypes = { + user: PropTypes.object, +}; + +export default GuestVerifiedInformation; diff --git a/src/applications/hca/config/form.js b/src/applications/hca/config/form.js index c0bceb0b2b3c..47fdbcc0ec5c 100644 --- a/src/applications/hca/config/form.js +++ b/src/applications/hca/config/form.js @@ -25,7 +25,7 @@ import FormFooter from '../components/FormFooter'; import GetHelp from '../components/GetHelp'; // chapter 1 Veteran Information -import VeteranProfileInformation from '../components/FormPages/VeteranProfileInformation'; +import VeteranInformation from '../components/FormPages/VeteranInformation'; import personalInformationSsn from './chapters/veteranInformation/personalInformationSsn'; import personalInformationDOB from './chapters/veteranInformation/personalInformationDob'; import birthInformation from './chapters/veteranInformation/birthInformation'; @@ -165,8 +165,10 @@ const formConfig = { veteranProfileInformation: { path: 'veteran-information/personal-information', title: 'Veteran\u2019s personal information', - depends: formData => formData['view:isLoggedIn'], - CustomPage: VeteranProfileInformation, + depends: formData => + formData['view:isLoggedIn'] || + formData['view:isRemoveIdFieldsEnabled'], + CustomPage: VeteranInformation, CustomPageReview: null, uiSchema: {}, schema: { type: 'object', properties: {} }, diff --git a/src/applications/hca/containers/IDPage.jsx b/src/applications/hca/containers/IDPage.jsx index 7d1a16d01cbc..41a752ce735c 100644 --- a/src/applications/hca/containers/IDPage.jsx +++ b/src/applications/hca/containers/IDPage.jsx @@ -119,7 +119,7 @@ const IDPage = props => { return (
    - + {showLoadingIndicator ? ( { ) : ( <>

    - This will help us fit the application to your specific needs. Please - fill out the form below. Then we’ll take you to the VA health care - application (10-10EZ). + We need some information before you can start your application. This + will help us fit your application to your specific needs.

    +

    Then you can fill out the VA health care application (10-10EZ).

    +

    Sign in and save time

    - Want to skip this step? + You can sign in and confirm that the information we have for you is + up to date and then fill out the VA health care application.