coronasafe/care_fe

View on GitHub

Showing 1,644 of 1,645 total issues

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

const handleSeverityChange = useCallback(
(value: string) =>
onUpdate(index, {
severity: value as SymptomRequest["severity"],
}),
Severity: Minor
Found in src/components/Questionnaire/QuestionTypes/SymptomQuestion.tsx and 1 other location - About 35 mins to fix
src/components/Questionnaire/QuestionTypes/SymptomQuestion.tsx on lines 196..202

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

<div className="xl:w-1/4 p-1 bg-white rounded-md shadow-md h-full">
<SideOverview
encounter={encounter}
canAccess={canAccess}
canEdit={canEdit}
Severity: Minor
Found in src/pages/Encounters/tabs/EncounterOverviewTab.tsx and 1 other location - About 35 mins to fix
src/pages/Encounters/AssociateDeviceSheet.tsx on lines 69..75

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

) : resourceRequests?.results?.length ? (
resourceRequests.results.map((request, index) => (
<TableRow key={index}>
<TableCell className="font-medium">
{RESOURCE_CATEGORY_CHOICES.find(
Severity: Minor
Found in src/components/Patient/PatientDetailsTab/ResourceRequests.tsx and 2 other locations - About 35 mins to fix
src/components/Files/FilesTab.tsx on lines 527..617
src/components/Patient/PatientDetailsTab/Appointments.tsx on lines 129..173

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

function StatusSelector({
value,
onChange,
}: {
value: QuestionStatus;
Severity: Minor
Found in src/components/Questionnaire/QuestionnaireProperties.tsx and 1 other location - About 35 mins to fix
src/components/Questionnaire/QuestionnaireProperties.tsx on lines 109..153

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

const handleStatusChange = useCallback(
(value: string) =>
onUpdate(index, {
clinical_status: value as SymptomRequest["clinical_status"],
}),
Severity: Minor
Found in src/components/Questionnaire/QuestionTypes/SymptomQuestion.tsx and 1 other location - About 35 mins to fix
src/components/Questionnaire/QuestionTypes/SymptomQuestion.tsx on lines 204..210

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

{isLoading ? (
<div>
<div className="grid gap-5 my-5">
<CardListSkeleton count={RESULTS_PER_PAGE_LIMIT} />
</div>
Severity: Minor
Found in src/pages/Facility/settings/devices/DeviceEncounterHistory.tsx and 1 other location - About 35 mins to fix
src/components/Resource/ResourceCommentSection.tsx on lines 82..123

Avoid too many return statements within this function.
Open

return {
unit: "days",
value: daysDiff,
};
Severity: Major
Found in src/components/ui/relative-date-picker.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return true;
Severity: Major
Found in src/hooks/useFileUpload.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return (
<DiagnosisQuestion {...commonProps} encounterId={encounterId} />
);
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return <span>{t("questionnaire_no_encounter")}</span>;
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return <span>{t("questionnaire_diagnosis_no_encounter")}</span>;
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return (
<EncounterQuestion
{...commonProps}
facilityId={facilityId}
encounterId={encounterId}
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return (
<FilesQuestion {...commonProps} encounterId={encounterId} />
);
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return null;
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return (await res.text()) as TData;
Severity: Major
Found in src/Utils/request/utils.ts - About 30 mins to fix

Avoid too many return statements within this function.
Open

return <span>{t("questionnaire_files_no_encounter")}</span>;
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return (
<SymptomQuestion
{...commonProps}
encounterId={encounterId}
patientId={patientId}
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix

Avoid too many return statements within this function.
Open

return;
Severity: Major
Found in src/Utils/request/errorHandler.ts - About 30 mins to fix

Avoid too many return statements within this function.
Open

return;
Severity: Major
Found in src/Utils/request/errorHandler.ts - About 30 mins to fix

Avoid too many return statements within this function.
Open

return (
<AppointmentQuestion {...commonProps} facilityId={facilityId} />
);
Severity: Major
Found in src/components/Questionnaire/QuestionTypes/QuestionInput.tsx - About 30 mins to fix
Severity
Category
Status
Source
Language