coronasafe/care_fe

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

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 3 of 3 total issues

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_schedule_templates_found")}</p>
Severity: Major
Found in src/pages/Scheduling/ScheduleTemplates.tsx and 1 other location - About 1 hr to fix
src/pages/Scheduling/ScheduleExceptions.tsx on lines 66..73

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

{Math.floor(
getSlotsPerSession(
slot.availability[0].start_time,
slot.availability[0].end_time,
slot.slot_size_in_minutes,
Severity: Minor
Found in src/pages/Scheduling/ScheduleTemplates.tsx and 1 other location - About 35 mins to fix
src/pages/Scheduling/components/EditScheduleTemplateSheet.tsx on lines 396..402

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

const ScheduleTemplateItem = ({
template,
facilityId,
userId,
}: {
Severity: Minor
Found in src/pages/Scheduling/ScheduleTemplates.tsx and 1 other location - About 35 mins to fix
src/pages/Scheduling/components/EditScheduleTemplateSheet.tsx on lines 142..345
Category
Status