coronasafe/care_fe

View on GitHub
src/pages/Scheduling/utils.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Function computeAppointmentSlots has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function computeAppointmentSlots(
availability: ScheduleAvailability & { slot_type: "appointment" },
exceptions: ScheduleException[],
referenceDate: Date = new Date(),
) {
Severity: Minor
Found in src/pages/Scheduling/utils.ts - About 1 hr to fix

Function computeAppointmentSlots has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export function computeAppointmentSlots(
availability: ScheduleAvailability & { slot_type: "appointment" },
exceptions: ScheduleException[],
referenceDate: Date = new Date(),
) {
Severity: Minor
Found in src/pages/Scheduling/utils.ts - About 55 mins to fix
Category
Status