Showing 3,730 of 12,800 total issues
Function VaccinesListItem
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const VaccinesListItem = props => {
const { record } = props;
return (
<va-card
Function createBreadcrumbs
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createBreadcrumbs = (location, prescription, currentPage) => {
const { pathname } = location;
const defaultBreadcrumbs = [
{
href: medicationsUrls.VA_HOME,
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { user, form, formConfig, route } = this.props;
const finishAppLaterMessage =
formConfig?.customText?.finishAppLaterMessage ||
FINISH_APP_LATER_DEFAULT_MESSAGE;
Function addFocusBehaviorToCrisisLineModal
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function addFocusBehaviorToCrisisLineModal() {
const overlay = document.getElementById('modal-crisisline');
const modal = document.querySelector('.va-crisis-panel.va-modal-inner');
const tabbableElements = getTabbableElements(modal);
let openControl;
Function titleUI
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const titleUI = (titleOption, descriptionOption) => {
const {
title,
description,
headerLevel,
Function HealthcareModalContent
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function HealthcareModalContent() {
return (
<>
<p>
<strong>Respondent Burden:</strong> This information is collected in
Function schema
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const schema = optionalFields => {
const s = {
type: 'object',
properties: {
bankAccount: {
Function itemPage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pageBuilder.itemPage = pageConfig => {
const requiredOpts = ['title', 'path', 'uiSchema', 'schema'];
verifyRequiredPropsPageConfig('itemPage', requiredOpts, pageConfig);
const { onNavBack, onNavForward } = getNavItem(pageConfig.path);
Function determineResultsPage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const determineResultsPage = (formResponses, router) => {
const responseToServicePeriod = getServicePeriodResponse(formResponses);
const { RESULTS_4 } = SHORT_NAME_MAP;
const resultsPages = DISPLAY_CONDITIONS?.RESULTS;
Function updateData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateData(oldForm, newForm) {
const updatedForm = newForm;
checkBoxElements.forEach(elementName => {
// For each checkBoxGroup in the form, get the number of selected elements before and after the current event
Function recurseField
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const recurseField = (key, field, rank = 0) => {
if (
field.value === '' ||
field.value === 0 ||
field.value === null ||
Function updateData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateData(oldForm, newForm) {
const updatedForm = newForm;
checkBoxElements.forEach(elementName => {
// For each checkBoxGroup in the form, get the number of selected elements before and after the current event
const oldSelectedCount = Object.keys(oldForm[elementName]).filter(
Function InitialConfirmEligibilityView
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function InitialConfirmEligibilityView(props) {
if (props.onReviewPage) {
return null;
}
captureEvents.ineligibilityAlert(props);
Function buildSubmitEventData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildSubmitEventData = formData => {
const yesNoOrUndefined = value => {
if (value === undefined) {
return undefined;
}
Function schema
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function schema(currentSchema, topicProperty = 'topic') {
const topicSchema = currentSchema.properties[topicProperty];
return {
type: 'object',
required: ['levelOne', 'levelTwo'],
Function transform
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transform(formConfig, form) {
const benefitsTransform = formData => {
const clonedData = _.cloneDeep(formData);
const benefits = clonedData['view:benefit'];
Function addFocusBehaviorToCrisisLineModal
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addFocusBehaviorToCrisisLineModal = () => {
const overlay = document?.getElementById('ts-modal-crisisline');
const modal = document?.querySelector('.vcl-crisis-panel.va-modal-inner');
if (modal) {
Function addressReducer
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addressReducer(state = initialState, action) {
switch (action.type) {
case ADDRESS_VALIDATION_START:
return {
...state,
Function fetchRepresentatives
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchRepresentatives = async (
address,
lat,
long,
name,
Function AppointmentResources
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AppointmentResources = props => {
const { router } = props;
const { goBack } = router;
const { t } = useTranslation();