department-of-veterans-affairs/vets-website

View on GitHub
src/applications/hca/config/chapters/militaryService/additionalInformation.js

Summary

Maintainability
A
1 hr
Test Coverage
import fullSchemaHca from 'vets-json-schema/dist/10-10EZ-schema.json';
import { titleUI } from '~/platform/forms-system/src/js/web-component-patterns';

const {
  disabledInLineOfDuty,
  isFormerPow,
  postNov111998Combat,
  purpleHeartRecipient,
  swAsiaCombat,
} = fullSchemaHca.properties;

export default {
  uiSchema: {
    ...titleUI('Service history', 'Check all that apply to you.'),
    'view:serviceHistory': {
      purpleHeartRecipient: {
        'ui:title': 'Purple Heart award recipient',
      },
      isFormerPow: {
        'ui:title': 'Former Prisoner of War',
      },
      postNov111998Combat: {
        'ui:title':
          'Served in combat theater of operations after November 11, 1998',
      },
      disabledInLineOfDuty: {
        'ui:title':
          'Discharged or retired from the military for a disability incurred in the line of duty',
      },
      swAsiaCombat: {
        'ui:title':
          'Served in Southwest Asia during the Gulf War between August 2, 1990, and November 11, 1998',
      },
    },
  },
  schema: {
    type: 'object',
    properties: {
      'view:serviceHistory': {
        type: 'object',
        properties: {
          purpleHeartRecipient,
          isFormerPow,
          postNov111998Combat,
          disabledInLineOfDuty,
          swAsiaCombat,
        },
      },
    },
  },
};