src/applications/check-in/utils/appointment/index.js
File index.js
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
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';
Function organizeAppointmentsByYearMonthDay
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function organizeAppointmentsByYearMonthDay(appointments) {
const organizedData = [];
// First sort the appointments by start time then organize them by yearmonth and day
const sortedAppointments = sortAppointmentsByStartTime(appointments);