Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused code #9684

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions src/Utils/request/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import {
IUserFacilityRequest,
PatientConsentModel,
} from "@/components/Facility/models";
import { Prescription } from "@/components/Medicine/models";
import { PNconfigData } from "@/components/Notifications/models";
import {
CreateFileRequest,
CreateFileResponse,
Expand Down Expand Up @@ -296,18 +294,6 @@ const routes = {
path: "/api/v1/users/?user_type=Doctor&ordering=-last_login",
},

getUserPnconfig: {
path: "/api/v1/users/{username}/pnconfig/",
method: "GET",
TRes: Type<PNconfigData>(),
},

updateUserPnconfig: {
path: "/api/v1/users/{username}/pnconfig/",
method: "PATCH",
TRes: Type<PNconfigData>(),
},

// Facility Endpoints

getPermittedFacilities: {
Expand Down Expand Up @@ -527,49 +513,6 @@ const routes = {
TBody: Type<Partial<CommentModel>>(),
},

// Prescription endpoints

listPrescriptions: {
path: "/api/v1/consultation/{consultation_external_id}/prescriptions/",
method: "GET",
},

createPrescription: {
path: "/api/v1/consultation/{consultation_external_id}/prescriptions/",
method: "POST",
TBody: Type<Prescription>(),
TRes: Type<Prescription>(),
},

listAdministrations: {
path: "/api/v1/consultation/{consultation_external_id}/prescription_administration/",
method: "GET",
},

getAdministration: {
path: "/api/v1/consultation/{consultation_external_id}/prescription_administration/{external_id}/",
method: "GET",
},

getPrescription: {
path: "/api/v1/consultation/{consultation_external_id}/prescriptions/{external_id}/",
method: "GET",
},

administerPrescription: {
path: "/api/v1/consultation/{consultation_external_id}/prescriptions/{external_id}/administer/",
method: "POST",
},

discontinuePrescription: {
path: "/api/v1/consultation/{consultation_external_id}/prescriptions/{external_id}/discontinue/",
method: "POST",
TBody: Type<{
discontinued_reason: string;
}>(),
TRes: Type<Record<string, never>>(),
},

facility: {
getUsers: {
path: "/api/v1/facility/{facility_id}/users/",
Expand Down
6 changes: 3 additions & 3 deletions src/components/Common/LanguageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import careConfig from "@careConfig";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";

import { classNames } from "@/Utils/utils";
import { classNames, keysOf } from "@/Utils/utils";
import { LANGUAGES } from "@/i18n";

export const LanguageSelector = (props: any) => {
Expand All @@ -20,7 +20,7 @@ export const LanguageSelector = (props: any) => {
}
};

const availableLocales = Object.keys(LANGUAGES).filter((l) =>
const availableLocales = keysOf(LANGUAGES).filter((l) =>
careConfig.availableLocales?.includes(l),
);

Expand All @@ -36,7 +36,7 @@ export const LanguageSelector = (props: any) => {
value={i18n.language}
onChange={(e: any) => handleLanguage(e.target.value)}
>
{availableLocales.map((e: string) => (
{availableLocales.map((e) => (
<option key={e} value={e}>
{LANGUAGES[e]}
</option>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Common/LanguageSelectorLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import careConfig from "@careConfig";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";

import { classNames } from "@/Utils/utils";
import { classNames, keysOf } from "@/Utils/utils";
import { LANGUAGES } from "@/i18n";

export const LanguageSelectorLogin = () => {
Expand All @@ -19,7 +19,7 @@ export const LanguageSelectorLogin = () => {
}
};

const availableLocales = Object.keys(LANGUAGES).filter((l) =>
const availableLocales = keysOf(LANGUAGES).filter((l) =>
careConfig.availableLocales?.includes(l),
);

Expand All @@ -28,7 +28,7 @@ export const LanguageSelectorLogin = () => {
{t("available_in")}
<br />
<div className="inline-flex flex-wrap items-center justify-center gap-3">
{availableLocales.map((e: string) => (
{availableLocales.map((e) => (
<button
key={e}
onClick={() => handleLanguage(e)}
Expand Down
117 changes: 0 additions & 117 deletions src/components/Common/QRScanner.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions src/components/Common/Readmore.tsx

This file was deleted.

48 changes: 0 additions & 48 deletions src/components/Common/RelativeDateUserMention.tsx

This file was deleted.

Loading
Loading