department-of-veterans-affairs/vets-website

View on GitHub
src/applications/financial-status-report/pages/resolution/resolutionComment.js

Summary

Maintainability
A
3 hrs
Test Coverage
import { CurrentDebtTitle } from '../../components/shared/CurrentDebtTitle';
import ResolutionAmount from '../../components/resolution/ResolutionAmount';
import { validateResolutionAmount } from '../../utils/validations';

export const uiSchema = {
  selectedDebtsAndCopays: {
    items: {
      'ui:title': CurrentDebtTitle,
      'ui:validations': [validateResolutionAmount],
      resolutionComment: {
        'ui:title': ' ',
        'ui:widget': ResolutionAmount,
        'ui:options': {
          hideOnReview: true,
        },
      },
    },
  },
};

export const schema = {
  type: 'object',
  properties: {
    selectedDebtsAndCopays: {
      type: 'array',
      items: {
        type: 'object',
        required: ['resolutionComment'],
        properties: {
          resolutionComment: {
            type: 'string',
          },
        },
      },
    },
  },
};