Skip to content

Commit

Permalink
Refactor pension form files (#29250)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsdevelopment committed Apr 29, 2024
1 parent 8157146 commit 80c7844
Show file tree
Hide file tree
Showing 39 changed files with 421 additions and 470 deletions.
@@ -1,5 +1,4 @@
import moment from 'moment';

import {
dateOfBirthUI,
dateOfBirthSchema,
Expand Down Expand Up @@ -44,8 +43,8 @@ export function setDefaultIsOver65(oldData, newData, currentDate) {

/** @type {PageSchema} */
export default {
path: 'applicant/information',
title: 'Applicant information',
path: 'applicant/information',
updateFormData: setDefaultIsOver65,
uiSchema: {
'ui:description': applicantDescription,
Expand Down
Expand Up @@ -6,8 +6,8 @@ import {

/** @type {PageSchema} */
export default {
path: 'military/general',
title: 'General history',
path: 'military/general',
uiSchema: {
...titleUI('Other service names'),
serveUnderOtherNames: yesNoUI({
Expand Down
Expand Up @@ -8,8 +8,8 @@ import {

/** @type {PageSchema} */
export default {
path: 'military/pow',
title: 'POW status',
path: 'military/pow',
uiSchema: {
...titleUI('Prisoner of war status'),
powStatus: yesNoUI({
Expand Down
Expand Up @@ -21,8 +21,8 @@ PreviousNameView.propTypes = {

/** @type {PageSchema} */
export default {
path: 'military/general/add',
title: 'Previous names',
path: 'military/general/add',
depends: doesHavePreviousNames,
uiSchema: {
...titleUI('Add other service names'),
Expand Down
@@ -1,7 +1,5 @@
import fullSchemaPensions from 'vets-json-schema/dist/21P-527EZ-schema.json';

import { createSelector } from 'reselect';

import { isFullDate } from 'platform/forms/validations';
import {
currentOrPastDateRangeUI,
Expand All @@ -13,19 +11,18 @@ import {
titleUI,
} from 'platform/forms-system/src/js/web-component-patterns';
import { VaTextInputField } from 'platform/forms-system/src/js/web-component-fields';

const { placeOfSeparation } = fullSchemaPensions.properties;

import { serviceBranchLabels } from '../../../labels';
import { WartimeWarningAlert } from '../../../components/FormAlerts';
import { servedDuringWartime } from '../../../helpers';
import { validateServiceBirthDates } from '../../../validation';
import ServicePeriodReview from '../../../components/ServicePeriodReview';

const { placeOfSeparation } = fullSchemaPensions.properties;

/** @type {PageSchema} */
export default {
path: 'military/history',
title: 'Service period',
path: 'military/history',
CustomPageReview: ServicePeriodReview,
uiSchema: {
...titleUI('Service period'),
Expand Down
@@ -1,5 +1,4 @@
import generateEmployersSchemas from './employmentHistory';
import { isEmployedUnder65 } from './helpers';
import { generateEmployersSchemas, isEmployedUnder65 } from './helpers';

export default {
title: 'Current employment',
Expand Down

This file was deleted.

@@ -1,5 +1,7 @@
import generateMedicalCentersSchemas from './medicalCenters';
import { hasFederalTreatmentHistory } from './helpers';
import {
generateMedicalCentersSchemas,
hasFederalTreatmentHistory,
} from './helpers';

export default {
title: 'Federal medical facilities',
Expand Down

0 comments on commit 80c7844

Please sign in to comment.