coronasafe/care_fe

View on GitHub
src/pages/Scheduling/ScheduleExceptions.tsx

Summary

Maintainability
D
2 days
Test Coverage

Showing 3 of 3 total issues

Function ScheduleExceptionItem has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ScheduleExceptionItem = (
props: ScheduleException & { facilityId: string; userId: string },
) => {
const { t } = useTranslation();
const queryClient = useQueryClient();
Severity: Major
Found in src/pages/Scheduling/ScheduleExceptions.tsx - About 4 hrs to fix

Similar blocks of code found in 3 locations. Consider refactoring.
Open

<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{t("are_you_sure")}</AlertDialogTitle>
<AlertDialogDescription>
<Alert variant="destructive" className="mt-4">
Severity: Major
Found in src/pages/Scheduling/ScheduleExceptions.tsx and 2 other locations - About 1 day to fix
src/pages/Scheduling/components/EditScheduleTemplateSheet.tsx on lines 295..329
src/pages/Scheduling/components/EditScheduleTemplateSheet.tsx on lines 437..469

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (items.length === 0) {
return (
<div className="flex flex-col items-center text-center text-gray-500 py-16">
<CareIcon icon="l-calendar-slash" className="size-10 mb-3" />
<p>{t("no_scheduled_exceptions_found")}</p>
Severity: Major
Found in src/pages/Scheduling/ScheduleExceptions.tsx and 1 other location - About 1 hr to fix
src/pages/Scheduling/ScheduleTemplates.tsx on lines 37..44
Category
Status