From eec5ccdb36db53cb8aa31dc660a3137f18cfd504 Mon Sep 17 00:00:00 2001 From: Wayne Weibel Date: Thu, 6 Mar 2025 16:11:47 -0500 Subject: [PATCH] Burial 102416 Remove poc-v6 application --- .github/CODEOWNERS | 6 +- jsconfig-example.json | 1 - src/applications/burial-poc-v6/app-entry.jsx | 13 - .../components/ExpandingGroup.jsx | 65 --- .../burial-poc-v6/config/formikData.js | 96 ---- src/applications/burial-poc-v6/constants.js | 19 - src/applications/burial-poc-v6/manifest.json | 8 - .../burial-poc-v6/pages/BenefitsSelection.jsx | 76 --- .../burial-poc-v6/pages/BurialAllowance.jsx | 119 ----- .../burial-poc-v6/pages/BurialInformation.jsx | 63 --- .../pages/BurialIntroduction.jsx | 103 ---- .../pages/ClaimantContactInformation.jsx | 50 -- .../pages/ClaimantInformation.jsx | 82 --- .../burial-poc-v6/pages/ConfirmationPage.jsx | 101 ---- .../pages/MilitaryServiceHistory.jsx | 65 --- .../burial-poc-v6/pages/PlotAllowance.jsx | 83 --- .../burial-poc-v6/pages/PreviousNames.jsx | 58 -- .../burial-poc-v6/pages/ReviewPage.jsx | 495 ------------------ .../pages/VeteranInformation.jsx | 62 --- src/applications/burial-poc-v6/routes.jsx | 103 ---- .../burial-poc-v6/sass/burial-poc-v6.scss | 11 - .../tests/ExpandingGroup.unit.spec.jsx | 37 -- .../tests/burial-poc-v6.cypress.spec.js | 41 -- .../tests/fixtures/data/test-data.json | 4 - src/applications/burial-poc-v6/utils.js | 33 -- 25 files changed, 2 insertions(+), 1792 deletions(-) delete mode 100644 src/applications/burial-poc-v6/app-entry.jsx delete mode 100644 src/applications/burial-poc-v6/components/ExpandingGroup.jsx delete mode 100644 src/applications/burial-poc-v6/config/formikData.js delete mode 100644 src/applications/burial-poc-v6/constants.js delete mode 100644 src/applications/burial-poc-v6/manifest.json delete mode 100644 src/applications/burial-poc-v6/pages/BenefitsSelection.jsx delete mode 100644 src/applications/burial-poc-v6/pages/BurialAllowance.jsx delete mode 100644 src/applications/burial-poc-v6/pages/BurialInformation.jsx delete mode 100644 src/applications/burial-poc-v6/pages/BurialIntroduction.jsx delete mode 100644 src/applications/burial-poc-v6/pages/ClaimantContactInformation.jsx delete mode 100644 src/applications/burial-poc-v6/pages/ClaimantInformation.jsx delete mode 100644 src/applications/burial-poc-v6/pages/ConfirmationPage.jsx delete mode 100644 src/applications/burial-poc-v6/pages/MilitaryServiceHistory.jsx delete mode 100644 src/applications/burial-poc-v6/pages/PlotAllowance.jsx delete mode 100644 src/applications/burial-poc-v6/pages/PreviousNames.jsx delete mode 100644 src/applications/burial-poc-v6/pages/ReviewPage.jsx delete mode 100644 src/applications/burial-poc-v6/pages/VeteranInformation.jsx delete mode 100644 src/applications/burial-poc-v6/routes.jsx delete mode 100644 src/applications/burial-poc-v6/sass/burial-poc-v6.scss delete mode 100644 src/applications/burial-poc-v6/tests/ExpandingGroup.unit.spec.jsx delete mode 100644 src/applications/burial-poc-v6/tests/burial-poc-v6.cypress.spec.js delete mode 100644 src/applications/burial-poc-v6/tests/fixtures/data/test-data.json delete mode 100644 src/applications/burial-poc-v6/utils.js diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e6643557a351..662039d1aab1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -93,15 +93,13 @@ src/applications/appeals @department-of-veterans-affairs/benefits-decision-revie # Benefits Non-Disability src/applications/vre @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend src/applications/lgy @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend -src/applications/burials-ez @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend -src/applications/burials-v2 @department-of-veterans-affairs/va-platform-cop-frontend -src/applications/burial-poc-v6 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend src/applications/static-pages/vre-chapter-31 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend src/applications/static-pages/vre-chapter-36 @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend src/applications/static-pages/coe-access @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend src/applications/sah @department-of-veterans-affairs/benefits-non-disability @department-of-veterans-affairs/va-platform-cop-frontend -# Pensions +# Pensions and Burials +src/applications/burials-ez @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/va-platform-cop-frontend src/applications/pensions @department-of-veterans-affairs/pension-and-burials @department-of-veterans-affairs/va-platform-cop-frontend diff --git a/jsconfig-example.json b/jsconfig-example.json index e1c117699ec3..ced126f22be7 100644 --- a/jsconfig-example.json +++ b/jsconfig-example.json @@ -49,7 +49,6 @@ "src/applications/ask-va", "src/applications/auth", "src/applications/avs", - "src/applications/burial-poc-v6", "src/applications/burials-ez", "src/applications/caregivers", "src/applications/check-in", diff --git a/src/applications/burial-poc-v6/app-entry.jsx b/src/applications/burial-poc-v6/app-entry.jsx deleted file mode 100644 index d655929fa8bd..000000000000 --- a/src/applications/burial-poc-v6/app-entry.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import 'platform/polyfills'; -import './sass/burial-poc-v6.scss'; - -import startApp from 'platform/startup/router'; - -import routes from './routes'; -import manifest from './manifest.json'; - -startApp({ - entryName: manifest.entryName, - url: manifest.rootUrl, - routes, -}); diff --git a/src/applications/burial-poc-v6/components/ExpandingGroup.jsx b/src/applications/burial-poc-v6/components/ExpandingGroup.jsx deleted file mode 100644 index 66416df89fee..000000000000 --- a/src/applications/burial-poc-v6/components/ExpandingGroup.jsx +++ /dev/null @@ -1,65 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import { TransitionGroup } from 'react-transition-group'; -import classnames from 'classnames'; - -/* - * Component that expands to show a hidden child element with a fade in/slide down animation - * - * Props: - * children - expects 2 children, the first is always shown, the second is shown if open is true - * open - determines if the second child is displayed - * additionalClass - A string added as a class to the parent element of the second child - * showPlus - Boolean to display a "+" or "-" icon based on open status - */ -export default function ExpandingGroup({ - children, - open, - showPlus, - additionalClass, - expandedContentId, -}) { - const classNames = classnames( - 'form-expanding-group', - { 'form-expanding-group-open': open }, - { 'form-expanding-group-plus': showPlus }, - ); - - return ( -
- {children[0]} - - id= - {expandedContentId} - transitionName="form-expanding-group-inner" transitionEnterTimeout= - {700} - transitionLeave= - {false}> - {open ? ( -
- {children[1]} -
- ) : null} -
-
- ); -} - -ExpandingGroup.propTypes = { - /** - * Show second child if true - */ - open: PropTypes.bool.isRequired, - /** - * Class added to parent element of second child component - */ - additionalClass: PropTypes.string, - /** - * `id` attribute for ReactCSSTransitionGroup - */ - expandedContentId: PropTypes.string, - /** - * Show a `+` or `-` icon indicating second child's visibility - */ - showPlus: PropTypes.bool, -}; diff --git a/src/applications/burial-poc-v6/config/formikData.js b/src/applications/burial-poc-v6/config/formikData.js deleted file mode 100644 index 5fe09848bd98..000000000000 --- a/src/applications/burial-poc-v6/config/formikData.js +++ /dev/null @@ -1,96 +0,0 @@ -export const initialValues = { - relationship: { - type: '', - other: '', - isEntity: null, - }, - locationOfDeath: { - location: '', - other: '', - }, - toursOfDuty: [ - { - dateRange: { - from: '', - to: '', - }, - serviceBranch: '', - rank: '', - serviceNumber: '', - placeOfEntry: '', - placeOfSeparation: '', - }, - ], - veteranServedUnderAnotherName: null, - previousNames: [ - { - first: '', - middle: '', - last: '', - suffix: '', - }, - ], - claimantEmail: '', - benefitsSelection: { - burialAllowance: null, - plotAllowance: null, - transportation: null, - }, - burialAllowance: null, - plotAllowance: null, - transportation: null, - amountIncurred: 0, - burialAllowanceRequested: '', - burialCost: 0, - placeOfRemains: '', - federalCemetery: null, - stateCemetery: null, - govtContributions: null, - amountGovtContribution: 0, - placeOfBirth: '', - officialPosition: '', - firmName: '', - privacyAgreementAccepted: null, - claimantAddress: { - isMilitaryBaseOutside: null, - streetAddress: '', - streetAddressLine2: '', - streetAddressLine3: '', - city: '', - state: '', - country: '', - postalCode: '', - }, - claimantPhone: '', - claimantFullName: { - first: '', - middle: '', - last: '', - suffix: '', - }, - veteranFullName: { - first: '', - middle: '', - last: '', - suffix: '', - }, - veteranSocialSecurityNumber: '', - vaFileNumber: '', - burialDate: '', - deathDate: '', - veteranDateOfBirth: '', - deathCertificate: [ - { - name: '', - size: '', - confirmationCode: '', - }, - ], - transportationReceipts: [ - { - name: '', - size: '', - confirmationCode: '', - }, - ], -}; diff --git a/src/applications/burial-poc-v6/constants.js b/src/applications/burial-poc-v6/constants.js deleted file mode 100644 index f974aa259052..000000000000 --- a/src/applications/burial-poc-v6/constants.js +++ /dev/null @@ -1,19 +0,0 @@ -export const RadioLabels = { - spouse: 'Spouse', - child: 'Child', - parent: 'Parent', - executorAdministratorEstate: 'Executor/Administrator of estate', - other: 'Other', - vaMedicalCenter: 'VA medical center', - stateVeteransHome: 'State Veterans home', - nursingHome: 'Nursing home under VA contract', - service: 'Service-connected death', - nonService: 'Non-service-connected death', - vaMC: 'VA medical center death', -}; - -export const ExpandingGroupClass = - 'vads-u-border-color--primary-alt-light vads-u-border-left--4px vads-u-padding-left--2 vads-u-padding-y--0p5 vads-u-margin-left--neg2p5'; - -export const VALIDATION_MESSAGE = - 'Date of burial must be on or after date of death'; diff --git a/src/applications/burial-poc-v6/manifest.json b/src/applications/burial-poc-v6/manifest.json deleted file mode 100644 index 9ed28eaa43c3..000000000000 --- a/src/applications/burial-poc-v6/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "appName": "burial-poc-v6", - "entryFile": "./app-entry.jsx", - "entryName": "burial-poc-v6", - "rootUrl": "/burial-poc-v6", - "productId": "3f7db617-af4b-4d7f-b30f-f288d5756668", - "production": false -} diff --git a/src/applications/burial-poc-v6/pages/BenefitsSelection.jsx b/src/applications/burial-poc-v6/pages/BenefitsSelection.jsx deleted file mode 100644 index a4445b0d606f..000000000000 --- a/src/applications/burial-poc-v6/pages/BenefitsSelection.jsx +++ /dev/null @@ -1,76 +0,0 @@ -import React from 'react'; -import { - Page, - CheckboxFieldGroup, - NumberField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; - -const checkboxProps = { - label: 'What expenses did you incur for the Veteran’s burial?', - name: 'benefitsSelection', - required: true, - options: [ - { - name: 'benefitsSelection.burialAllowance', - label: 'Burial allowance', - }, - { - name: 'benefitsSelection.plotAllowance', - label: - 'Plot or interment allowance (Check this box if you incurred expenses for the plot to bury the Veteran’s remains.)', - }, - { - name: 'benefitsSelection.transportation', - label: - 'Transportation expenses (Transportation of the Veteran’s remains from the place of death to the final resting place)', - }, - ], -}; - -export default function BenefitsSelection(props) { - const state = useFormikContext(); - - return ( - <> - - - {!!state.values.benefitsSelection?.transportation && ( -
-
-
- -
- - Note: - At the end of the application, you will be asked to upload - documentation for the expenses you incurred for transporting - the Veteran’s remains. - -
-
-
-
- )} -
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/BurialAllowance.jsx b/src/applications/burial-poc-v6/pages/BurialAllowance.jsx deleted file mode 100644 index 44caf2a3a277..000000000000 --- a/src/applications/burial-poc-v6/pages/BurialAllowance.jsx +++ /dev/null @@ -1,119 +0,0 @@ -import React from 'react'; -import { - Page, - RadioGroup, - TextField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; - -export default function BurialAllowance(props) { - const { values } = useFormikContext(); - - const getBurialAllowanceRequestedOptions = () => { - const allowanceTypes = [ - { - label: - 'Service-connected death (for a Veteran death related to, or resulting from, a service-connected disability)', - value: 'service', - key: 1, - }, - { - label: 'Non-service-connected death', - value: 'nonService', - key: 2, - }, - ]; - - const locationOfDeath = values?.locationOfDeath?.location; - if ( - locationOfDeath === 'vaMedicalCenter' || - locationOfDeath === 'nursingHome' - ) { - allowanceTypes.push({ - label: 'VA medical center death', - value: 'vaMC', - key: 3, - }); - } - return allowanceTypes; - }; - - return ( - <> - -
- - {values?.burialAllowanceRequested === 'nonService' && ( - - - If filing for a non-service-connected allowance, the Veteran’s - burial date must be no more than 2 years from the current date. - Find out if you still qualify. - - Learn about eligibility - - - - )} - {values?.burialAllowanceRequested === 'vaMC' && ( -
- -
- )} -
- - {values?.relationship?.type === 'spouse' && ( -
- -
- )} - - {values?.relationship?.type === 'Other' && ( -
- -
- )} -
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/BurialInformation.jsx b/src/applications/burial-poc-v6/pages/BurialInformation.jsx deleted file mode 100644 index b05a8ec9ad2c..000000000000 --- a/src/applications/burial-poc-v6/pages/BurialInformation.jsx +++ /dev/null @@ -1,63 +0,0 @@ -import React, { useEffect } from 'react'; -import { - Page, - DateField, - TextField, - RadioGroup, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; -import { isBeforeDate } from '../utils'; -import { VALIDATION_MESSAGE } from '../constants'; - -const LOCATIONS = [ - { label: 'VA medical center', value: 'vaMedicalCenter', key: 1 }, - { label: 'State Veterans home', value: 'stateVeteransHome', key: 2 }, - { label: 'Nursing home under VA contract', value: 'nursingHome', key: 3 }, - { label: 'Other', value: 'other', key: 4 }, -]; - -export default function BurialInformation(props) { - const { values, setFieldValue } = useFormikContext(); - - useEffect( - () => { - if (values.locationOfDeath.location !== 'other') { - setFieldValue('locationOfDeath.other', undefined); - } - }, - [values.locationOfDeath.location], - ); - - return ( - - - - - {values.locationOfDeath.location === 'other' && ( - - )} - - ); -} diff --git a/src/applications/burial-poc-v6/pages/BurialIntroduction.jsx b/src/applications/burial-poc-v6/pages/BurialIntroduction.jsx deleted file mode 100644 index a2112b13182d..000000000000 --- a/src/applications/burial-poc-v6/pages/BurialIntroduction.jsx +++ /dev/null @@ -1,103 +0,0 @@ -import React from 'react'; -import { - Page, - FormTitle, -} from '@department-of-veterans-affairs/va-forms-system-core'; - -export default function BurialIntroduction(props) { - return ( - <> - -
- -

Equal to VA Form 21P-530 (Application for Burial Benefits).

-

- Follow the steps below to apply for burial benefits. -

- - - -
-
-

- To fill out this application, you’ll need information about - the deceased Veteran, including their: -

-
-
    -
  • Social Security number or VA file number (required)
  • -
  • Date and place of birth (required)
  • -
  • Date and place of death (required)
  • -
  • Military status and history
  • -
-
-

You may need to upload:

-
-
    -
  • - A copy of the deceased Veteran’s DD214 or other separation - documents -
  • -
  • A copy of the Veteran’s death certificate
  • -
  • - Documentation for transportation costs (if you’re claiming - costs for the transportation of the Veteran’s remains) -
  • -
-

- What if I need help filling out my application?{' '} - An accredited representative, like a Veterans Service Officer - (VSO), can help you fill out your claim.{' '} - - Get help filing your claim - - . -

-

Learn about other survivor and dependent benefits

-

- If you’re the survivor or dependent of a Veteran who died in the - line of duty or from a service-related illness, you may be able - to get a benefit called{' '} - - Dependency and Indemnity Compensation - - . -

-
- -
-

Complete this burial benefits form.

-

- After submitting the form, you’ll get a confirmation message. - You can print this for your records. -

-
-
- -

We process claims in the order we receive them.

-

We’ll let you know by mail if we need more information.

-
- -

- After we process your claim, you’ll get a notice in the mail - about the decision. -

-
-
- -
-
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/ClaimantContactInformation.jsx b/src/applications/burial-poc-v6/pages/ClaimantContactInformation.jsx deleted file mode 100644 index a7068b7eb936..000000000000 --- a/src/applications/burial-poc-v6/pages/ClaimantContactInformation.jsx +++ /dev/null @@ -1,50 +0,0 @@ -import React from 'react'; -import { - AddressField, - EmailField, - Page, - PhoneField, - TextField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; - -export default function ClaimantContactInformation(props) { - const formikContext = useFormikContext(); - - return ( - <> - - {formikContext?.values?.relationship?.isEntity && ( - <> - - - - )} - - - - - - ); -} diff --git a/src/applications/burial-poc-v6/pages/ClaimantInformation.jsx b/src/applications/burial-poc-v6/pages/ClaimantInformation.jsx deleted file mode 100644 index a4eb79841bed..000000000000 --- a/src/applications/burial-poc-v6/pages/ClaimantInformation.jsx +++ /dev/null @@ -1,82 +0,0 @@ -import React, { useEffect } from 'react'; -import { - TextField, - FullNameField, - Page, - RadioGroup, - CheckboxField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; -import ExpandingGroup from '../components/ExpandingGroup'; - -export default function ClaimantInformation(props) { - const { values, setFieldValue } = useFormikContext(); - const getOptions = [ - { label: 'Spouse', value: 'spouse', key: 1 }, - { label: 'Child', value: 'child', key: 2 }, - { label: 'Parent', value: 'parent', key: 3 }, - { - label: 'Executor/Administrator of estate', - value: 'executorAdministratorEstate', - key: 4, - }, - { label: 'Other', value: 'other', key: 5 }, - ]; - - useEffect( - () => { - if (values.relationship.type !== 'other') { - setFieldValue('relationship.other', ''); - setFieldValue('claimingAsFirm', undefined); - // Burial Allowance field depends on relationship value is equals to 'Other' - // Remove benefitsUnclaimedRemains field when relationship is not 'Other - setFieldValue('benefitsUnclaimedRemains', undefined); - } - - if (values.relationship.type !== 'spouse') { - // Burial Allowance field depends on relationship value is equals to 'Spouse' - // Remove previouslyReceivedAllowance field when relationship is not 'Spouse - setFieldValue('previouslyReceivedAllowance', undefined); - } - }, - [values.relationship.type], - ); - - return ( - <> - -

- You aren’t required to fill in all fields, but we can review your - application faster if you provide more information. -

- -
- - {values.relationship.type === 'other' && ( - - - - - )} -
-
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/ConfirmationPage.jsx b/src/applications/burial-poc-v6/pages/ConfirmationPage.jsx deleted file mode 100644 index c74ebc3e4216..000000000000 --- a/src/applications/burial-poc-v6/pages/ConfirmationPage.jsx +++ /dev/null @@ -1,101 +0,0 @@ -import React from 'react'; -import { Page } from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; - -const SAMPLE_GUID = '20d0c3c3-7456-47cf-9a81-f0ada8dfb089'; -const DATE_OPTIONS = { - year: 'numeric', - month: 'long', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - timeZoneName: 'short', -}; -const benefitsLabels = { - burialAllowance: 'Burial allowance', - plotAllowance: 'Plot allowance', - transportation: 'Transportation', -}; - -export default function ConfirmationPage(props) { - const { values } = useFormikContext(); - - const benefits = { - burialAllowance: values?.benefitsSelection?.burialAllowance, - plotAllowance: values?.benefitsSelection?.plotAllowance, - transportation: values?.benefitsSelection?.transportation, - }; - - return ( - <> - -
-
- VA logo -
-

- We process claims in the order we receive them. Please print this - page for your records. -

-

We may contact you for more information or documents.

-
-

- Burial Benefit Claim{' '} - (Form 21P-530) -

- - for {values?.claimantFullName?.first}{' '} - {values?.claimantFullName?.middle}{' '} - {values?.claimantFullName?.last}{' '} - {values?.claimantFullName?.suffix} - -
    -
  • -

    Confirmation number

    - {SAMPLE_GUID} -
  • -
  • -

    Date submitted

    - - {new Date().toLocaleDateString('en-US', DATE_OPTIONS)} - -
  • -
  • -

    Deceased Veteran

    - - {values?.veteranFullName?.first}{' '} - {values?.veteranFullName?.middle}{' '} - {values?.veteranFullName?.last}{' '} - {values?.veteranFullName?.suffix} - -
  • -
  • -

    Benefits claimed

    -
      - {Object.entries(benefits) - .filter(([, propertyValue]) => propertyValue) - .map(([propertyName]) => ( -
    • {benefitsLabels[propertyName]}
    • - ))} -
    -
  • -
  • -

    Your claim was sent to

    -
    -

    Attention: Milwaukee Pension Center

    -

    P.O. Box 5192

    -

    Janesville, WI 53547-5192

    -
    -
  • -
- -
-
-
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/MilitaryServiceHistory.jsx b/src/applications/burial-poc-v6/pages/MilitaryServiceHistory.jsx deleted file mode 100644 index 2b5fe287df92..000000000000 --- a/src/applications/burial-poc-v6/pages/MilitaryServiceHistory.jsx +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react'; -import { - DateField, - Page, - TextField, - SelectField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; -import { militaryBranches } from 'platform/forms/address/data/labels'; -import { isBeforeDate } from '../utils'; - -export default function MilitaryServiceHistory(props) { - const state = useFormikContext(); - - const { from, to } = state.values.toursOfDuty[0].dateRange; - - const militaryBranchOptions = militaryBranches.map((branch, index) => { - return ; - }); - - return ( - <> - - - Note: If you would rather upload a DD214 than enter - dates here, you can do that later in the form. - -

Service Periods

- - - - {militaryBranchOptions} - - - - - - -
-
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/PlotAllowance.jsx b/src/applications/burial-poc-v6/pages/PlotAllowance.jsx deleted file mode 100644 index 00f3505e105e..000000000000 --- a/src/applications/burial-poc-v6/pages/PlotAllowance.jsx +++ /dev/null @@ -1,83 +0,0 @@ -import React from 'react'; -import { - TextField, - Page, - RadioGroup, - NumberField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; -import ExpandingGroup from '../components/ExpandingGroup'; - -export default function PlotAllowance(props) { - const formikContext = useFormikContext(); - - return ( -
- - -
- - {formikContext?.values?.federalCemetery === 'false' && ( - -
- -
-
- )} -
-
- - {formikContext?.values?.govtContributions === 'true' && ( - -
- -
-
- )} -
-
-
- ); -} diff --git a/src/applications/burial-poc-v6/pages/PreviousNames.jsx b/src/applications/burial-poc-v6/pages/PreviousNames.jsx deleted file mode 100644 index c75f89999869..000000000000 --- a/src/applications/burial-poc-v6/pages/PreviousNames.jsx +++ /dev/null @@ -1,58 +0,0 @@ -import React, { useEffect } from 'react'; -import { - FullNameField, - Page, - RadioGroup, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; -import ExpandingGroup from '../components/ExpandingGroup'; - -export default function PreviousNames(props) { - const { values, setFieldValue } = useFormikContext(); - - useEffect( - () => { - if ( - values?.previousNames && - values?.veteranServedUnderAnotherName === 'false' - ) { - setFieldValue(`previousNames`, [ - { - first: '', - middle: '', - last: '', - suffix: '', - }, - ]); - } - }, - [values?.veteranServedUnderAnotherName], - ); - - return ( - <> - -
- - {values?.veteranServedUnderAnotherName === 'true' ? ( - - - - - ) : null} -
-
- - ); -} diff --git a/src/applications/burial-poc-v6/pages/ReviewPage.jsx b/src/applications/burial-poc-v6/pages/ReviewPage.jsx deleted file mode 100644 index ab89a68ead31..000000000000 --- a/src/applications/burial-poc-v6/pages/ReviewPage.jsx +++ /dev/null @@ -1,495 +0,0 @@ -import React, { useLayoutEffect } from 'react'; -import { useFormikContext } from 'formik'; -import { Link, useLocation } from 'react-router-dom'; -import { VaOnThisPage } from '@department-of-veterans-affairs/component-library/dist/react-bindings'; -import { - Page, - parseDate, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { getRadioLabel } from '../utils'; - -/** - * Transforms fields value into value that is more readable - * @param {boolean | object | string} field object value - * @param {string} key object key name - * - * @beta - */ -const transformFieldValue = (key, field) => { - if (field.value === 'true' || field.value === true) { - return 'Yes'; - } - if (field.value === 'false' || field.value === false) { - return 'No'; - } - if ( - ['from', 'to', 'veteranDateOfBirth', 'deathDate', 'burialDate'].indexOf( - key, - ) > -1 - ) { - const date = parseDate(field.value); - return date.toLocaleDateString('en-US', { - day: 'numeric', - month: 'long', - year: 'numeric', - }); - } - if (['amountIncurred', 'amountGovtContribution'].indexOf(key) > -1) { - return `$${field.value}`; - } - if (['claimantPhone'].indexOf(key) > -1) { - return `${field.value.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3')}`; - } - return field.value; -}; - -/** - * Loops through field objects and adds JSX to a buffer - * to be rendered later - * @param {objects} fields object value - * @param {number} rank level number of recursion - * - * @beta - */ -const bufferFields = (fields, rank = 0) => { - const buffer = []; - for (const [key, field] of Object.entries(fields)) { - // eslint-disable-next-line no-use-before-define - buffer.push(recurseField(key, field, rank)); - } - return buffer; -}; - -/** - * Recurses through field and either returns value or - * uses bufferField to loop through object value - * @param {string} key object key name - * @param {boolean | object | string} field object value - * @param {number} rank level number of recursion - * - * @beta - */ -const recurseField = (key, field, rank = 0) => { - if ( - field.value === '' || - field.value === 0 || - field.value === null || - field.value === undefined - ) - return <>; - const fieldLabel = field.label && ( - - ); - - if (typeof field.value === 'object') { - return ( -
- {' '} - {bufferFields(field.value, rank + 1)} -
- ); - } - - return ( -
- {fieldLabel} - 0 && - ` field-value-level-${rank}`}`} - > - {' '} - {transformFieldValue(key, field)} - -
- ); -}; - -/** - * Anchor scroller - * @param {string} location hash location - * - * @beta - */ -const scrollToSection = location => { - // Get the '#' id from the location - const id = location && location.hash ? location.hash : null; - if (id) { - const element = document.querySelector(id); - // If element present, scroll me to that part - if (element) { - element.scrollIntoView(); - } else { - // If element not present, scroll me to the top - window.scrollTo(0, 0); - } - } -}; - -export default function ReviewPage(props) { - const state = useFormikContext(); - const location = useLocation(); - - useLayoutEffect(() => scrollToSection(location), [location]); - - // mockup some data to review formik context - const pageData = { - pages: [ - { - title: 'Claimant information', - id: 'claimant-information', - pageUrl: '/claimant-information', - isShown: true, - fields: { - fullName: { - value: { - first: { - label: 'First name', - value: state.values?.claimantFullName?.first, - }, - middle: { - label: 'Middle name', - value: state.values?.claimantFullName?.middle, - }, - last: { - label: 'Last name', - value: state.values?.claimantFullName?.last, - }, - suffix: { - label: 'Suffix', - value: state.values?.claimantFullName?.suffix, - }, - }, - }, - relationship: { - label: 'Relationship to the Veteran', - value: getRadioLabel(state.values?.relationship?.type), - }, - 'relationship.other': { - label: 'If other, please specify', - value: state.values?.relationship.other, - }, - claimingAsFirm: { - label: 'Claiming as a firm, corporation or state agency', - value: state.values?.claimingAsFirm, - }, - }, - }, - { - title: 'Deceased Veteran Information', - id: 'veteran-information', - pageUrl: '/veteran-information', - isShown: true, - fields: { - veteranFullName: { - label: 'Veteran Name', - value: { - first: { - label: 'First name', - value: state.values?.veteranFullName?.first, - }, - middle: { - label: 'Middle name', - value: state.values?.veteranFullName?.middle, - }, - last: { - label: 'Last name', - value: state.values?.veteranFullName?.last, - }, - suffix: { - label: 'Suffix', - value: state.values?.veteranFullName?.suffix, - }, - }, - }, - veteranSocialSecurityNumber: { - label: 'Social Security number', - value: state.values?.veteranSocialSecurityNumber, - }, - vaFileNumber: { - label: 'File Number', - value: state.values?.vaFileNumber, - }, - veteranDateOfBirth: { - label: 'Date of birth', - value: state.values?.veteranDateOfBirth, - }, - placeOfBirth: { - label: 'Place of birth', - value: state.values?.placeOfBirth, - }, - }, - }, - { - title: 'Deceased Veteran Information: Death and Burial', - id: 'veteran-information-burial', - pageUrl: '/veteran-information/burial', - isShown: true, - fields: { - deathDate: { - label: 'Date of death', - value: state.values?.deathDate, - }, - burialDate: { - label: 'Date of burial(includes cremation or interment)', - value: state.values?.burialDate, - }, - 'locationOfDeath.location': { - label: "Where did the Veteran's death occur?", - value: getRadioLabel(state.values?.locationOfDeath?.location), - }, - 'locationOfDeath.other': { - label: 'If other, please specify', - value: state.values?.locationOfDeath.other, - }, - }, - }, - { - title: 'Military Service History', - id: 'military-history-service-periods', - pageUrl: '/military-history/service-periods', - isShown: true, - fields: { - toursOfDuty: { - value: { - dateRange: { - value: { - from: { - label: 'Service start date', - value: state.values?.toursOfDuty[0]?.dateRange.from, - }, - to: { - label: 'Service end date', - value: state.values?.toursOfDuty[0]?.dateRange.to, - }, - }, - }, - serviceBranch: { - label: 'Branch of service', - value: state.values?.toursOfDuty[0]?.serviceBranch, - }, - rank: { - label: 'Rank', - value: state.values?.toursOfDuty[0]?.rank, - }, - serviceNumber: { - label: 'Service number', - value: state.values?.toursOfDuty[0]?.serviceNumber, - }, - placeOfEntry: { - label: 'Place of entry', - value: state.values?.toursOfDuty[0]?.placeOfEntry, - }, - placeOfSeparation: { - label: 'Place of separation', - value: state.values?.toursOfDuty[0]?.placeOfSeparation, - }, - }, - }, - }, - }, - { - title: 'Military Service History: Previous Names', - id: 'military-history-previous-names', - pageUrl: '/military-history/previous-names', - isShown: true, - fields: { - veteranServedUnderAnotherName: { - label: 'Did the Veteran serve under another name?', - value: state.values?.veteranServedUnderAnotherName, - }, - previousNames: { - label: 'Did the Veteran serve under another name?', - value: { - first: { - label: 'First name', - value: state.values?.previousNames[0]?.first, - }, - middle: { - label: 'Middle name', - value: state.values?.previousNames[0]?.middle, - }, - last: { - label: 'Last name', - value: state.values?.previousNames[0]?.last, - }, - suffix: { - label: 'Suffix', - value: state.values?.previousNames[0]?.suffix, - }, - }, - }, - }, - }, - { - title: 'Benefits Selection', - id: 'benefits-selection', - pageUrl: '/benefits/selection', - isShown: true, - fields: { - burialAllowance: { - label: 'Burial allowance', - value: state?.values?.benefitsSelection?.burialAllowance, - }, - plotAllowance: { - label: 'Plot or interment allowance', - value: state?.values?.benefitsSelection?.plotAllowance, - }, - transportation: { - label: 'Transportation expenses', - value: state?.values?.benefitsSelection?.transportation, - }, - amountIncurred: { - label: 'Transportation amount incurred', - value: state?.values?.amountIncurred, - }, - }, - }, - { - title: 'Benefits Selection: Type of Burial Allowance', - id: 'benefits-burial-allowance', - pageUrl: '/benefits/burial-allowance', - isShown: state?.values?.benefitsSelection?.burialAllowance === true, - fields: { - burialAllowanceRequested: { - label: 'Type of burial allowance requested', - value: getRadioLabel(state?.values?.burialAllowanceRequested), - // // Label of option is set in BurialAllowance component instead of value - // value: state?.values?.burialAllowanceRequestedLabel - }, - previouslyReceivedAllowance: { - label: 'Did you previously receive a VA burial allowance?', - value: state.values?.previouslyReceivedAllowance, - }, - benefitsUnclaimedRemains: { - label: - 'Are you seeking burial benefits for the unclaimed remains of a Veteran?', - value: state.values?.benefitsUnclaimedRemains, - }, - }, - }, - { - title: 'Benefits Selection: Plot or Interment Allowance', - id: 'benefits-plot-allowance', - pageUrl: '/benefits/plot-allowance', - isShown: state?.values?.benefitsSelection?.plotAllowance === true, - fields: { - placeOfRemains: { - label: 'Place of burial or deceased Veteran’s remains', - value: state?.values?.placeOfRemains, - }, - federalCemetery: { - label: - 'Was the Veteran buried in a national cemetery, or one owned by the federal government?', - value: state?.values?.federalCemetery, - }, - stateCemetery: { - label: 'Was the Veteran buried in a state Veteran’s cemetery?', - value: state?.values?.stateCemetery, - }, - govtContributions: { - label: - 'Did a federal/state government or the Veteran’s employer contribute to the burial? (Not including employer life insurance)', - value: state?.values?.govtContributions, - }, - amountGovtContribution: { - label: 'Amount of government or employer contribution', - value: state?.values?.amountGovtContribution, - }, - }, - }, - { - title: 'Claimant Contact Information', - id: 'claimant-contact-information', - pageUrl: '/claimant-contact-information', - isShown: true, - fields: { - claimantAddress: { - label: 'Claimant Address', - value: { - country: { - label: 'Country', - value: state?.values?.claimantAddress?.country, - }, - street: { - label: 'Street', - value: state?.values?.claimantAddress?.street, - }, - street2: { - label: 'Street 2', - value: state?.values?.claimantAddress?.street2, - }, - city: { - label: 'City', - value: state?.values?.claimantAddress?.city, - }, - state: { - label: 'State', - value: state?.values?.claimantAddress?.state, - }, - postalCode: { - label: 'Postal code', - value: state?.values?.claimantAddress?.postalCode, - }, - }, - }, - claimantEmail: { - label: 'Claimant Email', - value: state?.values?.claimantEmail, - }, - claimantPhone: { - label: 'Claimant Phone Number', - value: state?.values?.claimantPhone, - }, - }, - }, - ], - }; - - return ( - -
-

{props.title}

- - - {pageData.pages.map(page => { - if (page.isShown) { - return ( -
-
-

- {page.title} -

- - Edit - -
- - {bufferFields(page.fields)} -
- ); - } - return <>; - })} -
-
- ); -} diff --git a/src/applications/burial-poc-v6/pages/VeteranInformation.jsx b/src/applications/burial-poc-v6/pages/VeteranInformation.jsx deleted file mode 100644 index cd68b7b0af50..000000000000 --- a/src/applications/burial-poc-v6/pages/VeteranInformation.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import { - DateField, - FullNameField, - Page, - SSNField, - TextField, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import { useFormikContext } from 'formik'; - -export default function VeteranInformation(props) { - const state = useFormikContext(); - - return ( - <> - - - - {state.values.vaFileNumber ? ( - - ) : ( - - )} - {state.values.veteranSocialSecurityNumber ? ( - - ) : ( - - )} - - - - - ); -} diff --git a/src/applications/burial-poc-v6/routes.jsx b/src/applications/burial-poc-v6/routes.jsx deleted file mode 100644 index defa5d08af58..000000000000 --- a/src/applications/burial-poc-v6/routes.jsx +++ /dev/null @@ -1,103 +0,0 @@ -import React from 'react'; -import { Route } from 'react-router-dom-v5-compat'; -import { - ConditionalRoute, - FormRouter, - transformJSONSchema, - ReviewPage, -} from '@department-of-veterans-affairs/va-forms-system-core'; -import fullSchema from 'vets-json-schema/dist/21P-530EZ-schema.json'; -import BenefitsSelection from './pages/BenefitsSelection'; -import BurialIntroduction from './pages/BurialIntroduction'; -import ClaimantInformation from './pages/ClaimantInformation'; -import VeteranInformation from './pages/VeteranInformation'; -import BurialInformation from './pages/BurialInformation'; -import MilitaryServiceHistory from './pages/MilitaryServiceHistory'; -import PreviousNames from './pages/PreviousNames'; -import BurialAllowance from './pages/BurialAllowance'; -import PlotAllowance from './pages/PlotAllowance'; -import ClaimantContactInformation from './pages/ClaimantContactInformation'; -import ConfirmationPage from './pages/ConfirmationPage'; - -const initialValues = transformJSONSchema(fullSchema); - -const NoMatch = props => ( -
-

There is nothing here! {props.name}

-
-); - -const routes = ( - - } /> - } - /> - } - /> - } - /> - } - /> - } - /> - } - /> - - - - } - /> - - - - } - /> - - } - /> - } - /> - } - /> - } /> - -); - -export default routes; diff --git a/src/applications/burial-poc-v6/sass/burial-poc-v6.scss b/src/applications/burial-poc-v6/sass/burial-poc-v6.scss deleted file mode 100644 index b6e500bd2fc4..000000000000 --- a/src/applications/burial-poc-v6/sass/burial-poc-v6.scss +++ /dev/null @@ -1,11 +0,0 @@ -@import "~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables"; -@import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-process-list"; -@import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-form-process"; -@import "../../../platform/forms/sass/m-schemaform"; -@import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-modal"; -@import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-omb-info"; -@import "../../../platform/forms/sass/m-form-confirmation"; - -form [type=submit] { - width: auto; -} diff --git a/src/applications/burial-poc-v6/tests/ExpandingGroup.unit.spec.jsx b/src/applications/burial-poc-v6/tests/ExpandingGroup.unit.spec.jsx deleted file mode 100644 index 4e83eacf2a6e..000000000000 --- a/src/applications/burial-poc-v6/tests/ExpandingGroup.unit.spec.jsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react'; -import { expect } from 'chai'; -import { shallow } from 'enzyme'; - -import ExpandingGroup from '../components/ExpandingGroup'; - -describe('', () => { - it('renders only first child when open is false', () => { - const wrapper = shallow( - -
-
- , - ); - - const first = wrapper.find('.first'); - const second = wrapper.find('.second'); - expect(first).to.have.lengthOf(1); - expect(second).to.have.lengthOf(0); - wrapper.unmount(); - }); - - it('renders both children when open is true', () => { - const wrapper = shallow( - -
-
- , - ); - - const first = wrapper.find('.first'); - const second = wrapper.find('.second'); - expect(first).to.have.lengthOf(1); - expect(second).to.have.lengthOf(1); - wrapper.unmount(); - }); -}); diff --git a/src/applications/burial-poc-v6/tests/burial-poc-v6.cypress.spec.js b/src/applications/burial-poc-v6/tests/burial-poc-v6.cypress.spec.js deleted file mode 100644 index 7425d7e98b51..000000000000 --- a/src/applications/burial-poc-v6/tests/burial-poc-v6.cypress.spec.js +++ /dev/null @@ -1,41 +0,0 @@ -import path from 'path'; - -import testForm from 'platform/testing/e2e/cypress/support/form-tester'; -import { createTestConfig } from 'platform/testing/e2e/cypress/support/form-tester/utilities'; - -import manifest from '../manifest.json'; - -const testConfig = createTestConfig( - { - dataPrefix: 'data', - - dataDir: path.join(__dirname, 'data'), - - // Rename and modify the test data as needed. - dataSets: ['test-data'], - - pageHooks: { - introduction: ({ afterHook }) => { - afterHook(() => { - cy.get('va-button[text*="start"]') - .last() - .click(); - }); - }, - }, - - setupPerTest: () => { - // Log in if the form requires an authenticated session. - // cy.login(); - // cy.route('POST', formConfig.submitUrl, { status: 200 }); - }, - - // Skip tests in CI until the form is released. - // Remove this setting when the form has a content page in production. - skip: Cypress.env('CI'), - }, - manifest, - // formConfig, -); - -testForm(testConfig); diff --git a/src/applications/burial-poc-v6/tests/fixtures/data/test-data.json b/src/applications/burial-poc-v6/tests/fixtures/data/test-data.json deleted file mode 100644 index 30c7e17fb1b9..000000000000 --- a/src/applications/burial-poc-v6/tests/fixtures/data/test-data.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "data": { - } -} diff --git a/src/applications/burial-poc-v6/utils.js b/src/applications/burial-poc-v6/utils.js deleted file mode 100644 index eceb16001d96..000000000000 --- a/src/applications/burial-poc-v6/utils.js +++ /dev/null @@ -1,33 +0,0 @@ -import { isBefore } from 'date-fns'; -import { RadioLabels } from './constants'; - -export const isBeforeDate = (dateOne, dateTwo, validationMessage) => { - return () => - isBefore(new Date(dateOne), new Date(dateTwo)) ? validationMessage : ''; -}; - -export const stringToBoolean = value => { - switch (value.toLowerCase().trim()) { - case 'true': - case 'yes': - case '1': - return true; - case 'false': - case 'no': - case '0': - case null: - return false; - default: - return Boolean(value); - } -}; - -/** - * - * To show a readable label on review page we extract label based on the value. - * This method returns the label from value stored in formik. - * - * */ -export const getRadioLabel = value => { - return RadioLabels[value]; -};