department-of-veterans-affairs/vets-website

View on GitHub
src/applications/pensions/config/chapters/04-household-information/hasDependents.js

Summary

Maintainability
A
0 mins
Test Coverage
import {
  titleUI,
  yesNoSchema,
  yesNoUI,
} from 'platform/forms-system/src/js/web-component-patterns';
import { showMultiplePageResponse } from '../../../helpers';

/** @type {PageSchema} */
export default {
  title: 'Dependents',
  path: 'household/dependents',
  depends: () => !showMultiplePageResponse(),
  uiSchema: {
    ...titleUI('Dependent children'),
    'view:hasDependents': yesNoUI({
      title: 'Do you have any dependent children?',
    }),
  },
  schema: {
    type: 'object',
    required: ['view:hasDependents'],
    properties: {
      'view:hasDependents': yesNoSchema,
    },
  },
};