department-of-veterans-affairs/vets-website

View on GitHub
src/applications/check-in/utils/appointment/index.js

Summary

Maintainability
A
3 hrs
Test Coverage

File index.js has 271 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { parseISO, startOfDay } from 'date-fns';
import { format, utcToZonedTime } from 'date-fns-tz';
import { ELIGIBILITY } from './eligibility';
import { VISTA_CHECK_IN_STATUS_IENS } from '../appConstants';
Severity: Minor
Found in src/applications/check-in/utils/appointment/index.js - About 2 hrs to fix

    Function organizeAppointmentsByYearMonthDay has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function organizeAppointmentsByYearMonthDay(appointments) {
      const organizedData = [];
    
      // First sort the appointments by start time then organize them by yearmonth and day
      const sortedAppointments = sortAppointmentsByStartTime(appointments);
    Severity: Minor
    Found in src/applications/check-in/utils/appointment/index.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status