diff --git a/.cursorrules b/.cursorrules index a561180ab91..2eed3afe459 100644 --- a/.cursorrules +++ b/.cursorrules @@ -7,12 +7,12 @@ Care uses a custom useQuery hook to fetch data from the API. APIs are defined in Here's an example of how to use the useQuery hook to fetch data from the API: ``` -useQuery from "@/Common/hooks/useQuery"; +useQuery from "@/common/hooks/useQuery"; const { data, loading, error } = useQuery(routes.getFacilityUsers, { facility_id: "1", }); -request from "@/Common/utils/request"; +request from "@/common/utils/request"; const { res } = await request(routes.partialUpdateAsset, { pathParams: { external_id: assetId }, body: data, diff --git a/package-lock.json b/package-lock.json index 8c855c869a1..bd7bb8423c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -107,6 +107,24 @@ "node": ">=20.12.0" } }, + "apps/care_livekit_fe": { + "name": "care-livekit", + "version": "0.0.1", + "license": "ISC", + "dependencies": { + "@livekit/components-react": "^2.6.2", + "@livekit/components-styles": "^1.1.3", + "livekit-client": "^2.5.5" + }, + "devDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" + } + }, "node_modules/@actions/core": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", @@ -1868,6 +1886,11 @@ "node": ">=6.9.0" } }, + "node_modules/@bufbuild/protobuf": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", + "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==" + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -2768,6 +2791,64 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@livekit/components-core": { + "version": "0.11.9", + "resolved": "https://registry.npmjs.org/@livekit/components-core/-/components-core-0.11.9.tgz", + "integrity": "sha512-LPE1BZ+YTaqsVqGy/GAlpiO5rEI8XpEaf1TQcGdZN1BCBas9hTHt7/aHMbHQJ0K5xuAFQx8is6dFe451T4qXIQ==", + "dependencies": { + "@floating-ui/dom": "1.6.11", + "loglevel": "1.9.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "livekit-client": "^2.5.7", + "tslib": "^2.6.2" + } + }, + "node_modules/@livekit/components-react": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@livekit/components-react/-/components-react-2.6.5.tgz", + "integrity": "sha512-G3BpBlKy+lWTV9MH3/oBTBC17Z8CWqZ9GnjcG/xmYI0IvqmY89tVWph7cj2Bq0taniA+mD3U9EMPr68fOb1m1g==", + "dependencies": { + "@livekit/components-core": "0.11.9", + "clsx": "2.1.1", + "usehooks-ts": "3.1.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@livekit/krisp-noise-filter": "^0.2.12", + "livekit-client": "^2.5.7", + "react": ">=18", + "react-dom": ">=18", + "tslib": "^2.6.2" + }, + "peerDependenciesMeta": { + "@livekit/krisp-noise-filter": { + "optional": true + } + } + }, + "node_modules/@livekit/components-styles": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@livekit/components-styles/-/components-styles-1.1.4.tgz", + "integrity": "sha512-QCupn7tQ/dy/WZclrfsgtDe8peiGYS6Ied1IGkKOysaXo04l90t62SIUTKyxgd0dNDhUDC0p34qCggGZs/44lQ==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@livekit/protocol": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/@livekit/protocol/-/protocol-1.24.0.tgz", + "integrity": "sha512-9dCsqnkMn7lvbI4NGh18zhLDsrXyUcpS++TEFgEk5Xv1WM3R2kT3EzqgL1P/mr3jaabM6rJ8wZA/KJLuQNpF5w==", + "dependencies": { + "@bufbuild/protobuf": "^1.10.0" + } + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -6512,6 +6593,10 @@ "node": ">=6" } }, + "node_modules/care-livekit": { + "resolved": "apps/care_livekit_fe", + "link": true + }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -11607,6 +11692,26 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/livekit-client": { + "version": "2.5.9", + "resolved": "https://registry.npmjs.org/livekit-client/-/livekit-client-2.5.9.tgz", + "integrity": "sha512-oDpK6SKYB1F+mNO+25DA0bF0cD2XoOJeD8ji4YQpzDBQv2IxeyKrQhoqXAqrYgIKuiMNkImSf+yg2v7EHSl4Og==", + "dependencies": { + "@livekit/protocol": "1.24.0", + "events": "^3.3.0", + "loglevel": "^1.8.0", + "sdp-transform": "^2.14.1", + "ts-debounce": "^4.0.0", + "tslib": "2.7.0", + "typed-emitter": "^2.1.0", + "webrtc-adapter": "^9.0.0" + } + }, + "node_modules/livekit-client/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, "node_modules/load-plugin": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-6.0.3.tgz", @@ -11718,7 +11823,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true, "license": "MIT" }, "node_modules/lodash.isplainobject": { @@ -11813,6 +11917,18 @@ "node": ">=8" } }, + "node_modules/loglevel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -17068,6 +17184,14 @@ "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==", "license": "MIT" }, + "node_modules/sdp-transform": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", + "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==", + "bin": { + "sdp-verify": "checker.js" + } + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -18393,6 +18517,11 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-debounce": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", + "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==" + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -18573,6 +18702,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", + "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", + "optionalDependencies": { + "rxjs": "*" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -19150,6 +19287,20 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/usehooks-ts": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-3.1.0.tgz", + "integrity": "sha512-bBIa7yUyPhE1BCc0GmR96VU/15l/9gP1Ch5mYdLcFBaFGQsdmXkvjV0TtOqW1yUd6VjIwDunm+flSciCQXujiw==", + "dependencies": { + "lodash.debounce": "^4.0.8" + }, + "engines": { + "node": ">=16.15.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/src/App.tsx b/src/App.tsx index 0b2d20e805a..eea75d84c1a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,12 @@ import { Suspense } from "react"; import Routers from "./Routers"; import Integrations from "./Integrations"; -import Loading from "./Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; import HistoryAPIProvider from "./Providers/HistoryAPIProvider"; import AuthUserProvider from "./Providers/AuthUserProvider"; import PluginEngine from "./PluginEngine"; import { FeatureFlagsProvider } from "./Utils/featureFlags"; -import { Toaster } from "./Components/ui/toaster"; +import { Toaster } from "@/components/ui/toaster"; const App = () => { return ( diff --git a/src/CAREUI/display/Chip.tsx b/src/CAREUI/display/Chip.tsx index 30f73ce4a43..14f98da8506 100644 --- a/src/CAREUI/display/Chip.tsx +++ b/src/CAREUI/display/Chip.tsx @@ -1,5 +1,5 @@ import CareIcon, { IconName } from "../icons/CareIcon"; -import { ButtonVariant } from "../../Components/Common/components/ButtonV2"; +import { ButtonVariant } from "@/components/Common/components/ButtonV2"; import { classNames } from "../../Utils/utils"; interface Props { diff --git a/src/CAREUI/display/PopupModal.tsx b/src/CAREUI/display/PopupModal.tsx index 3b2ce314da0..b0b40f2dc7d 100644 --- a/src/CAREUI/display/PopupModal.tsx +++ b/src/CAREUI/display/PopupModal.tsx @@ -1,9 +1,9 @@ import { ReactNode, useEffect, useRef, useState } from "react"; -import { Cancel, Submit } from "../../Components/Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { classNames } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import useBreakpoints from "../../Common/hooks/useBreakpoints"; -import DialogModal from "../../Components/Common/Dialog"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; +import DialogModal from "@/components/Common/Dialog"; type Props = { show: boolean; diff --git a/src/CAREUI/display/Timeline.tsx b/src/CAREUI/display/Timeline.tsx index 6701d9a7511..eb5f4c56ae5 100644 --- a/src/CAREUI/display/Timeline.tsx +++ b/src/CAREUI/display/Timeline.tsx @@ -1,6 +1,6 @@ import { createContext, useContext } from "react"; import { useTranslation } from "react-i18next"; -import { PerformedByModel } from "../../Components/HCX/misc"; +import { PerformedByModel } from "@/components/HCX/misc"; import { classNames, formatName } from "../../Utils/utils"; import CareIcon, { IconName } from "../icons/CareIcon"; import RecordMeta from "./RecordMeta"; diff --git a/src/CAREUI/icons/Index.tsx b/src/CAREUI/icons/Index.tsx index 25b4beded84..527bdfd0a4c 100644 --- a/src/CAREUI/icons/Index.tsx +++ b/src/CAREUI/icons/Index.tsx @@ -3,7 +3,7 @@ import React, { useState } from "react"; import CareIcon, { IconName } from "./CareIcon"; import iconPaths from "./UniconPaths.json"; import { t } from "i18next"; -import PageTitle from "../../Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; import { useToast } from "@/hooks/use-toast"; const IconIndex: React.FC = () => { diff --git a/src/CAREUI/interactive/FiltersSlideover.tsx b/src/CAREUI/interactive/FiltersSlideover.tsx index 496f1b3e516..4330486e9bc 100644 --- a/src/CAREUI/interactive/FiltersSlideover.tsx +++ b/src/CAREUI/interactive/FiltersSlideover.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; -import useFilters from "../../Common/hooks/useFilters"; -import ButtonV2 from "../../Components/Common/components/ButtonV2"; +import useFilters from "@/common/hooks/useFilters"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../icons/CareIcon"; import SlideOver from "./SlideOver"; import { ReactNode } from "react"; diff --git a/src/CAREUI/interactive/HumanChart.tsx b/src/CAREUI/interactive/HumanChart.tsx index c3b7cca80c3..63552d28682 100644 --- a/src/CAREUI/interactive/HumanChart.tsx +++ b/src/CAREUI/interactive/HumanChart.tsx @@ -1,5 +1,5 @@ import { Fragment } from "react/jsx-runtime"; -import { HumanBodyPaths, HumanBodyRegion } from "../../Common/constants"; +import { HumanBodyPaths, HumanBodyRegion } from "@/common/constants"; type Props = { regionColor: (region: HumanBodyRegion) => string; diff --git a/src/CAREUI/interactive/Zoom.tsx b/src/CAREUI/interactive/Zoom.tsx index bf5747f9b91..c88412dca1e 100644 --- a/src/CAREUI/interactive/Zoom.tsx +++ b/src/CAREUI/interactive/Zoom.tsx @@ -1,5 +1,5 @@ import { createContext, ReactNode, useContext, useState } from "react"; -import ButtonV2 from "../../Components/Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../icons/CareIcon"; type ProviderValue = { diff --git a/src/CAREUI/misc/AuthorizedChild.tsx b/src/CAREUI/misc/AuthorizedChild.tsx index 935f0c51f3c..e71a4f64b5e 100644 --- a/src/CAREUI/misc/AuthorizedChild.tsx +++ b/src/CAREUI/misc/AuthorizedChild.tsx @@ -1,7 +1,7 @@ import { ReactNode } from "react"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized"; -import useSlug from "../../Common/hooks/useSlug"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; +import useSlug from "@/common/hooks/useSlug"; import { AuthorizedForCB } from "../../Utils/AuthorizeFor"; interface Props { diff --git a/src/CAREUI/misc/PaginatedList.tsx b/src/CAREUI/misc/PaginatedList.tsx index 3b68b23bd30..93a3685b394 100644 --- a/src/CAREUI/misc/PaginatedList.tsx +++ b/src/CAREUI/misc/PaginatedList.tsx @@ -3,10 +3,10 @@ import { PaginatedResponse, QueryRoute } from "../../Utils/request/types"; import useQuery, { QueryOptions } from "../../Utils/request/useQuery"; import ButtonV2, { CommonButtonProps, -} from "../../Components/Common/components/ButtonV2"; +} from "@/components/Common/components/ButtonV2"; import CareIcon from "../icons/CareIcon"; import { classNames } from "../../Utils/utils"; -import Pagination from "../../Components/Common/Pagination"; +import Pagination from "@/components/Common/Pagination"; const DEFAULT_PER_PAGE_LIMIT = 14; diff --git a/src/CAREUI/misc/PrintPreview.tsx b/src/CAREUI/misc/PrintPreview.tsx index fe8b09b173c..9efa11cc01b 100644 --- a/src/CAREUI/misc/PrintPreview.tsx +++ b/src/CAREUI/misc/PrintPreview.tsx @@ -1,9 +1,9 @@ import { ReactNode } from "react"; -import ButtonV2 from "../../Components/Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../icons/CareIcon"; import { classNames } from "../../Utils/utils"; -import Page from "../../Components/Common/components/Page"; -import useBreakpoints from "../../Common/hooks/useBreakpoints"; +import Page from "@/components/Common/components/Page"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; import { useTranslation } from "react-i18next"; import { ZoomControls, ZoomProvider, ZoomTransform } from "../interactive/Zoom"; diff --git a/src/Integrations/Plausible.tsx b/src/Integrations/Plausible.tsx index 8001c8139d2..e6c4d2fa42a 100644 --- a/src/Integrations/Plausible.tsx +++ b/src/Integrations/Plausible.tsx @@ -1,5 +1,5 @@ import { useLocationChange } from "raviger"; -import Script from "../Components/Common/Script"; +import Script from "@/components/Common/Script"; import { useEffect } from "react"; import careConfig from "@careConfig"; diff --git a/src/PluginEngine.tsx b/src/PluginEngine.tsx index 3d47dba4d81..43b8e558f8f 100644 --- a/src/PluginEngine.tsx +++ b/src/PluginEngine.tsx @@ -1,9 +1,9 @@ /* eslint-disable i18next/no-literal-string */ import React, { Suspense } from "react"; -import { CareAppsContext, useCareApps } from "./Common/hooks/useCareApps"; +import { CareAppsContext, useCareApps } from "@/common/hooks/useCareApps"; import { pluginMap } from "./pluginTypes"; -import { UserAssignedModel } from "./Components/Users/models"; -import ErrorBoundary from "./Components/Common/ErrorBoundary"; +import { UserAssignedModel } from "@/components/Users/models"; +import ErrorBoundary from "@/components/Common/ErrorBoundary"; export default function PluginEngine({ children, diff --git a/src/Providers/AuthUserProvider.tsx b/src/Providers/AuthUserProvider.tsx index cda5fbfe671..43263b98dab 100644 --- a/src/Providers/AuthUserProvider.tsx +++ b/src/Providers/AuthUserProvider.tsx @@ -1,9 +1,9 @@ import { useCallback, useEffect } from "react"; -import { AuthUserContext } from "../Common/hooks/useAuthUser"; -import Loading from "../Components/Common/Loading"; +import { AuthUserContext } from "@/common/hooks/useAuthUser"; +import Loading from "@/components/Common/Loading"; import routes from "../Redux/api"; import useQuery from "../Utils/request/useQuery"; -import { LocalStorageKeys } from "../Common/constants"; +import { LocalStorageKeys } from "@/common/constants"; import request from "../Utils/request/request"; import { navigate } from "raviger"; import careConfig from "@careConfig"; diff --git a/src/Redux/api.tsx b/src/Redux/api.tsx index 953a1967306..22f0285d22d 100644 --- a/src/Redux/api.tsx +++ b/src/Redux/api.tsx @@ -1,8 +1,8 @@ import { ConsentRequestModel, CreateConsentTBody, -} from "../Components/ABDM/types/consent"; -import { HealthInformationModel } from "../Components/ABDM/types/health-information"; +} from "@/components/ABDM/types/consent"; +import { HealthInformationModel } from "@/components/ABDM/types/health-information"; import { AssetBedBody, AssetBedModel, @@ -13,7 +13,7 @@ import { AssetTransaction, AvailabilityRecord, PatientAssetBed, -} from "../Components/Assets/AssetTypes"; +} from "@/components/Assets/AssetTypes"; import { BedModel, CapacityModal, @@ -43,68 +43,68 @@ import { PatientTransferResponse, StateModel, WardModel, -} from "../Components/Facility/models"; +} from "@/components/Facility/models"; import { DailyRoundsModel, PatientModel, SampleReportModel, SampleTestModel, -} from "../Components/Patient/models"; -import { IComment, IResource } from "../Components/Resource/models"; +} from "@/components/Patient/models"; +import { IComment, IResource } from "@/components/Resource/models"; import { IDeleteBedCapacity, ILocalBodies, ILocalBodyByDistrict, -} from "../Components/ExternalResult/models"; +} from "@/components/ExternalResult/models"; import { InvestigationGroup, InvestigationType, -} from "../Components/Facility/Investigations"; +} from "@/components/Facility/Investigations"; import { DupPatientModel, PatientConsentModel, PatientTransferRequest, -} from "../Components/Facility/models"; -import { MedibaseMedicine, Prescription } from "../Components/Medicine/models"; +} from "@/components/Facility/models"; +import { MedibaseMedicine, Prescription } from "@/components/Medicine/models"; import { NotificationData, PNconfigData, -} from "../Components/Notifications/models"; +} from "@/components/Notifications/models"; import { HCXClaimModel, HCXCommunicationModel, HCXPolicyModel, -} from "../Components/HCX/models"; -import { ICD11DiagnosisModel } from "../Components/Diagnosis/types"; -import { IShift } from "../Components/Shifting/models"; -import { Investigation } from "../Components/Facility/Investigations/Reports/types"; +} from "@/components/HCX/models"; +import { ICD11DiagnosisModel } from "@/components/Diagnosis/types"; +import { IShift } from "@/components/Shifting/models"; +import { Investigation } from "@/components/Facility/Investigations/Reports/types"; import { PaginatedResponse } from "../Utils/request/types"; import { CreateFileRequest, CreateFileResponse, FileUploadModel, -} from "../Components/Patient/models"; +} from "@/components/Patient/models"; import { SkillModel, SkillObjectModel, UpdatePasswordForm, UserAssignedModel, UserModel, -} from "../Components/Users/models"; +} from "@/components/Users/models"; import { EventGeneric, type Type, -} from "../Components/Facility/ConsultationDetails/Events/types"; -import { InvestigationSessionType } from "../Components/Facility/Investigations/investigationsTab"; -import { AbhaNumberModel } from "../Components/ABDM/types/abha"; -import { ScribeModel } from "../Components/Scribe/Scribe"; +} from "@/components/Facility/ConsultationDetails/Events/types"; +import { InvestigationSessionType } from "@/components/Facility/Investigations/investigationsTab"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import { ScribeModel } from "@/components/Scribe/Scribe"; import { IcreateHealthFacilityTBody, IHealthFacility, IpartialUpdateHealthFacilityTBody, -} from "../Components/ABDM/types/health-facility"; -import { PMJAYPackageItem } from "@/Components/Common/PMJAYProcedurePackageAutocomplete"; -import { InsurerOptionModel } from "@/Components/HCX/InsurerAutocomplete"; +} from "@/components/ABDM/types/health-facility"; +import { PMJAYPackageItem } from "@/components/Common/PMJAYProcedurePackageAutocomplete"; +import { InsurerOptionModel } from "@/components/HCX/InsurerAutocomplete"; /** * A fake function that returns an empty object casted to type T diff --git a/src/Routers/AppRouter.tsx b/src/Routers/AppRouter.tsx index df154ee7a5e..5a7b2cbb312 100644 --- a/src/Routers/AppRouter.tsx +++ b/src/Routers/AppRouter.tsx @@ -1,19 +1,19 @@ import { useRedirect, useRoutes, usePath, Redirect } from "raviger"; import { useState, useEffect } from "react"; -import ShowPushNotification from "../Components/Notifications/ShowPushNotification"; -import { NoticeBoard } from "../Components/Notifications/NoticeBoard"; -import Error404 from "../Components/ErrorPages/404"; +import ShowPushNotification from "@/components/Notifications/ShowPushNotification"; +import { NoticeBoard } from "@/components/Notifications/NoticeBoard"; +import Error404 from "@/components/ErrorPages/404"; import { DesktopSidebar, MobileSidebar, SIDEBAR_SHRINK_PREFERENCE_KEY, SidebarShrinkContext, -} from "../Components/Common/Sidebar/Sidebar"; -import { BLACKLISTED_PATHS } from "../Common/constants"; -import SessionExpired from "../Components/ErrorPages/SessionExpired"; -import HealthInformation from "../Components/ABDM/HealthInformation"; -import ABDMFacilityRecords from "../Components/ABDM/ABDMFacilityRecords"; +} from "@/components/Common/Sidebar/Sidebar"; +import { BLACKLISTED_PATHS } from "@/common/constants"; +import SessionExpired from "@/components/ErrorPages/SessionExpired"; +import HealthInformation from "@/components/ABDM/HealthInformation"; +import ABDMFacilityRecords from "@/components/ABDM/ABDMFacilityRecords"; import UserRoutes from "./routes/UserRoutes"; import PatientRoutes from "./routes/PatientRoutes"; @@ -24,7 +24,7 @@ import HCXRoutes from "./routes/HCXRoutes"; import ShiftingRoutes from "./routes/ShiftingRoutes"; import AssetRoutes from "./routes/AssetRoutes"; import ResourceRoutes from "./routes/ResourceRoutes"; -import { usePluginRoutes } from "@/Common/hooks/useCareApps"; +import { usePluginRoutes } from "@/common/hooks/useCareApps"; import careConfig from "@careConfig"; import IconIndex from "../CAREUI/icons/Index"; diff --git a/src/Routers/SessionRouter.tsx b/src/Routers/SessionRouter.tsx index faefbf0d4c7..f6556b38c39 100644 --- a/src/Routers/SessionRouter.tsx +++ b/src/Routers/SessionRouter.tsx @@ -1,8 +1,8 @@ -import { Login, ResetPassword } from "../Components/Auth"; +import { Login, ResetPassword } from "@/components/Auth"; import { useRoutes } from "raviger"; -import SessionExpired from "../Components/ErrorPages/SessionExpired"; -import InvalidReset from "../Components/ErrorPages/InvalidReset"; -import LicensesPage from "../Components/Licenses/LicensesPage"; +import SessionExpired from "@/components/ErrorPages/SessionExpired"; +import InvalidReset from "@/components/ErrorPages/InvalidReset"; +import LicensesPage from "@/components/Licenses/LicensesPage"; const routes = { "/": () => , diff --git a/src/Routers/routes/AssetRoutes.tsx b/src/Routers/routes/AssetRoutes.tsx index ee0537d6c58..4c32df55069 100644 --- a/src/Routers/routes/AssetRoutes.tsx +++ b/src/Routers/routes/AssetRoutes.tsx @@ -1,7 +1,7 @@ -import AssetConfigure from "../../Components/Assets/AssetConfigure"; -import AssetManage from "../../Components/Assets/AssetManage"; -import AssetsList from "../../Components/Assets/AssetsList"; -import AssetCreate from "../../Components/Facility/AssetCreate"; +import AssetConfigure from "@/components/Assets/AssetConfigure"; +import AssetManage from "@/components/Assets/AssetManage"; +import AssetsList from "@/components/Assets/AssetsList"; +import AssetCreate from "@/components/Facility/AssetCreate"; import { AppRoutes } from "../AppRouter"; const AssetRoutes: AppRoutes = { diff --git a/src/Routers/routes/ConsultationRoutes.tsx b/src/Routers/routes/ConsultationRoutes.tsx index 7f1a7fecfb8..bb804bd7613 100644 --- a/src/Routers/routes/ConsultationRoutes.tsx +++ b/src/Routers/routes/ConsultationRoutes.tsx @@ -1,18 +1,18 @@ -import { ConsultationForm } from "../../Components/Facility/ConsultationForm"; -import Investigation from "../../Components/Facility/Investigations"; -import ShowInvestigation from "../../Components/Facility/Investigations/ShowInvestigation"; -import ManagePrescriptions from "../../Components/Medicine/ManagePrescriptions"; -import { DailyRoundListDetails } from "../../Components/Patient/DailyRoundListDetails"; -import { DailyRounds } from "../../Components/Patient/DailyRounds"; -import { ConsultationDetails } from "../../Components/Facility/ConsultationDetails"; -import TreatmentSummary from "../../Components/Facility/TreatmentSummary"; -import ConsultationDoctorNotes from "../../Components/Facility/ConsultationDoctorNotes"; -import PatientConsentRecords from "../../Components/Patient/PatientConsentRecords"; -import CriticalCareEditor from "../../Components/LogUpdate/CriticalCareEditor"; -import PrescriptionsPrintPreview from "../../Components/Medicine/PrintPreview"; -import CriticalCarePreview from "../../Components/LogUpdate/CriticalCarePreview"; -import FileUploadPage from "../../Components/Patient/FileUploadPage"; -import InvestigationPrintPreview from "../../Components/Facility/Investigations/InvestigationsPrintPreview"; +import { ConsultationForm } from "@/components/Facility/ConsultationForm"; +import Investigation from "@/components/Facility/Investigations"; +import ShowInvestigation from "@/components/Facility/Investigations/ShowInvestigation"; +import ManagePrescriptions from "@/components/Medicine/ManagePrescriptions"; +import { DailyRoundListDetails } from "@/components/Patient/DailyRoundListDetails"; +import { DailyRounds } from "@/components/Patient/DailyRounds"; +import { ConsultationDetails } from "@/components/Facility/ConsultationDetails"; +import TreatmentSummary from "@/components/Facility/TreatmentSummary"; +import ConsultationDoctorNotes from "@/components/Facility/ConsultationDoctorNotes"; +import PatientConsentRecords from "@/components/Patient/PatientConsentRecords"; +import CriticalCareEditor from "@/components/LogUpdate/CriticalCareEditor"; +import PrescriptionsPrintPreview from "@/components/Medicine/PrintPreview"; +import CriticalCarePreview from "@/components/LogUpdate/CriticalCarePreview"; +import FileUploadPage from "@/components/Patient/FileUploadPage"; +import InvestigationPrintPreview from "@/components/Facility/Investigations/InvestigationsPrintPreview"; import { AppRoutes } from "../AppRouter"; const consultationRoutes: AppRoutes = { diff --git a/src/Routers/routes/FacilityInventoryRoutes.tsx b/src/Routers/routes/FacilityInventoryRoutes.tsx index 99123d8f737..3de193ffe08 100644 --- a/src/Routers/routes/FacilityInventoryRoutes.tsx +++ b/src/Routers/routes/FacilityInventoryRoutes.tsx @@ -1,8 +1,8 @@ import { Redirect } from "raviger"; -import InventoryList from "../../Components/Facility/InventoryList"; -import InventoryLog from "../../Components/Facility/InventoryLog"; -import MinQuantityList from "../../Components/Facility/MinQuantityList"; -import { SetInventoryForm } from "../../Components/Facility/SetInventoryForm"; +import InventoryList from "@/components/Facility/InventoryList"; +import InventoryLog from "@/components/Facility/InventoryLog"; +import MinQuantityList from "@/components/Facility/MinQuantityList"; +import { SetInventoryForm } from "@/components/Facility/SetInventoryForm"; import { AppRoutes } from "../AppRouter"; const FacilityInventoryRoutes: AppRoutes = { diff --git a/src/Routers/routes/FacilityLocationRoutes.tsx b/src/Routers/routes/FacilityLocationRoutes.tsx index c2e1add4b10..e2f574664ce 100644 --- a/src/Routers/routes/FacilityLocationRoutes.tsx +++ b/src/Routers/routes/FacilityLocationRoutes.tsx @@ -1,9 +1,9 @@ -import { AddBedForm } from "../../Components/Facility/AddBedForm"; -import { AddInventoryForm } from "../../Components/Facility/AddInventoryForm"; -import { AddLocationForm } from "../../Components/Facility/AddLocationForm"; -import { BedManagement } from "../../Components/Facility/BedManagement"; -import LocationManagement from "../../Components/Facility/LocationManagement"; -import CentralLiveMonitoring from "../../Components/CameraFeed/CentralLiveMonitoring"; +import { AddBedForm } from "@/components/Facility/AddBedForm"; +import { AddInventoryForm } from "@/components/Facility/AddInventoryForm"; +import { AddLocationForm } from "@/components/Facility/AddLocationForm"; +import { BedManagement } from "@/components/Facility/BedManagement"; +import LocationManagement from "@/components/Facility/LocationManagement"; +import CentralLiveMonitoring from "@/components/CameraFeed/CentralLiveMonitoring"; import { AuthorizeUserRoute } from "../../Utils/AuthorizeFor"; import { CameraFeedPermittedUserTypes } from "../../Utils/permissions"; import { AppRoutes } from "../AppRouter"; diff --git a/src/Routers/routes/FacilityRoutes.tsx b/src/Routers/routes/FacilityRoutes.tsx index 16b202ae0ce..e3b787abd9f 100644 --- a/src/Routers/routes/FacilityRoutes.tsx +++ b/src/Routers/routes/FacilityRoutes.tsx @@ -1,14 +1,14 @@ -import { FacilityConfigure } from "../../Components/Facility/FacilityConfigure"; -import { FacilityCreate } from "../../Components/Facility/FacilityCreate"; -import { FacilityHome } from "../../Components/Facility/FacilityHome"; -import FacilityUsers from "../../Components/Facility/FacilityUsers"; -import { FacilityList } from "../../Components/Facility/FacilityList"; -import { TriageForm } from "../../Components/Facility/TriageForm"; -import ResourceCreate from "../../Components/Resource/ResourceCreate"; -import CentralNursingStation from "../../Components/Facility/CentralNursingStation"; +import { FacilityConfigure } from "@/components/Facility/FacilityConfigure"; +import { FacilityCreate } from "@/components/Facility/FacilityCreate"; +import { FacilityHome } from "@/components/Facility/FacilityHome"; +import FacilityUsers from "@/components/Facility/FacilityUsers"; +import { FacilityList } from "@/components/Facility/FacilityList"; +import { TriageForm } from "@/components/Facility/TriageForm"; +import ResourceCreate from "@/components/Resource/ResourceCreate"; +import CentralNursingStation from "@/components/Facility/CentralNursingStation"; import FacilityLocationRoutes from "./FacilityLocationRoutes"; import FacilityInventoryRoutes from "./FacilityInventoryRoutes"; -import DischargedPatientsList from "../../Components/Facility/DischargedPatientsList"; +import DischargedPatientsList from "@/components/Facility/DischargedPatientsList"; import { AppRoutes } from "../AppRouter"; const FacilityRoutes: AppRoutes = { diff --git a/src/Routers/routes/HCXRoutes.tsx b/src/Routers/routes/HCXRoutes.tsx index 929cc3f12bb..00339161a24 100644 --- a/src/Routers/routes/HCXRoutes.tsx +++ b/src/Routers/routes/HCXRoutes.tsx @@ -1,4 +1,4 @@ -import ConsultationClaims from "../../Components/Facility/ConsultationClaims"; +import ConsultationClaims from "@/components/Facility/ConsultationClaims"; import { AppRoutes } from "../AppRouter"; const HCXRoutes: AppRoutes = { diff --git a/src/Routers/routes/PatientRoutes.tsx b/src/Routers/routes/PatientRoutes.tsx index 45ff044e4d2..8f9d8bd460f 100644 --- a/src/Routers/routes/PatientRoutes.tsx +++ b/src/Routers/routes/PatientRoutes.tsx @@ -1,11 +1,11 @@ -import InvestigationReports from "../../Components/Facility/Investigations/Reports"; -import { PatientManager } from "../../Components/Patient/ManagePatients"; -import { PatientHome } from "../../Components/Patient/PatientHome"; -import PatientNotes from "../../Components/Patient/PatientNotes"; -import { PatientRegister } from "../../Components/Patient/PatientRegister"; -import DeathReport from "../../Components/DeathReport/DeathReport"; -import { InsuranceDetails } from "../../Components/Patient/InsuranceDetails"; -import FileUploadPage from "../../Components/Patient/FileUploadPage"; +import InvestigationReports from "@/components/Facility/Investigations/Reports"; +import { PatientManager } from "@/components/Patient/ManagePatients"; +import { PatientHome } from "@/components/Patient/PatientHome"; +import PatientNotes from "@/components/Patient/PatientNotes"; +import { PatientRegister } from "@/components/Patient/PatientRegister"; +import DeathReport from "@/components/DeathReport/DeathReport"; +import { InsuranceDetails } from "@/components/Patient/InsuranceDetails"; +import FileUploadPage from "@/components/Patient/FileUploadPage"; import { AppRoutes } from "../AppRouter"; const PatientRoutes: AppRoutes = { diff --git a/src/Routers/routes/ResourceRoutes.tsx b/src/Routers/routes/ResourceRoutes.tsx index d75c933f760..a1cc70f9aa7 100644 --- a/src/Routers/routes/ResourceRoutes.tsx +++ b/src/Routers/routes/ResourceRoutes.tsx @@ -1,7 +1,7 @@ -import ResourceDetails from "../../Components/Resource/ResourceDetails"; -import { ResourceDetailsUpdate } from "../../Components/Resource/ResourceDetailsUpdate"; -import ListView from "../../Components/Resource/ListView"; -import BoardView from "../../Components/Resource/ResourceBoardView"; +import ResourceDetails from "@/components/Resource/ResourceDetails"; +import { ResourceDetailsUpdate } from "@/components/Resource/ResourceDetailsUpdate"; +import ListView from "@/components/Resource/ListView"; +import BoardView from "@/components/Resource/ResourceBoardView"; import { Redirect } from "raviger"; import { AppRoutes } from "../AppRouter"; diff --git a/src/Routers/routes/SampleRoutes.tsx b/src/Routers/routes/SampleRoutes.tsx index cf296790a81..a09f5603a62 100644 --- a/src/Routers/routes/SampleRoutes.tsx +++ b/src/Routers/routes/SampleRoutes.tsx @@ -1,7 +1,7 @@ -import { SampleDetails } from "../../Components/Patient/SampleDetails"; -import SampleReport from "../../Components/Patient/SamplePreview"; -import { SampleTest } from "../../Components/Patient/SampleTest"; -import SampleViewAdmin from "../../Components/Patient/SampleViewAdmin"; +import { SampleDetails } from "@/components/Patient/SampleDetails"; +import SampleReport from "@/components/Patient/SamplePreview"; +import { SampleTest } from "@/components/Patient/SampleTest"; +import SampleViewAdmin from "@/components/Patient/SampleViewAdmin"; import { AppRoutes } from "../AppRouter"; const SampleRoutes: AppRoutes = { diff --git a/src/Routers/routes/ShiftingRoutes.tsx b/src/Routers/routes/ShiftingRoutes.tsx index dc11ff2b8ee..c4a3235857a 100644 --- a/src/Routers/routes/ShiftingRoutes.tsx +++ b/src/Routers/routes/ShiftingRoutes.tsx @@ -1,8 +1,8 @@ -import { ShiftCreate } from "../../Components/Patient/ShiftCreate"; -import ShiftDetails from "../../Components/Shifting/ShiftDetails"; -import { ShiftDetailsUpdate } from "../../Components/Shifting/ShiftDetailsUpdate"; -import ListView from "../../Components/Shifting/ListView"; -import BoardView from "../../Components/Shifting/BoardView"; +import { ShiftCreate } from "@/components/Patient/ShiftCreate"; +import ShiftDetails from "@/components/Shifting/ShiftDetails"; +import { ShiftDetailsUpdate } from "@/components/Shifting/ShiftDetailsUpdate"; +import ListView from "@/components/Shifting/ListView"; +import BoardView from "@/components/Shifting/BoardView"; import { Redirect } from "raviger"; import { AppRoutes } from "../AppRouter"; diff --git a/src/Routers/routes/UserRoutes.tsx b/src/Routers/routes/UserRoutes.tsx index 24f355b201b..d7542c15a15 100644 --- a/src/Routers/routes/UserRoutes.tsx +++ b/src/Routers/routes/UserRoutes.tsx @@ -1,6 +1,6 @@ -import ManageUsers from "../../Components/Users/ManageUsers"; -import { UserAdd } from "../../Components/Users/UserAdd"; -import UserProfile from "../../Components/Users/UserProfile"; +import ManageUsers from "@/components/Users/ManageUsers"; +import { UserAdd } from "@/components/Users/UserAdd"; +import UserProfile from "@/components/Users/UserProfile"; import { AppRoutes } from "../AppRouter"; const UserRoutes: AppRoutes = { diff --git a/src/Utils/AuthorizeFor.tsx b/src/Utils/AuthorizeFor.tsx index 614325ddd25..6e1e048ee4e 100644 --- a/src/Utils/AuthorizeFor.tsx +++ b/src/Utils/AuthorizeFor.tsx @@ -1,7 +1,7 @@ -import { UserRole } from "../Common/constants"; +import { UserRole } from "@/common/constants"; import React from "react"; -import useAuthUser from "../Common/hooks/useAuthUser"; -import Error404 from "../Components/ErrorPages/404"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import Error404 from "@/components/ErrorPages/404"; export type AuthorizedForCB = (userType: UserRole) => boolean; diff --git a/src/Utils/AutoSave.tsx b/src/Utils/AutoSave.tsx index dd251f5bbb7..45217dd51b4 100644 --- a/src/Utils/AutoSave.tsx +++ b/src/Utils/AutoSave.tsx @@ -7,8 +7,8 @@ import React, { useContext, ReactNode, } from "react"; -import { Button } from "../Components/ui/button"; -import { FormAction, FormReducer, FormState } from "../Components/Form/Utils"; +import { Button } from "@/components/ui/button"; +import { FormAction, FormReducer, FormState } from "@/components/Form/Utils"; import { relativeTime } from "./utils"; import CareIcon from "@/CAREUI/icons/CareIcon"; diff --git a/src/Utils/featureFlags.tsx b/src/Utils/featureFlags.tsx index 739d49e821a..7a1fd85e28b 100644 --- a/src/Utils/featureFlags.tsx +++ b/src/Utils/featureFlags.tsx @@ -1,8 +1,8 @@ import { createContext, useContext, useState, useEffect } from "react"; import useQuery from "./request/useQuery"; import routes from "../Redux/api"; -import useAuthUser from "../Common/hooks/useAuthUser"; -import { FacilityModel } from "../Components/Facility/models"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import { FacilityModel } from "@/components/Facility/models"; export type FeatureFlag = "SCRIBE_ENABLED"; // "HCX_ENABLED" | "ABDM_ENABLED" | diff --git a/src/Utils/permissions.ts b/src/Utils/permissions.ts index 0310d0ad8dd..3037f23c9f7 100644 --- a/src/Utils/permissions.ts +++ b/src/Utils/permissions.ts @@ -1,5 +1,5 @@ -import { USER_TYPES, UserRole } from "../Common/constants"; -import { UserModel } from "../Components/Users/models"; +import { USER_TYPES, UserRole } from "@/common/constants"; +import { UserModel } from "@/components/Users/models"; export const showUserDelete = (authUser: UserModel, targetUser: UserModel) => { // Auth user should be higher in hierarchy than target user diff --git a/src/Utils/request/uploadFile.ts b/src/Utils/request/uploadFile.ts index c527878e283..ca62672f642 100644 --- a/src/Utils/request/uploadFile.ts +++ b/src/Utils/request/uploadFile.ts @@ -1,6 +1,6 @@ import { Dispatch, SetStateAction } from "react"; import { handleUploadPercentage } from "./utils"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; const uploadFile = ( url: string, diff --git a/src/Utils/request/utils.ts b/src/Utils/request/utils.ts index bf5f609c175..2734625e196 100644 --- a/src/Utils/request/utils.ts +++ b/src/Utils/request/utils.ts @@ -1,5 +1,5 @@ import { Dispatch, SetStateAction } from "react"; -import { LocalStorageKeys } from "../../Common/constants"; +import { LocalStorageKeys } from "@/common/constants"; import * as Notification from "../Notifications"; import { QueryParams, RequestOptions } from "./types"; diff --git a/src/Utils/transformUtils.ts b/src/Utils/transformUtils.ts index 4aa63da734c..662af2ed3c6 100644 --- a/src/Utils/transformUtils.ts +++ b/src/Utils/transformUtils.ts @@ -1,4 +1,4 @@ -import { AssetData } from "../Components/Assets/AssetTypes"; +import { AssetData } from "@/components/Assets/AssetTypes"; export const getCameraConfig = (meta: AssetData["meta"]) => { return { diff --git a/src/Utils/types.ts b/src/Utils/types.ts index 519ede36ffc..5ac29c5862c 100644 --- a/src/Utils/types.ts +++ b/src/Utils/types.ts @@ -1,4 +1,4 @@ -import { PerformedByModel } from "../Components/HCX/misc"; +import { PerformedByModel } from "@/components/HCX/misc"; export interface BaseModel { readonly id: string; diff --git a/src/Utils/useFileManager.tsx b/src/Utils/useFileManager.tsx index 93ddd3ad479..ef935446689 100644 --- a/src/Utils/useFileManager.tsx +++ b/src/Utils/useFileManager.tsx @@ -1,20 +1,20 @@ import { useState } from "react"; -import FilePreviewDialog from "../Components/Common/FilePreviewDialog"; -import { FileUploadModel } from "../Components/Patient/models"; -import { StateInterface } from "../Components/Files/FileUpload"; +import FilePreviewDialog from "@/components/Common/FilePreviewDialog"; +import { FileUploadModel } from "@/components/Patient/models"; +import { StateInterface } from "@/components/Files/FileUpload"; import request from "./request/request"; import routes from "../Redux/api"; -import DialogModal from "../Components/Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import CareIcon from "../CAREUI/icons/CareIcon"; -import TextAreaFormField from "../Components/Form/FormFields/TextAreaFormField"; -import { Cancel, Submit } from "../Components/Common/components/ButtonV2"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { formatDateTime } from "./utils"; -import * as Notification from "./Notifications.js"; -import TextFormField from "../Components/Form/FormFields/TextFormField"; +import * as Notification from "./Notifications"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; import { FILE_EXTENSIONS, PREVIEWABLE_FILE_EXTENSIONS, -} from "../Common/constants"; +} from "@/common/constants"; export interface FileManagerOptions { type: string; diff --git a/src/Utils/useFileUpload.tsx b/src/Utils/useFileUpload.tsx index a0888643414..3181abad9b9 100644 --- a/src/Utils/useFileUpload.tsx +++ b/src/Utils/useFileUpload.tsx @@ -9,15 +9,15 @@ import { CreateFileResponse, FileCategory, FileUploadModel, -} from "../Components/Patient/models"; +} from "@/components/Patient/models"; import request from "./request/request"; import routes from "../Redux/api"; import uploadFile from "./request/uploadFile"; -import * as Notification from "./Notifications.js"; +import * as Notification from "./Notifications"; import imageCompression from "browser-image-compression"; -import { DEFAULT_ALLOWED_EXTENSIONS } from "../Common/constants"; -import CameraCaptureDialog from "../Components/Files/CameraCaptureDialog"; -import AudioCaptureDialog from "../Components/Files/AudioCaptureDialog"; +import { DEFAULT_ALLOWED_EXTENSIONS } from "@/common/constants"; +import CameraCaptureDialog from "@/components/Files/CameraCaptureDialog"; +import AudioCaptureDialog from "@/components/Files/AudioCaptureDialog"; import { t } from "i18next"; export type FileUploadOptions = { diff --git a/src/Utils/utils.ts b/src/Utils/utils.ts index e4e0b983368..4ba10746d61 100644 --- a/src/Utils/utils.ts +++ b/src/Utils/utils.ts @@ -1,7 +1,7 @@ -import { AREACODES, IN_LANDLINE_AREA_CODES } from "../Common/constants"; -import phoneCodesJson from "../Common/static/countryPhoneAndFlags.json"; +import { AREACODES, IN_LANDLINE_AREA_CODES } from "@/common/constants"; +import phoneCodesJson from "@/common/static/countryPhoneAndFlags.json"; import dayjs from "./dayjs"; -import { PatientModel } from "../Components/Patient/models"; +import { PatientModel } from "@/components/Patient/models"; interface ApacheParams { age: number; diff --git a/src/Common/constants.tsx b/src/common/constants.tsx similarity index 99% rename from src/Common/constants.tsx rename to src/common/constants.tsx index c5e221fb277..252d5cb22eb 100644 --- a/src/Common/constants.tsx +++ b/src/common/constants.tsx @@ -1,16 +1,13 @@ import { PatientCategory, SpokeRelationship, -} from "../Components/Facility/models"; -import { SortOption } from "../Components/Common/SortDropdown"; +} from "@/components/Facility/models"; +import { SortOption } from "@/components/Common/SortDropdown"; import { dateQueryString } from "../Utils/utils"; import { IconName } from "../CAREUI/icons/CareIcon"; -import { PhoneNumberValidator } from "../Components/Form/FieldValidators"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; import { SchemaType } from "./schemaParser"; -import { - ConsentHIType, - ConsentPurpose, -} from "../Components/ABDM/types/consent"; +import { ConsentHIType, ConsentPurpose } from "@/components/ABDM/types/consent"; export const RESULTS_PER_PAGE_LIMIT = 14; export const PAGINATION_LIMIT = 36; diff --git a/src/Common/hooks/useActiveLink.ts b/src/common/hooks/useActiveLink.ts similarity index 100% rename from src/Common/hooks/useActiveLink.ts rename to src/common/hooks/useActiveLink.ts diff --git a/src/Common/hooks/useAppHistory.ts b/src/common/hooks/useAppHistory.ts similarity index 100% rename from src/Common/hooks/useAppHistory.ts rename to src/common/hooks/useAppHistory.ts diff --git a/src/Common/hooks/useAuthUser.ts b/src/common/hooks/useAuthUser.ts similarity index 94% rename from src/Common/hooks/useAuthUser.ts rename to src/common/hooks/useAuthUser.ts index ae181f62ca8..2b492c23a54 100644 --- a/src/Common/hooks/useAuthUser.ts +++ b/src/common/hooks/useAuthUser.ts @@ -1,5 +1,5 @@ import { createContext, useContext } from "react"; -import { UserModel } from "../../Components/Users/models"; +import { UserModel } from "@/components/Users/models"; import { RequestResult } from "../../Utils/request/types"; import { JwtTokenObtainPair, LoginCredentials } from "../../Redux/api"; diff --git a/src/Common/hooks/useBreakpoints.ts b/src/common/hooks/useBreakpoints.ts similarity index 100% rename from src/Common/hooks/useBreakpoints.ts rename to src/common/hooks/useBreakpoints.ts diff --git a/src/Common/hooks/useCanvas.ts b/src/common/hooks/useCanvas.ts similarity index 100% rename from src/Common/hooks/useCanvas.ts rename to src/common/hooks/useCanvas.ts diff --git a/src/Common/hooks/useCareApps.ts b/src/common/hooks/useCareApps.ts similarity index 94% rename from src/Common/hooks/useCareApps.ts rename to src/common/hooks/useCareApps.ts index 77b5489052e..758a4ac4349 100644 --- a/src/Common/hooks/useCareApps.ts +++ b/src/common/hooks/useCareApps.ts @@ -1,6 +1,6 @@ import { createContext, useContext } from "react"; -import { INavItem } from "@/Components/Common/Sidebar/Sidebar"; import { PluginManifest } from "@/pluginTypes"; +import { INavItem } from "@/components/Common/Sidebar/Sidebar"; export const CareAppsContext = createContext([]); diff --git a/src/Common/hooks/useConfirmedAction.ts b/src/common/hooks/useConfirmedAction.ts similarity index 100% rename from src/Common/hooks/useConfirmedAction.ts rename to src/common/hooks/useConfirmedAction.ts diff --git a/src/Common/hooks/useExport.tsx b/src/common/hooks/useExport.tsx similarity index 100% rename from src/Common/hooks/useExport.tsx rename to src/common/hooks/useExport.tsx diff --git a/src/Common/hooks/useFilters.tsx b/src/common/hooks/useFilters.tsx similarity index 99% rename from src/Common/hooks/useFilters.tsx rename to src/common/hooks/useFilters.tsx index a6974a5a43b..49e1d9fe0e2 100644 --- a/src/Common/hooks/useFilters.tsx +++ b/src/common/hooks/useFilters.tsx @@ -2,7 +2,7 @@ import { QueryParam, setQueryParamsOptions, useQueryParams } from "raviger"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import GenericFilterBadge from "../../CAREUI/display/FilterBadge"; -import PaginationComponent from "../../Components/Common/Pagination"; +import PaginationComponent from "@/components/Common/Pagination"; import { classNames, humanizeStrings } from "../../Utils/utils"; import FiltersCache from "../../Utils/FiltersCache"; import careConfig from "@careConfig"; diff --git a/src/Common/hooks/useFullscreen.ts b/src/common/hooks/useFullscreen.ts similarity index 100% rename from src/Common/hooks/useFullscreen.ts rename to src/common/hooks/useFullscreen.ts diff --git a/src/Common/hooks/useIsAuthorized.ts b/src/common/hooks/useIsAuthorized.ts similarity index 100% rename from src/Common/hooks/useIsAuthorized.ts rename to src/common/hooks/useIsAuthorized.ts diff --git a/src/Common/hooks/useMergeState.js b/src/common/hooks/useMergeState.js similarity index 100% rename from src/Common/hooks/useMergeState.js rename to src/common/hooks/useMergeState.js diff --git a/src/Common/hooks/useMessageListener.ts b/src/common/hooks/useMessageListener.ts similarity index 100% rename from src/Common/hooks/useMessageListener.ts rename to src/common/hooks/useMessageListener.ts diff --git a/src/Common/hooks/useNotificationSubscriptionState.ts b/src/common/hooks/useNotificationSubscriptionState.ts similarity index 100% rename from src/Common/hooks/useNotificationSubscriptionState.ts rename to src/common/hooks/useNotificationSubscriptionState.ts diff --git a/src/Common/hooks/useRangePagination.ts b/src/common/hooks/useRangePagination.ts similarity index 100% rename from src/Common/hooks/useRangePagination.ts rename to src/common/hooks/useRangePagination.ts diff --git a/src/Common/hooks/useSlug.ts b/src/common/hooks/useSlug.ts similarity index 100% rename from src/Common/hooks/useSlug.ts rename to src/common/hooks/useSlug.ts diff --git a/src/Common/hooks/useWindowDimensions.ts b/src/common/hooks/useWindowDimensions.ts similarity index 100% rename from src/Common/hooks/useWindowDimensions.ts rename to src/common/hooks/useWindowDimensions.ts diff --git a/src/Common/schemaParser.ts b/src/common/schemaParser.ts similarity index 100% rename from src/Common/schemaParser.ts rename to src/common/schemaParser.ts diff --git a/src/Common/static/countries.json b/src/common/static/countries.json similarity index 100% rename from src/Common/static/countries.json rename to src/common/static/countries.json diff --git a/src/Common/static/countryPhoneAndFlags.json b/src/common/static/countryPhoneAndFlags.json similarity index 100% rename from src/Common/static/countryPhoneAndFlags.json rename to src/common/static/countryPhoneAndFlags.json diff --git a/src/Common/static/states.json b/src/common/static/states.json similarity index 100% rename from src/Common/static/states.json rename to src/common/static/states.json diff --git a/src/Common/utils.tsx b/src/common/utils.tsx similarity index 100% rename from src/Common/utils.tsx rename to src/common/utils.tsx diff --git a/src/Common/validation.tsx b/src/common/validation.tsx similarity index 100% rename from src/Common/validation.tsx rename to src/common/validation.tsx diff --git a/src/Components/ABDM/ABDMFacilityRecords.tsx b/src/components/ABDM/ABDMFacilityRecords.tsx similarity index 97% rename from src/Components/ABDM/ABDMFacilityRecords.tsx rename to src/components/ABDM/ABDMFacilityRecords.tsx index 5844e0359b5..3e23e82fc8f 100644 --- a/src/Components/ABDM/ABDMFacilityRecords.tsx +++ b/src/components/ABDM/ABDMFacilityRecords.tsx @@ -2,10 +2,10 @@ import { Link } from "raviger"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; import { classNames, formatDateTime } from "../../Utils/utils"; -import Loading from "../Common/Loading"; -import Page from "../Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/components/Page"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; interface IProps { diff --git a/src/Components/ABDM/ABDMRecordsTab.tsx b/src/components/ABDM/ABDMRecordsTab.tsx similarity index 97% rename from src/Components/ABDM/ABDMRecordsTab.tsx rename to src/components/ABDM/ABDMRecordsTab.tsx index d1dc854984f..d97edbb0cc2 100644 --- a/src/Components/ABDM/ABDMRecordsTab.tsx +++ b/src/components/ABDM/ABDMRecordsTab.tsx @@ -1,9 +1,9 @@ import { ConsentArtefactModel, ConsentRequestModel } from "./types/consent"; import dayjs from "dayjs"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; -import * as Notification from "../../Utils/Notifications.js"; -import Loading from "../Common/Loading"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications"; +import Loading from "@/components/Common/Loading"; import { classNames, formatName } from "../../Utils/utils"; import { Link } from "raviger"; import routes from "../../Redux/api"; diff --git a/src/Components/ABDM/ABHAProfileModal.tsx b/src/components/ABDM/ABHAProfileModal.tsx similarity index 98% rename from src/Components/ABDM/ABHAProfileModal.tsx rename to src/components/ABDM/ABHAProfileModal.tsx index 87d5369d191..f242a1e2fa8 100644 --- a/src/Components/ABDM/ABHAProfileModal.tsx +++ b/src/components/ABDM/ABHAProfileModal.tsx @@ -1,7 +1,7 @@ import * as Notify from "../../Utils/Notifications"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import QRCode from "qrcode.react"; import { formatDateTime } from "../../Utils/utils"; import { useRef } from "react"; diff --git a/src/Components/ABDM/ConfigureHealthFacility.tsx b/src/components/ABDM/ConfigureHealthFacility.tsx similarity index 95% rename from src/Components/ABDM/ConfigureHealthFacility.tsx rename to src/components/ABDM/ConfigureHealthFacility.tsx index 495f2e5d4f6..78b71e58bc3 100644 --- a/src/Components/ABDM/ConfigureHealthFacility.tsx +++ b/src/components/ABDM/ConfigureHealthFacility.tsx @@ -1,17 +1,17 @@ import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; -import { Submit } from "../Common/components/ButtonV2"; +import { Submit } from "@/components/Common/components/ButtonV2"; import TextFormField from "../Form/FormFields/TextFormField"; import { classNames } from "../../Utils/utils"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import { FieldChangeEvent } from "../Form/FormFields/Utils.js"; -import { IHealthFacility } from "./types/health-facility.js"; +import { FieldChangeEvent } from "../Form/FormFields/Utils"; +import { IHealthFacility } from "./types/health-facility"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const initForm = { health_facility: null as IHealthFacility | null, hf_id: "", diff --git a/src/Components/ABDM/FetchRecordsModal.tsx b/src/components/ABDM/FetchRecordsModal.tsx similarity index 92% rename from src/Components/ABDM/FetchRecordsModal.tsx rename to src/components/ABDM/FetchRecordsModal.tsx index 3da4af9199b..34d70255846 100644 --- a/src/Components/ABDM/FetchRecordsModal.tsx +++ b/src/components/ABDM/FetchRecordsModal.tsx @@ -1,23 +1,23 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; -import ButtonV2 from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; import TextFormField from "../Form/FormFields/TextFormField"; import { useState } from "react"; import { MultiSelectFormField, SelectFormField, -} from "../Form/FormFields/SelectFormField.js"; -import { ABDM_CONSENT_PURPOSE, ABDM_HI_TYPE } from "../../Common/constants.js"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField.js"; +} from "../Form/FormFields/SelectFormField"; +import { ABDM_CONSENT_PURPOSE, ABDM_HI_TYPE } from "@/common/constants"; +import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; import dayjs from "dayjs"; import { navigate } from "raviger"; -import DateFormField from "../Form/FormFields/DateFormField.js"; -import request from "../../Utils/request/request.js"; +import DateFormField from "../Form/FormFields/DateFormField"; +import request from "../../Utils/request/request"; import routes from "../../Redux/api"; -import { useMessageListener } from "../../Common/hooks/useMessageListener.js"; -import { AbhaNumberModel } from "./types/abha.js"; -import { ConsentHIType, ConsentPurpose } from "./types/consent.js"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; +import { AbhaNumberModel } from "./types/abha"; +import { ConsentHIType, ConsentPurpose } from "./types/consent"; import { useTranslation } from "react-i18next"; const getDate = (value: string | Date) => diff --git a/src/Components/ABDM/HealthInformation.tsx b/src/components/ABDM/HealthInformation.tsx similarity index 95% rename from src/Components/ABDM/HealthInformation.tsx rename to src/components/ABDM/HealthInformation.tsx index dd5a279bc1c..e3571c90d9f 100644 --- a/src/Components/ABDM/HealthInformation.tsx +++ b/src/components/ABDM/HealthInformation.tsx @@ -1,8 +1,8 @@ import { useTranslation } from "react-i18next"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import Loading from "../Common/Loading"; -import Page from "../Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/components/Page"; import { HIProfile } from "hi-profiles"; interface IProps { diff --git a/src/Components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx b/src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx similarity index 99% rename from src/Components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx rename to src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx index e2fff0e51e6..dc2b5ff7ef6 100644 --- a/src/Components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx +++ b/src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx @@ -3,7 +3,9 @@ import useMultiStepForm, { InjectedStepProps } from "./useMultiStepForm"; import { classNames } from "../../../Utils/utils"; import TextFormField from "../../Form/FormFields/TextFormField"; import { useEffect, useState } from "react"; -import ButtonV2, { ButtonWithTimer } from "../../Common/components/ButtonV2"; +import ButtonV2, { + ButtonWithTimer, +} from "@/components/Common/components/ButtonV2"; import OtpFormField from "../../Form/FormFields/OtpFormField"; import PhoneNumberFormField from "../../Form/FormFields/PhoneNumberFormField"; import { AbhaNumberModel } from "../types/abha"; diff --git a/src/Components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx b/src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx similarity index 98% rename from src/Components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx rename to src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx index 5e71b1a19fc..2ca9dbfc5f4 100644 --- a/src/Components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx +++ b/src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx @@ -4,8 +4,10 @@ import useMultiStepForm, { InjectedStepProps } from "./useMultiStepForm"; import { useMemo, useState } from "react"; import TextFormField from "../../Form/FormFields/TextFormField"; import { classNames } from "../../../Utils/utils"; -import ButtonV2, { ButtonWithTimer } from "../../Common/components/ButtonV2"; -import Dropdown, { DropdownItem } from "../../Common/components/Menu"; +import ButtonV2, { + ButtonWithTimer, +} from "@/components/Common/components/ButtonV2"; +import Dropdown, { DropdownItem } from "@/components/Common/components/Menu"; import OtpFormField from "../../Form/FormFields/OtpFormField"; import * as Notify from "../../../Utils/Notifications"; import request from "../../../Utils/request/request"; diff --git a/src/Components/ABDM/LinkAbhaNumber/LinkWithQr.tsx b/src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx similarity index 96% rename from src/Components/ABDM/LinkAbhaNumber/LinkWithQr.tsx rename to src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx index 7f9f9c7d853..4e91f89b384 100644 --- a/src/Components/ABDM/LinkAbhaNumber/LinkWithQr.tsx +++ b/src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; import { AbhaNumberModel, ABHAQRContent } from "../types/abha"; -import * as Notification from "../../../Utils/Notifications.js"; +import * as Notification from "../../../Utils/Notifications"; import { Scanner, IDetectedBarcode } from "@yudiel/react-qr-scanner"; import request from "../../../Utils/request/request"; diff --git a/src/Components/ABDM/LinkAbhaNumber/index.tsx b/src/components/ABDM/LinkAbhaNumber/index.tsx similarity index 97% rename from src/Components/ABDM/LinkAbhaNumber/index.tsx rename to src/components/ABDM/LinkAbhaNumber/index.tsx index f3ad9911197..d8e4e955be2 100644 --- a/src/Components/ABDM/LinkAbhaNumber/index.tsx +++ b/src/components/ABDM/LinkAbhaNumber/index.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; -import DialogModal from "../../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import { AbhaNumberModel } from "../types/abha"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { classNames } from "../../../Utils/utils"; import CreateWithAadhaar from "./CreateWithAadhaar"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/ABDM/LinkAbhaNumber/useMultiStepForm.ts b/src/components/ABDM/LinkAbhaNumber/useMultiStepForm.ts similarity index 100% rename from src/Components/ABDM/LinkAbhaNumber/useMultiStepForm.ts rename to src/components/ABDM/LinkAbhaNumber/useMultiStepForm.ts diff --git a/src/Components/ABDM/types/abha.ts b/src/components/ABDM/types/abha.ts similarity index 100% rename from src/Components/ABDM/types/abha.ts rename to src/components/ABDM/types/abha.ts diff --git a/src/Components/ABDM/types/consent.ts b/src/components/ABDM/types/consent.ts similarity index 100% rename from src/Components/ABDM/types/consent.ts rename to src/components/ABDM/types/consent.ts diff --git a/src/Components/ABDM/types/health-facility.ts b/src/components/ABDM/types/health-facility.ts similarity index 100% rename from src/Components/ABDM/types/health-facility.ts rename to src/components/ABDM/types/health-facility.ts diff --git a/src/Components/ABDM/types/health-information.ts b/src/components/ABDM/types/health-information.ts similarity index 100% rename from src/Components/ABDM/types/health-information.ts rename to src/components/ABDM/types/health-information.ts diff --git a/src/Components/Assets/AssetConfigure.tsx b/src/components/Assets/AssetConfigure.tsx similarity index 94% rename from src/Components/Assets/AssetConfigure.tsx rename to src/components/Assets/AssetConfigure.tsx index 9f5f73f296d..9f04bddc321 100644 --- a/src/Components/Assets/AssetConfigure.tsx +++ b/src/components/Assets/AssetConfigure.tsx @@ -1,7 +1,7 @@ -import Loading from "../Common/Loading"; +import Loading from "@/components/Common/Loading"; import HL7Monitor from "./AssetType/HL7Monitor"; import ConfigureCamera from "../CameraFeed/ConfigureCamera"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; diff --git a/src/Components/Assets/AssetFilter.tsx b/src/components/Assets/AssetFilter.tsx similarity index 96% rename from src/Components/Assets/AssetFilter.tsx rename to src/components/Assets/AssetFilter.tsx index bf07bad4b09..8095b96389e 100644 --- a/src/Components/Assets/AssetFilter.tsx +++ b/src/components/Assets/AssetFilter.tsx @@ -1,8 +1,8 @@ import { useState, useEffect } from "react"; import { useQueryParams } from "raviger"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FacilityModel } from "../Facility/models"; -import { LocationSelect } from "../Common/LocationSelect"; +import { LocationSelect } from "@/components/Common/LocationSelect"; import { AssetClass } from "./AssetTypes"; import { FieldLabel } from "../Form/FormFields/FormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; @@ -12,7 +12,7 @@ import useQuery from "../../Utils/request/useQuery"; import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; import dayjs from "dayjs"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { DateRange } from "../Common/DateRangeInputV2"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; import { dateQueryString } from "../../Utils/utils"; const getDate = (value: any) => diff --git a/src/Components/Assets/AssetImportModal.tsx b/src/components/Assets/AssetImportModal.tsx similarity index 94% rename from src/Components/Assets/AssetImportModal.tsx rename to src/components/Assets/AssetImportModal.tsx index 9be1c393960..08fd4891078 100644 --- a/src/Components/Assets/AssetImportModal.tsx +++ b/src/components/Assets/AssetImportModal.tsx @@ -2,11 +2,11 @@ import { lazy, useState } from "react"; import { sleep } from "../../Utils/utils"; import { FacilityModel } from "../Facility/models"; import { AssetData } from "./AssetTypes"; -import * as Notification from "../../Utils/Notifications.js"; -import { Cancel } from "../Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications"; +import { Cancel } from "@/components/Common/components/ButtonV2"; import { Link } from "raviger"; -import { AssetImportSchema } from "../../Common/constants"; -import DialogModal from "../Common/Dialog"; +import { AssetImportSchema } from "@/common/constants"; +import DialogModal from "@/components/Common/Dialog"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; @@ -14,7 +14,7 @@ import careConfig from "@careConfig"; import request from "../../Utils/request/request"; const ExcelFileDragAndDrop = lazy( - () => import("../Common/ExcelFIleDragAndDrop"), + () => import("@/components/Common/ExcelFIleDragAndDrop"), ); interface Props { diff --git a/src/Components/Assets/AssetManage.tsx b/src/components/Assets/AssetManage.tsx similarity index 97% rename from src/Components/Assets/AssetManage.tsx rename to src/components/Assets/AssetManage.tsx index 69c8bc92f97..05eab3a4dec 100644 --- a/src/Components/Assets/AssetManage.tsx +++ b/src/components/Assets/AssetManage.tsx @@ -6,28 +6,28 @@ import { AssetService, AssetTransaction, } from "./AssetTypes"; -import Pagination from "../Common/Pagination"; +import Pagination from "@/components/Common/Pagination"; import { navigate } from "raviger"; import QRCode from "qrcode.react"; import AssetWarrantyCard from "./AssetWarrantyCard"; import { formatDate, formatDateTime, formatName } from "../../Utils/utils"; import Chip from "../../CAREUI/display/Chip"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { UserRole, USER_TYPES } from "../../Common/constants"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import { UserRole, USER_TYPES } from "@/common/constants"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; -import * as Notification from "../../Utils/Notifications.js"; +import Loading from "@/components/Common/Loading"; +import * as Notification from "../../Utils/Notifications"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Uptime from "../Common/Uptime"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import Uptime from "@/components/Common/Uptime"; +import useAuthUser from "@/common/hooks/useAuthUser"; import dayjs from "dayjs"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; import { AssetServiceEditModal } from "./AssetServiceEditModal"; import { warrantyAmcValidityChip } from "./AssetsList"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; diff --git a/src/Components/Assets/AssetServiceEditModal.tsx b/src/components/Assets/AssetServiceEditModal.tsx similarity index 97% rename from src/Components/Assets/AssetServiceEditModal.tsx rename to src/components/Assets/AssetServiceEditModal.tsx index 196a902b450..9accf5c3d66 100644 --- a/src/Components/Assets/AssetServiceEditModal.tsx +++ b/src/components/Assets/AssetServiceEditModal.tsx @@ -1,7 +1,10 @@ import { useEffect, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; +import * as Notification from "../../Utils/Notifications"; +import ButtonV2, { + Cancel, + Submit, +} from "@/components/Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; import { AssetData, AssetService, AssetServiceEdit } from "./AssetTypes"; import dayjs from "dayjs"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; diff --git a/src/Components/Assets/AssetType/HL7Monitor.tsx b/src/components/Assets/AssetType/HL7Monitor.tsx similarity index 95% rename from src/Components/Assets/AssetType/HL7Monitor.tsx rename to src/components/Assets/AssetType/HL7Monitor.tsx index 383af38fa28..43e968f33eb 100644 --- a/src/Components/Assets/AssetType/HL7Monitor.tsx +++ b/src/components/Assets/AssetType/HL7Monitor.tsx @@ -1,21 +1,21 @@ import { SyntheticEvent, useEffect, useState } from "react"; import { AssetClass, AssetData, ResolvedMiddleware } from "../AssetTypes"; -import * as Notification from "../../../Utils/Notifications.js"; -import Loading from "../../Common/Loading"; -import { checkIfValidIP } from "../../../Common/validation"; +import * as Notification from "../../../Utils/Notifications"; +import Loading from "@/components/Common/Loading"; +import { checkIfValidIP } from "@/common/validation"; import Card from "../../../CAREUI/display/Card"; -import { Submit } from "../../Common/components/ButtonV2"; +import { Submit } from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import TextFormField from "../../Form/FormFields/TextFormField"; import HL7PatientVitalsMonitor from "../../VitalsMonitor/HL7PatientVitalsMonitor"; import VentilatorPatientVitalsMonitor from "../../VitalsMonitor/VentilatorPatientVitalsMonitor"; -import useAuthUser from "../../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import request from "../../../Utils/request/request"; import routes from "../../../Redux/api"; import { BedModel } from "../../Facility/models"; import useQuery from "../../../Utils/request/useQuery"; import { FieldLabel } from "../../Form/FormFields/FormField"; -import { BedSelect } from "../../Common/BedSelect"; +import { BedSelect } from "@/components/Common/BedSelect"; interface HL7MonitorProps { assetId: string; diff --git a/src/Components/Assets/AssetTypes.tsx b/src/components/Assets/AssetTypes.tsx similarity index 100% rename from src/Components/Assets/AssetTypes.tsx rename to src/components/Assets/AssetTypes.tsx diff --git a/src/Components/Assets/AssetWarrantyCard.tsx b/src/components/Assets/AssetWarrantyCard.tsx similarity index 100% rename from src/Components/Assets/AssetWarrantyCard.tsx rename to src/components/Assets/AssetWarrantyCard.tsx diff --git a/src/Components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx similarity index 97% rename from src/Components/Assets/AssetsList.tsx rename to src/components/Assets/AssetsList.tsx index 77961d15b0d..613b87e5ea5 100644 --- a/src/Components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -1,5 +1,5 @@ import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { assetClassProps, AssetData } from "./AssetTypes"; import { useState, useEffect } from "react"; import { Link, navigate } from "raviger"; @@ -7,24 +7,24 @@ import AssetFilter from "./AssetFilter"; import { parseQueryParams } from "../../Utils/primitives"; import Chip from "../../CAREUI/display/Chip"; import SearchInput from "../Form/SearchInput"; -import useFilters from "../../Common/hooks/useFilters"; +import useFilters from "@/common/hooks/useFilters"; import { FacilityModel } from "../Facility/models"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized"; +import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import FacilitiesSelectDialogue from "../ExternalResult/FacilitiesSelectDialogue"; -import ExportMenu from "../Common/Export"; +import ExportMenu from "@/components/Common/Export"; import CountBlock from "../../CAREUI/display/Count"; import AssetImportModal from "./AssetImportModal"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import { useTranslation } from "react-i18next"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const AssetsList = () => { const { t } = useTranslation(); const { diff --git a/src/Components/Auth/Login.tsx b/src/components/Auth/Login.tsx similarity index 98% rename from src/Components/Auth/Login.tsx rename to src/components/Auth/Login.tsx index 07d06c16446..403b133757f 100644 --- a/src/Components/Auth/Login.tsx +++ b/src/components/Auth/Login.tsx @@ -3,14 +3,14 @@ import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import { useTranslation } from "react-i18next"; import ReCaptcha from "react-google-recaptcha"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import LegendInput from "../../CAREUI/interactive/LegendInput"; -import LanguageSelectorLogin from "../Common/LanguageSelectorLogin"; +import LanguageSelectorLogin from "@/components/Common/LanguageSelectorLogin"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import ReactMarkdown from "react-markdown"; import rehypeRaw from "rehype-raw"; -import { useAuthContext } from "../../Common/hooks/useAuthUser"; +import { useAuthContext } from "@/common/hooks/useAuthUser"; import FiltersCache from "../../Utils/FiltersCache"; import { classNames } from "../../Utils/utils"; import BrowserWarning from "../ErrorPages/BrowserWarning"; diff --git a/src/Components/Auth/ResetPassword.tsx b/src/components/Auth/ResetPassword.tsx similarity index 93% rename from src/Components/Auth/ResetPassword.tsx rename to src/components/Auth/ResetPassword.tsx index 12a7b51ff67..15fc6cbac69 100644 --- a/src/Components/Auth/ResetPassword.tsx +++ b/src/components/Auth/ResetPassword.tsx @@ -1,14 +1,14 @@ import { useEffect, useState } from "react"; -import request from "../../Utils/request/request.js"; -import * as Notification from "../../Utils/Notifications.js"; +import request from "../../Utils/request/request"; +import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; import { useTranslation } from "react-i18next"; -import { LocalStorageKeys } from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { LocalStorageKeys } from "@/common/constants"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import TextFormField from "../Form/FormFields/TextFormField"; import { validateRule } from "../Users/UserAdd"; -import { validatePassword } from "../../Common/validation.js"; -import routes from "../../Redux/api.js"; +import { validatePassword } from "@/common/validation"; +import routes from "../../Redux/api"; export const ResetPassword = (props: any) => { const initForm: any = { diff --git a/src/Components/Auth/index.tsx b/src/components/Auth/index.tsx similarity index 100% rename from src/Components/Auth/index.tsx rename to src/components/Auth/index.tsx diff --git a/src/Components/CameraFeed/CameraFeed.tsx b/src/components/CameraFeed/CameraFeed.tsx similarity index 97% rename from src/Components/CameraFeed/CameraFeed.tsx rename to src/components/CameraFeed/CameraFeed.tsx index 93f87ee20aa..daa237cd851 100644 --- a/src/Components/CameraFeed/CameraFeed.tsx +++ b/src/components/CameraFeed/CameraFeed.tsx @@ -8,11 +8,11 @@ import FeedNetworkSignal from "./FeedNetworkSignal"; import NoFeedAvailable from "./NoFeedAvailable"; import FeedControls from "./FeedControls"; import FeedWatermark from "./FeedWatermark"; -import useFullscreen from "../../Common/hooks/useFullscreen"; -import useBreakpoints from "../../Common/hooks/useBreakpoints"; +import useFullscreen from "@/common/hooks/useFullscreen"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; import { GetPresetsResponse } from "./routes"; import VideoPlayer from "./videoPlayer"; -import AssetInfoPopover from "../Common/AssetInfoPopover"; +import AssetInfoPopover from "@/components/Common/AssetInfoPopover"; interface Props { children?: React.ReactNode; diff --git a/src/Components/CameraFeed/CameraFeedWithBedPresets.tsx b/src/components/CameraFeed/CameraFeedWithBedPresets.tsx similarity index 100% rename from src/Components/CameraFeed/CameraFeedWithBedPresets.tsx rename to src/components/CameraFeed/CameraFeedWithBedPresets.tsx diff --git a/src/Components/CameraFeed/CameraPresetSelect.tsx b/src/components/CameraFeed/CameraPresetSelect.tsx similarity index 98% rename from src/Components/CameraFeed/CameraPresetSelect.tsx rename to src/components/CameraFeed/CameraPresetSelect.tsx index 345756915a0..95b6d195688 100644 --- a/src/Components/CameraFeed/CameraPresetSelect.tsx +++ b/src/components/CameraFeed/CameraPresetSelect.tsx @@ -4,7 +4,7 @@ import { ListboxOption, ListboxOptions, } from "@headlessui/react"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { classNames } from "../../Utils/utils"; import { dropdownOptionClassNames } from "../Form/MultiSelectMenuV2"; diff --git a/src/Components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx b/src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx similarity index 93% rename from src/Components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx rename to src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx index d80b8716d6e..837a351fff5 100644 --- a/src/Components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx +++ b/src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx @@ -4,13 +4,13 @@ import { PopoverPanel, Transition, } from "@headlessui/react"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { FieldLabel } from "../../Form/FormFields/FormField"; -import { LocationSelect } from "../../Common/LocationSelect"; -import Pagination from "../../Common/Pagination"; -import useFilters from "../../../Common/hooks/useFilters"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import Pagination from "@/components/Common/Pagination"; +import useFilters from "@/common/hooks/useFilters"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useSlug from "../../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import { useTranslation } from "react-i18next"; interface Props { diff --git a/src/Components/CameraFeed/CentralLiveMonitoring/index.tsx b/src/components/CameraFeed/CentralLiveMonitoring/index.tsx similarity index 93% rename from src/Components/CameraFeed/CentralLiveMonitoring/index.tsx rename to src/components/CameraFeed/CentralLiveMonitoring/index.tsx index 95e3b98c818..987289ef74d 100644 --- a/src/Components/CameraFeed/CentralLiveMonitoring/index.tsx +++ b/src/components/CameraFeed/CentralLiveMonitoring/index.tsx @@ -1,11 +1,11 @@ import { useState } from "react"; -import Loading from "../../Common/Loading"; -import Page from "../../Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/components/Page"; import useQuery from "../../../Utils/request/useQuery"; import routes from "../../../Redux/api"; import LocationFeedTile from "../CameraFeedWithBedPresets"; import Fullscreen from "../../../CAREUI/misc/Fullscreen"; -import useBreakpoints from "../../../Common/hooks/useBreakpoints"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; import { useQueryParams } from "raviger"; import LiveMonitoringFilters from "./LiveMonitoringFilters"; import StillWatching from "../StillWatching"; diff --git a/src/Components/CameraFeed/ConfigureCamera.tsx b/src/components/CameraFeed/ConfigureCamera.tsx similarity index 98% rename from src/Components/CameraFeed/ConfigureCamera.tsx rename to src/components/CameraFeed/ConfigureCamera.tsx index 4882b21c655..03b627d48ce 100644 --- a/src/Components/CameraFeed/ConfigureCamera.tsx +++ b/src/components/CameraFeed/ConfigureCamera.tsx @@ -2,8 +2,11 @@ import { useEffect, useState } from "react"; import { AssetData } from "../Assets/AssetTypes"; import { getCameraConfig, makeAccessKey } from "../../Utils/transformUtils"; import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import ButtonV2, { + Cancel, + Submit, +} from "@/components/Common/components/ButtonV2"; +import useAuthUser from "@/common/hooks/useAuthUser"; import CareIcon from "../../CAREUI/icons/CareIcon"; import useOperateCamera from "./useOperateCamera"; import CameraFeed from "./CameraFeed"; @@ -16,7 +19,7 @@ import useQuery from "../../Utils/request/useQuery"; import { classNames, compareBy } from "../../Utils/utils"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import { CameraPreset, FeedRoutes, GetStatusResponse } from "./routes"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import { Listbox, ListboxButton, @@ -24,10 +27,10 @@ import { ListboxOptions, } from "@headlessui/react"; import { dropdownOptionClassNames } from "../Form/MultiSelectMenuV2"; -import Loading from "../Common/Loading"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import Loading from "@/components/Common/Loading"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { FieldLabel } from "../Form/FormFields/FormField"; -import { checkIfValidIP } from "../../Common/validation"; +import { checkIfValidIP } from "@/common/validation"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; interface Props { diff --git a/src/Components/CameraFeed/FeedAlert.tsx b/src/components/CameraFeed/FeedAlert.tsx similarity index 100% rename from src/Components/CameraFeed/FeedAlert.tsx rename to src/components/CameraFeed/FeedAlert.tsx diff --git a/src/Components/CameraFeed/FeedButton.tsx b/src/components/CameraFeed/FeedButton.tsx similarity index 100% rename from src/Components/CameraFeed/FeedButton.tsx rename to src/components/CameraFeed/FeedButton.tsx diff --git a/src/Components/CameraFeed/FeedControls.tsx b/src/components/CameraFeed/FeedControls.tsx similarity index 100% rename from src/Components/CameraFeed/FeedControls.tsx rename to src/components/CameraFeed/FeedControls.tsx diff --git a/src/Components/CameraFeed/FeedNetworkSignal.tsx b/src/components/CameraFeed/FeedNetworkSignal.tsx similarity index 100% rename from src/Components/CameraFeed/FeedNetworkSignal.tsx rename to src/components/CameraFeed/FeedNetworkSignal.tsx diff --git a/src/Components/CameraFeed/FeedWatermark.tsx b/src/components/CameraFeed/FeedWatermark.tsx similarity index 96% rename from src/Components/CameraFeed/FeedWatermark.tsx rename to src/components/CameraFeed/FeedWatermark.tsx index 90b9f7cc408..f71bab24ac6 100644 --- a/src/Components/CameraFeed/FeedWatermark.tsx +++ b/src/components/CameraFeed/FeedWatermark.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from "react"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; export default function FeedWatermark() { const me = useAuthUser(); diff --git a/src/Components/CameraFeed/NoFeedAvailable.tsx b/src/components/CameraFeed/NoFeedAvailable.tsx similarity index 96% rename from src/Components/CameraFeed/NoFeedAvailable.tsx rename to src/components/CameraFeed/NoFeedAvailable.tsx index 1c05296fad1..05e07327458 100644 --- a/src/Components/CameraFeed/NoFeedAvailable.tsx +++ b/src/components/CameraFeed/NoFeedAvailable.tsx @@ -1,7 +1,7 @@ import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; import { classNames } from "../../Utils/utils"; import { AssetData } from "../Assets/AssetTypes"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; interface Props { className?: string; diff --git a/src/Components/CameraFeed/StillWatching.tsx b/src/components/CameraFeed/StillWatching.tsx similarity index 94% rename from src/Components/CameraFeed/StillWatching.tsx rename to src/components/CameraFeed/StillWatching.tsx index 0b5a8056b43..8993d0344d7 100644 --- a/src/Components/CameraFeed/StillWatching.tsx +++ b/src/components/CameraFeed/StillWatching.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; import { useTimer } from "../../Utils/useTimer"; diff --git a/src/Components/CameraFeed/routes.ts b/src/components/CameraFeed/routes.ts similarity index 100% rename from src/Components/CameraFeed/routes.ts rename to src/components/CameraFeed/routes.ts diff --git a/src/Components/CameraFeed/useOperateCamera.ts b/src/components/CameraFeed/useOperateCamera.ts similarity index 100% rename from src/Components/CameraFeed/useOperateCamera.ts rename to src/components/CameraFeed/useOperateCamera.ts diff --git a/src/Components/CameraFeed/utils.ts b/src/components/CameraFeed/utils.ts similarity index 100% rename from src/Components/CameraFeed/utils.ts rename to src/components/CameraFeed/utils.ts diff --git a/src/Components/CameraFeed/videoPlayer.tsx b/src/components/CameraFeed/videoPlayer.tsx similarity index 100% rename from src/Components/CameraFeed/videoPlayer.tsx rename to src/components/CameraFeed/videoPlayer.tsx diff --git a/src/Components/Common/AssetInfoPopover.tsx b/src/components/Common/AssetInfoPopover.tsx similarity index 100% rename from src/Components/Common/AssetInfoPopover.tsx rename to src/components/Common/AssetInfoPopover.tsx diff --git a/src/Components/Common/AssetSelect.tsx b/src/components/Common/AssetSelect.tsx similarity index 100% rename from src/Components/Common/AssetSelect.tsx rename to src/components/Common/AssetSelect.tsx diff --git a/src/Components/Common/Avatar.tsx b/src/components/Common/Avatar.tsx similarity index 100% rename from src/Components/Common/Avatar.tsx rename to src/components/Common/Avatar.tsx diff --git a/src/Components/Common/AvatarEditModal.tsx b/src/components/Common/AvatarEditModal.tsx similarity index 99% rename from src/Components/Common/AvatarEditModal.tsx rename to src/components/Common/AvatarEditModal.tsx index f83b76e4a2e..e17a8bffa88 100644 --- a/src/Components/Common/AvatarEditModal.tsx +++ b/src/components/Common/AvatarEditModal.tsx @@ -7,11 +7,11 @@ import React, { } from "react"; import { Warn } from "@/Utils/Notifications"; import useDragAndDrop from "@/Utils/useDragAndDrop"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; +import ButtonV2, { Cancel, Submit } from "./components/ButtonV2"; import Webcam from "react-webcam"; import CareIcon from "@/CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "./Dialog"; interface Props { title: string; diff --git a/src/Components/Common/AvatarEditable.tsx b/src/components/Common/AvatarEditable.tsx similarity index 95% rename from src/Components/Common/AvatarEditable.tsx rename to src/components/Common/AvatarEditable.tsx index ce3112f2107..f8c0f4885bb 100644 --- a/src/Components/Common/AvatarEditable.tsx +++ b/src/components/Common/AvatarEditable.tsx @@ -1,7 +1,7 @@ import CareIcon from "@/CAREUI/icons/CareIcon"; import { cn } from "@/lib/utils"; import { useTranslation } from "react-i18next"; -import { AvatarProps, Avatar } from "@/Components/Common/Avatar"; +import { AvatarProps, Avatar } from "@/components/Common/Avatar"; interface AvatarEditableProps extends AvatarProps { id?: string; diff --git a/src/Components/Common/BedSelect.tsx b/src/components/Common/BedSelect.tsx similarity index 100% rename from src/Components/Common/BedSelect.tsx rename to src/components/Common/BedSelect.tsx diff --git a/src/Components/Common/BloodPressureFormField.tsx b/src/components/Common/BloodPressureFormField.tsx similarity index 100% rename from src/Components/Common/BloodPressureFormField.tsx rename to src/components/Common/BloodPressureFormField.tsx diff --git a/src/Components/Common/Breadcrumbs.tsx b/src/components/Common/Breadcrumbs.tsx similarity index 97% rename from src/Components/Common/Breadcrumbs.tsx rename to src/components/Common/Breadcrumbs.tsx index be35cf6862d..4ccbbfd717e 100644 --- a/src/Components/Common/Breadcrumbs.tsx +++ b/src/components/Common/Breadcrumbs.tsx @@ -1,9 +1,9 @@ import { usePath, Link } from "raviger"; import { useState } from "react"; import { classNames } from "../../Utils/utils"; -import { Button } from "@/Components/ui/button"; +import { Button } from "@/components/ui/button"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; const MENU_TAGS: { [key: string]: string } = { facility: "Facilities", diff --git a/src/Components/Common/ConfirmDialog.tsx b/src/components/Common/ConfirmDialog.tsx similarity index 100% rename from src/Components/Common/ConfirmDialog.tsx rename to src/components/Common/ConfirmDialog.tsx diff --git a/src/Components/Common/DateInputV2.tsx b/src/components/Common/DateInputV2.tsx similarity index 99% rename from src/Components/Common/DateInputV2.tsx rename to src/components/Common/DateInputV2.tsx index 31bc7d03c24..37f67c8ad80 100644 --- a/src/Components/Common/DateInputV2.tsx +++ b/src/components/Common/DateInputV2.tsx @@ -4,7 +4,7 @@ import CareIcon from "../../CAREUI/icons/CareIcon"; import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; import { classNames } from "../../Utils/utils"; import dayjs from "../../Utils/dayjs"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { t } from "i18next"; type DatePickerType = "date" | "month" | "year"; diff --git a/src/Components/Common/DateRangeInputV2.tsx b/src/components/Common/DateRangeInputV2.tsx similarity index 100% rename from src/Components/Common/DateRangeInputV2.tsx rename to src/components/Common/DateRangeInputV2.tsx diff --git a/src/Components/Common/Dialog.tsx b/src/components/Common/Dialog.tsx similarity index 100% rename from src/Components/Common/Dialog.tsx rename to src/components/Common/Dialog.tsx diff --git a/src/Components/Common/DistrictAutocompleteFormField.tsx b/src/components/Common/DistrictAutocompleteFormField.tsx similarity index 100% rename from src/Components/Common/DistrictAutocompleteFormField.tsx rename to src/components/Common/DistrictAutocompleteFormField.tsx diff --git a/src/Components/Common/ErrorBoundary.tsx b/src/components/Common/ErrorBoundary.tsx similarity index 100% rename from src/Components/Common/ErrorBoundary.tsx rename to src/components/Common/ErrorBoundary.tsx diff --git a/src/Components/Common/ExcelFIleDragAndDrop.tsx b/src/components/Common/ExcelFIleDragAndDrop.tsx similarity index 96% rename from src/Components/Common/ExcelFIleDragAndDrop.tsx rename to src/components/Common/ExcelFIleDragAndDrop.tsx index d43676839f4..566c8d0e600 100644 --- a/src/Components/Common/ExcelFIleDragAndDrop.tsx +++ b/src/components/Common/ExcelFIleDragAndDrop.tsx @@ -1,17 +1,17 @@ import * as _ from "lodash-es"; import { useEffect, useRef, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { useTranslation } from "react-i18next"; -import { Cancel, Submit } from "./components/ButtonV2.js"; -import CareIcon from "../../CAREUI/icons/CareIcon.js"; -import useDragAndDrop from "../../Utils/useDragAndDrop.js"; -import ExcelViewer from "./ExcelViewer.js"; +import { Cancel, Submit } from "./components/ButtonV2"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import useDragAndDrop from "../../Utils/useDragAndDrop"; +import ExcelViewer from "./ExcelViewer"; import * as XLSX from "xlsx"; import schemaParser, { SchemaType, ErrorData, ParsedData, -} from "../../Common/schemaParser.js"; +} from "@/common/schemaParser"; interface Props { handleSubmit: (data: any) => void; diff --git a/src/Components/Common/ExcelViewer.tsx b/src/components/Common/ExcelViewer.tsx similarity index 99% rename from src/Components/Common/ExcelViewer.tsx rename to src/components/Common/ExcelViewer.tsx index a7e5879ef1f..4705d23c733 100644 --- a/src/Components/Common/ExcelViewer.tsx +++ b/src/components/Common/ExcelViewer.tsx @@ -3,7 +3,7 @@ import CareIcon from "../../CAREUI/icons/CareIcon"; import ButtonV2, { Cancel, Submit } from "./components/ButtonV2"; import DialogModal from "./Dialog"; import Pagination from "./Pagination"; -import { ParsedData } from "../../Common/schemaParser"; +import { ParsedData } from "@/common/schemaParser"; type FilePreviewProps = { title?: ReactNode; diff --git a/src/Components/Common/Export.tsx b/src/components/Common/Export.tsx similarity index 95% rename from src/Components/Common/Export.tsx rename to src/components/Common/Export.tsx index fb1aa812633..c34e3f6b5d9 100644 --- a/src/Components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -1,11 +1,11 @@ import DropdownMenu, { DropdownItem, DropdownItemProps, -} from "../../Components/Common/components/Menu"; +} from "@/components/Common/components/Menu"; -import ButtonV2 from "../../Components/Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import useExport from "../../Common/hooks/useExport"; +import useExport from "@/common/hooks/useExport"; import { Route } from "../../Utils/request/types"; import request from "../../Utils/request/request"; diff --git a/src/Components/Common/FacilitySelect.tsx b/src/components/Common/FacilitySelect.tsx similarity index 100% rename from src/Components/Common/FacilitySelect.tsx rename to src/components/Common/FacilitySelect.tsx diff --git a/src/Components/Common/FilePreviewDialog.tsx b/src/components/Common/FilePreviewDialog.tsx similarity index 100% rename from src/Components/Common/FilePreviewDialog.tsx rename to src/components/Common/FilePreviewDialog.tsx diff --git a/src/Components/Common/GLocationPicker.tsx b/src/components/Common/GLocationPicker.tsx similarity index 99% rename from src/Components/Common/GLocationPicker.tsx rename to src/components/Common/GLocationPicker.tsx index 1c9c8f963b6..9b740e55d38 100644 --- a/src/Components/Common/GLocationPicker.tsx +++ b/src/components/Common/GLocationPicker.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Wrapper, Status } from "@googlemaps/react-wrapper"; -import { deepEqual } from "../../Common/utils"; +import { deepEqual } from "@/common/utils"; import { isLatLngLiteral } from "@googlemaps/typescript-guards"; import Spinner from "./Spinner"; import CareIcon from "../../CAREUI/icons/CareIcon"; diff --git a/src/Components/Common/HeadedTabs.tsx b/src/components/Common/HeadedTabs.tsx similarity index 100% rename from src/Components/Common/HeadedTabs.tsx rename to src/components/Common/HeadedTabs.tsx diff --git a/src/Components/Common/LanguageSelector.tsx b/src/components/Common/LanguageSelector.tsx similarity index 100% rename from src/Components/Common/LanguageSelector.tsx rename to src/components/Common/LanguageSelector.tsx diff --git a/src/Components/Common/LanguageSelectorLogin.tsx b/src/components/Common/LanguageSelectorLogin.tsx similarity index 100% rename from src/Components/Common/LanguageSelectorLogin.tsx rename to src/components/Common/LanguageSelectorLogin.tsx diff --git a/src/Components/Common/Loading.tsx b/src/components/Common/Loading.tsx similarity index 100% rename from src/Components/Common/Loading.tsx rename to src/components/Common/Loading.tsx diff --git a/src/Components/Common/LocalBodyAutocompleteFormField.tsx b/src/components/Common/LocalBodyAutocompleteFormField.tsx similarity index 100% rename from src/Components/Common/LocalBodyAutocompleteFormField.tsx rename to src/components/Common/LocalBodyAutocompleteFormField.tsx diff --git a/src/Components/Common/LocationSelect.tsx b/src/components/Common/LocationSelect.tsx similarity index 100% rename from src/Components/Common/LocationSelect.tsx rename to src/components/Common/LocationSelect.tsx diff --git a/src/Components/Common/PDFViewer.tsx b/src/components/Common/PDFViewer.tsx similarity index 100% rename from src/Components/Common/PDFViewer.tsx rename to src/components/Common/PDFViewer.tsx diff --git a/src/Components/Common/PMJAYProcedurePackageAutocomplete.tsx b/src/components/Common/PMJAYProcedurePackageAutocomplete.tsx similarity index 100% rename from src/Components/Common/PMJAYProcedurePackageAutocomplete.tsx rename to src/components/Common/PMJAYProcedurePackageAutocomplete.tsx diff --git a/src/Components/Common/PageHeadTitle.tsx b/src/components/Common/PageHeadTitle.tsx similarity index 100% rename from src/Components/Common/PageHeadTitle.tsx rename to src/components/Common/PageHeadTitle.tsx diff --git a/src/Components/Common/PageTitle.tsx b/src/components/Common/PageTitle.tsx similarity index 100% rename from src/Components/Common/PageTitle.tsx rename to src/components/Common/PageTitle.tsx diff --git a/src/Components/Common/Pagination.tsx b/src/components/Common/Pagination.tsx similarity index 98% rename from src/Components/Common/Pagination.tsx rename to src/components/Common/Pagination.tsx index 40d6ccc4236..1f7a68b333e 100644 --- a/src/Components/Common/Pagination.tsx +++ b/src/components/Common/Pagination.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useAbortableEffect, statusType } from "../../Common/utils"; +import { useAbortableEffect, statusType } from "@/common/utils"; import ButtonV2 from "./components/ButtonV2"; interface PaginationProps { diff --git a/src/Components/Common/PatientCategoryBadge.tsx b/src/components/Common/PatientCategoryBadge.tsx similarity index 87% rename from src/Components/Common/PatientCategoryBadge.tsx rename to src/components/Common/PatientCategoryBadge.tsx index 57875b86211..a756a639241 100644 --- a/src/Components/Common/PatientCategoryBadge.tsx +++ b/src/components/Common/PatientCategoryBadge.tsx @@ -1,4 +1,4 @@ -import { PATIENT_CATEGORIES } from "../../Common/constants"; +import { PATIENT_CATEGORIES } from "@/common/constants"; import { PatientCategory } from "../Facility/models"; const PatientCategoryBadge = ({ category }: { category?: PatientCategory }) => { diff --git a/src/Components/Common/QRScanner.tsx b/src/components/Common/QRScanner.tsx similarity index 95% rename from src/Components/Common/QRScanner.tsx rename to src/components/Common/QRScanner.tsx index 319e5531e7b..f840c94cf2e 100644 --- a/src/Components/Common/QRScanner.tsx +++ b/src/components/Common/QRScanner.tsx @@ -1,8 +1,8 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import CareIcon from "../../CAREUI/icons/CareIcon"; import DialogModal from "./Dialog"; -import TextFormField from "../Form/FormFields/TextFormField.js"; +import TextFormField from "../Form/FormFields/TextFormField"; import { useState } from "react"; import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; diff --git a/src/Components/Common/RelativeDateUserMention.tsx b/src/components/Common/RelativeDateUserMention.tsx similarity index 100% rename from src/Components/Common/RelativeDateUserMention.tsx rename to src/components/Common/RelativeDateUserMention.tsx diff --git a/src/Components/Common/RouteToFacilitySelect.tsx b/src/components/Common/RouteToFacilitySelect.tsx similarity index 100% rename from src/Components/Common/RouteToFacilitySelect.tsx rename to src/components/Common/RouteToFacilitySelect.tsx diff --git a/src/Components/Common/Script.tsx b/src/components/Common/Script.tsx similarity index 100% rename from src/Components/Common/Script.tsx rename to src/components/Common/Script.tsx diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/components/Common/Sidebar/Sidebar.tsx similarity index 98% rename from src/Components/Common/Sidebar/Sidebar.tsx rename to src/components/Common/Sidebar/Sidebar.tsx index 549cadabb09..2b117562fc9 100644 --- a/src/Components/Common/Sidebar/Sidebar.tsx +++ b/src/components/Common/Sidebar/Sidebar.tsx @@ -2,7 +2,7 @@ import { createContext, useContext, useEffect, useRef, useState } from "react"; import { SidebarItem, ShrinkedSidebarItem } from "./SidebarItem"; import SidebarUserCard from "./SidebarUserCard"; import NotificationItem from "../../Notifications/NotificationsList"; -import useActiveLink from "../../../Common/hooks/useActiveLink"; +import useActiveLink from "@/common/hooks/useActiveLink"; import CareIcon, { IconName } from "../../../CAREUI/icons/CareIcon"; import SlideOver from "../../../CAREUI/interactive/SlideOver"; import { classNames } from "../../../Utils/utils"; @@ -13,9 +13,9 @@ import { TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/Components/ui/tooltip"; +} from "@/components/ui/tooltip"; import { useTranslation } from "react-i18next"; -import { useCareAppNavItems } from "@/Common/hooks/useCareApps"; +import { useCareAppNavItems } from "@/common/hooks/useCareApps"; export const SIDEBAR_SHRINK_PREFERENCE_KEY = "sidebarShrinkPreference"; diff --git a/src/Components/Common/Sidebar/SidebarItem.tsx b/src/components/Common/Sidebar/SidebarItem.tsx similarity index 98% rename from src/Components/Common/Sidebar/SidebarItem.tsx rename to src/components/Common/Sidebar/SidebarItem.tsx index 6db51bbac3a..14a7445c358 100644 --- a/src/Components/Common/Sidebar/SidebarItem.tsx +++ b/src/components/Common/Sidebar/SidebarItem.tsx @@ -1,7 +1,7 @@ import { Link } from "raviger"; import { useTranslation } from "react-i18next"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useAppHistory from "../../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import React, { forwardRef, Ref } from "react"; export type SidebarIcon = React.ReactNode; diff --git a/src/Components/Common/Sidebar/SidebarUserCard.tsx b/src/components/Common/Sidebar/SidebarUserCard.tsx similarity index 92% rename from src/Components/Common/Sidebar/SidebarUserCard.tsx rename to src/components/Common/Sidebar/SidebarUserCard.tsx index 2352bf6d843..b73b97771f5 100644 --- a/src/Components/Common/Sidebar/SidebarUserCard.tsx +++ b/src/components/Common/Sidebar/SidebarUserCard.tsx @@ -3,15 +3,15 @@ import { Link } from "raviger"; import { useTranslation } from "react-i18next"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { formatName, formatDisplayName } from "../../../Utils/utils"; -import useAuthUser, { useAuthContext } from "../../../Common/hooks/useAuthUser"; -import { Avatar } from "@/Components/Common/Avatar"; -import { Button } from "@/Components/ui/button"; +import useAuthUser, { useAuthContext } from "@/common/hooks/useAuthUser"; +import { Avatar } from "@/components/Common/Avatar"; +import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "@/Components/ui/dropdown-menu"; +} from "@/components/ui/dropdown-menu"; interface SidebarUserCardProps { shrinked: boolean; diff --git a/src/Components/Common/SkillSelect.tsx b/src/components/Common/SkillSelect.tsx similarity index 100% rename from src/Components/Common/SkillSelect.tsx rename to src/components/Common/SkillSelect.tsx diff --git a/src/Components/Common/SortDropdown.tsx b/src/components/Common/SortDropdown.tsx similarity index 100% rename from src/Components/Common/SortDropdown.tsx rename to src/components/Common/SortDropdown.tsx diff --git a/src/Components/Common/Spinner.tsx b/src/components/Common/Spinner.tsx similarity index 100% rename from src/Components/Common/Spinner.tsx rename to src/components/Common/Spinner.tsx diff --git a/src/Components/Common/StateAutocompleteFormField.tsx b/src/components/Common/StateAutocompleteFormField.tsx similarity index 100% rename from src/Components/Common/StateAutocompleteFormField.tsx rename to src/components/Common/StateAutocompleteFormField.tsx diff --git a/src/Components/Common/Steps.tsx b/src/components/Common/Steps.tsx similarity index 100% rename from src/Components/Common/Steps.tsx rename to src/components/Common/Steps.tsx diff --git a/src/Components/Common/TemperatureFormField.tsx b/src/components/Common/TemperatureFormField.tsx similarity index 100% rename from src/Components/Common/TemperatureFormField.tsx rename to src/components/Common/TemperatureFormField.tsx diff --git a/src/Components/Common/UpdatableApp.tsx b/src/components/Common/UpdatableApp.tsx similarity index 100% rename from src/Components/Common/UpdatableApp.tsx rename to src/components/Common/UpdatableApp.tsx diff --git a/src/Components/Common/Uptime.tsx b/src/components/Common/Uptime.tsx similarity index 99% rename from src/Components/Common/Uptime.tsx rename to src/components/Common/Uptime.tsx index 2c86b7717cc..c9335b6f62a 100644 --- a/src/Components/Common/Uptime.tsx +++ b/src/components/Common/Uptime.tsx @@ -3,7 +3,7 @@ import { useEffect, useRef, useState } from "react"; import { AssetStatus, AvailabilityRecord } from "../Assets/AssetTypes"; import { classNames } from "../../Utils/utils"; import dayjs from "../../Utils/dayjs"; -import useQuery from "../../Utils/request/useQuery.js"; +import useQuery from "../../Utils/request/useQuery"; import { PaginatedResponse, QueryRoute } from "../../Utils/request/types"; const STATUS_COLORS = { diff --git a/src/Components/Common/UserAutocompleteFormField.tsx b/src/components/Common/UserAutocompleteFormField.tsx similarity index 98% rename from src/Components/Common/UserAutocompleteFormField.tsx rename to src/components/Common/UserAutocompleteFormField.tsx index dd7c4c4301e..2bf5c49ffc8 100644 --- a/src/Components/Common/UserAutocompleteFormField.tsx +++ b/src/components/Common/UserAutocompleteFormField.tsx @@ -10,7 +10,7 @@ import { isUserOnline, mergeQueryOptions, } from "../../Utils/utils"; -import { UserRole } from "../../Common/constants"; +import { UserRole } from "@/common/constants"; import { useEffect, useState } from "react"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; diff --git a/src/Components/Common/UserDetails.tsx b/src/components/Common/UserDetails.tsx similarity index 100% rename from src/Components/Common/UserDetails.tsx rename to src/components/Common/UserDetails.tsx diff --git a/src/Components/Common/UserDetailsComponet.tsx b/src/components/Common/UserDetailsComponet.tsx similarity index 100% rename from src/Components/Common/UserDetailsComponet.tsx rename to src/components/Common/UserDetailsComponet.tsx diff --git a/src/Components/Common/components/AccordionV2.tsx b/src/components/Common/components/AccordionV2.tsx similarity index 100% rename from src/Components/Common/components/AccordionV2.tsx rename to src/components/Common/components/AccordionV2.tsx diff --git a/src/Components/Common/components/ButtonV2.tsx b/src/components/Common/components/ButtonV2.tsx similarity index 100% rename from src/Components/Common/components/ButtonV2.tsx rename to src/components/Common/components/ButtonV2.tsx diff --git a/src/Components/Common/components/CircularProgress.tsx b/src/components/Common/components/CircularProgress.tsx similarity index 100% rename from src/Components/Common/components/CircularProgress.tsx rename to src/components/Common/components/CircularProgress.tsx diff --git a/src/Components/Common/components/CollapseV2.tsx b/src/components/Common/components/CollapseV2.tsx similarity index 100% rename from src/Components/Common/components/CollapseV2.tsx rename to src/components/Common/components/CollapseV2.tsx diff --git a/src/Components/Common/components/ContactLink.tsx b/src/components/Common/components/ContactLink.tsx similarity index 100% rename from src/Components/Common/components/ContactLink.tsx rename to src/components/Common/components/ContactLink.tsx diff --git a/src/Components/Common/components/HelperComponents.tsx b/src/components/Common/components/HelperComponents.tsx similarity index 100% rename from src/Components/Common/components/HelperComponents.tsx rename to src/components/Common/components/HelperComponents.tsx diff --git a/src/Components/Common/components/Menu.tsx b/src/components/Common/components/Menu.tsx similarity index 97% rename from src/Components/Common/components/Menu.tsx rename to src/components/Common/components/Menu.tsx index 14dabfe9781..cd2f80d0546 100644 --- a/src/Components/Common/components/Menu.tsx +++ b/src/components/Common/components/Menu.tsx @@ -5,7 +5,7 @@ import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { classNames } from "../../../Utils/utils"; -import { useIsAuthorized } from "../../../Common/hooks/useIsAuthorized"; +import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; interface DropdownMenuProps { id?: string; diff --git a/src/Components/Common/components/Page.tsx b/src/components/Common/components/Page.tsx similarity index 100% rename from src/Components/Common/components/Page.tsx rename to src/components/Common/components/Page.tsx diff --git a/src/Components/Common/components/Readmore.tsx b/src/components/Common/components/Readmore.tsx similarity index 100% rename from src/Components/Common/components/Readmore.tsx rename to src/components/Common/components/Readmore.tsx diff --git a/src/Components/Common/components/Switch.tsx b/src/components/Common/components/Switch.tsx similarity index 100% rename from src/Components/Common/components/Switch.tsx rename to src/components/Common/components/Switch.tsx diff --git a/src/Components/Common/components/Table.tsx b/src/components/Common/components/Table.tsx similarity index 100% rename from src/Components/Common/components/Table.tsx rename to src/components/Common/components/Table.tsx diff --git a/src/Components/Common/components/Tabs.tsx b/src/components/Common/components/Tabs.tsx similarity index 96% rename from src/Components/Common/components/Tabs.tsx rename to src/components/Common/components/Tabs.tsx index 9f59aab8754..e59f0d1f645 100644 --- a/src/Components/Common/components/Tabs.tsx +++ b/src/components/Common/components/Tabs.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef, type ReactNode } from "react"; import { classNames } from "../../../Utils/utils"; -import useWindowDimensions from "../../../Common/hooks/useWindowDimensions"; +import useWindowDimensions from "@/common/hooks/useWindowDimensions"; export default function Tabs(props: { className?: string; diff --git a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx b/src/components/Common/prescription-builder/InvestigationBuilder.tsx similarity index 100% rename from src/Components/Common/prescription-builder/InvestigationBuilder.tsx rename to src/components/Common/prescription-builder/InvestigationBuilder.tsx diff --git a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx b/src/components/Common/prescription-builder/PrescriptionDropdown.tsx similarity index 100% rename from src/Components/Common/prescription-builder/PrescriptionDropdown.tsx rename to src/components/Common/prescription-builder/PrescriptionDropdown.tsx diff --git a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx b/src/components/Common/prescription-builder/PrescriptionMultiselect.tsx similarity index 100% rename from src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx rename to src/components/Common/prescription-builder/PrescriptionMultiselect.tsx diff --git a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx b/src/components/Common/prescription-builder/ProcedureBuilder.tsx similarity index 100% rename from src/Components/Common/prescription-builder/ProcedureBuilder.tsx rename to src/components/Common/prescription-builder/ProcedureBuilder.tsx diff --git a/src/Components/DeathReport/DeathReport.tsx b/src/components/DeathReport/DeathReport.tsx similarity index 99% rename from src/Components/DeathReport/DeathReport.tsx rename to src/components/DeathReport/DeathReport.tsx index 2424d46f607..702a486bdfb 100644 --- a/src/Components/DeathReport/DeathReport.tsx +++ b/src/components/DeathReport/DeathReport.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { GENDER_TYPES } from "../../Common/constants"; +import { GENDER_TYPES } from "@/common/constants"; import TextFormField from "../Form/FormFields/TextFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import DateFormField from "../Form/FormFields/DateFormField"; @@ -9,7 +9,7 @@ import { formatPatientAge, humanizeStrings, } from "../../Utils/utils"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import Form from "../Form/Form"; import { useTranslation } from "react-i18next"; import { navigate } from "raviger"; diff --git a/src/Components/Diagnosis/ConditionVerificationStatusMenu.tsx b/src/components/Diagnosis/ConditionVerificationStatusMenu.tsx similarity index 96% rename from src/Components/Diagnosis/ConditionVerificationStatusMenu.tsx rename to src/components/Diagnosis/ConditionVerificationStatusMenu.tsx index e4c1c019bc4..121ff258195 100644 --- a/src/Components/Diagnosis/ConditionVerificationStatusMenu.tsx +++ b/src/components/Diagnosis/ConditionVerificationStatusMenu.tsx @@ -1,12 +1,14 @@ import { useTranslation } from "react-i18next"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import DropdownMenu, { DropdownItem } from "../Common/components/Menu"; +import DropdownMenu, { + DropdownItem, +} from "@/components/Common/components/Menu"; import { ConditionVerificationStatus, InactiveConditionVerificationStatuses, } from "./types"; import { classNames } from "../../Utils/utils"; -import { ButtonSize } from "../Common/components/ButtonV2"; +import { ButtonSize } from "@/components/Common/components/ButtonV2"; interface Props { disabled?: boolean; diff --git a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx similarity index 100% rename from src/Components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx rename to src/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx diff --git a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx similarity index 99% rename from src/Components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx rename to src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx index be9f573fea4..ee716039364 100644 --- a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx +++ b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import useSlug from "../../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import { ConsultationDiagnosis, CreateDiagnosis, diff --git a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx similarity index 100% rename from src/Components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx rename to src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx diff --git a/src/Components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx similarity index 100% rename from src/Components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx rename to src/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx diff --git a/src/Components/Diagnosis/DiagnosesListAccordion.tsx b/src/components/Diagnosis/DiagnosesListAccordion.tsx similarity index 98% rename from src/Components/Diagnosis/DiagnosesListAccordion.tsx rename to src/components/Diagnosis/DiagnosesListAccordion.tsx index adae1d8bb7c..534f4f0bf6f 100644 --- a/src/Components/Diagnosis/DiagnosesListAccordion.tsx +++ b/src/components/Diagnosis/DiagnosesListAccordion.tsx @@ -7,7 +7,7 @@ import { useTranslation } from "react-i18next"; import { classNames, compareBy } from "../../Utils/utils"; import { useState } from "react"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; interface Props { diagnoses: ConsultationDiagnosis[]; diff --git a/src/Components/Diagnosis/routes.ts b/src/components/Diagnosis/routes.ts similarity index 100% rename from src/Components/Diagnosis/routes.ts rename to src/components/Diagnosis/routes.ts diff --git a/src/Components/Diagnosis/types.ts b/src/components/Diagnosis/types.ts similarity index 100% rename from src/Components/Diagnosis/types.ts rename to src/components/Diagnosis/types.ts diff --git a/src/Components/Diagnosis/utils.ts b/src/components/Diagnosis/utils.ts similarity index 100% rename from src/Components/Diagnosis/utils.ts rename to src/components/Diagnosis/utils.ts diff --git a/src/Components/ErrorPages/404.tsx b/src/components/ErrorPages/404.tsx similarity index 100% rename from src/Components/ErrorPages/404.tsx rename to src/components/ErrorPages/404.tsx diff --git a/src/Components/ErrorPages/BrowserWarning.tsx b/src/components/ErrorPages/BrowserWarning.tsx similarity index 100% rename from src/Components/ErrorPages/BrowserWarning.tsx rename to src/components/ErrorPages/BrowserWarning.tsx diff --git a/src/Components/ErrorPages/InvalidReset.tsx b/src/components/ErrorPages/InvalidReset.tsx similarity index 100% rename from src/Components/ErrorPages/InvalidReset.tsx rename to src/components/ErrorPages/InvalidReset.tsx diff --git a/src/Components/ErrorPages/SessionExpired.tsx b/src/components/ErrorPages/SessionExpired.tsx similarity index 93% rename from src/Components/ErrorPages/SessionExpired.tsx rename to src/components/ErrorPages/SessionExpired.tsx index 32036a0319d..441412ba1e9 100644 --- a/src/Components/ErrorPages/SessionExpired.tsx +++ b/src/components/ErrorPages/SessionExpired.tsx @@ -1,7 +1,7 @@ import * as Notification from "../../Utils/Notifications"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { useAuthContext } from "../../Common/hooks/useAuthUser"; +import { useAuthContext } from "@/common/hooks/useAuthUser"; export default function SessionExpired() { const { signOut } = useAuthContext(); diff --git a/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx b/src/components/ExternalResult/FacilitiesSelectDialogue.tsx similarity index 85% rename from src/Components/ExternalResult/FacilitiesSelectDialogue.tsx rename to src/components/ExternalResult/FacilitiesSelectDialogue.tsx index 4dfe8850272..3f15e35e992 100644 --- a/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx +++ b/src/components/ExternalResult/FacilitiesSelectDialogue.tsx @@ -1,9 +1,9 @@ -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FacilityModel } from "../Facility/models"; import { useTranslation } from "react-i18next"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; interface Props { show: boolean; diff --git a/src/Components/ExternalResult/models.ts b/src/components/ExternalResult/models.ts similarity index 100% rename from src/Components/ExternalResult/models.ts rename to src/components/ExternalResult/models.ts diff --git a/src/Components/Facility/AddBedForm.tsx b/src/components/Facility/AddBedForm.tsx similarity index 95% rename from src/Components/Facility/AddBedForm.tsx rename to src/components/Facility/AddBedForm.tsx index 3bb43f9a27e..ee607587195 100644 --- a/src/Components/Facility/AddBedForm.tsx +++ b/src/components/Facility/AddBedForm.tsx @@ -1,21 +1,21 @@ import Card from "../../CAREUI/display/Card"; import { useState, SyntheticEvent } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { LOCATION_BED_TYPES } from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { LOCATION_BED_TYPES } from "@/common/constants"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import TextFormField from "../Form/FormFields/TextFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface Props { facilityId: string; locationId: string; diff --git a/src/Components/Facility/AddInventoryForm.tsx b/src/components/Facility/AddInventoryForm.tsx similarity index 96% rename from src/Components/Facility/AddInventoryForm.tsx rename to src/components/Facility/AddInventoryForm.tsx index 08fd7479dc8..d48a2f39653 100644 --- a/src/Components/Facility/AddInventoryForm.tsx +++ b/src/components/Facility/AddInventoryForm.tsx @@ -1,17 +1,17 @@ import { useReducer, useState, useEffect } from "react"; import Card from "../../CAREUI/display/Card"; -import * as Notification from "../../Utils/Notifications.js"; -import Page from "../Common/components/Page"; +import * as Notification from "../../Utils/Notifications"; +import Page from "@/components/Common/components/Page"; import { FieldLabel } from "../Form/FormFields/FormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import useAppHistory from "@/common/hooks/useAppHistory"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const initForm = { id: "", quantity: "", diff --git a/src/Components/Facility/AddLocationForm.tsx b/src/components/Facility/AddLocationForm.tsx similarity index 96% rename from src/Components/Facility/AddLocationForm.tsx rename to src/components/Facility/AddLocationForm.tsx index 5b480d89d89..d3ae0f57955 100644 --- a/src/Components/Facility/AddLocationForm.tsx +++ b/src/components/Facility/AddLocationForm.tsx @@ -1,17 +1,17 @@ import { useState, SyntheticEvent } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; -import { Submit, Cancel } from "../Common/components/ButtonV2"; +import { Submit, Cancel } from "@/components/Common/components/ButtonV2"; import TextFormField from "../Form/FormFields/TextFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { AssetLocationType } from "../Assets/AssetTypes"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface Props { facilityId: string; locationId?: string; diff --git a/src/Components/Facility/AssetCreate.tsx b/src/components/Facility/AssetCreate.tsx similarity index 97% rename from src/Components/Facility/AssetCreate.tsx rename to src/components/Facility/AssetCreate.tsx index 110bf525509..40bf4d276dd 100644 --- a/src/Components/Facility/AssetCreate.tsx +++ b/src/components/Facility/AssetCreate.tsx @@ -1,7 +1,7 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { AssetClass, AssetType } from "../Assets/AssetTypes"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { LegacyRef, MutableRefObject, @@ -14,29 +14,29 @@ import { import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; -import { LocationSelect } from "../Common/LocationSelect"; -import Page from "../Common/components/Page"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import Page from "@/components/Common/components/Page"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import SwitchV2 from "../Common/components/Switch"; +import SwitchV2 from "@/components/Common/components/Switch"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import { navigate } from "raviger"; import { parseQueryParams } from "../../Utils/primitives"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import useVisibility from "../../Utils/useVisibility"; -import { validateEmailAddress } from "../../Common/validation"; -import { dateQueryString, parsePhoneNumber } from "../../Utils/utils.js"; +import { validateEmailAddress } from "@/common/validation"; +import { dateQueryString, parsePhoneNumber } from "../../Utils/utils"; import dayjs from "../../Utils/dayjs"; -import DateFormField from "../Form/FormFields/DateFormField.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; +import DateFormField from "../Form/FormFields/DateFormField"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const formErrorKeys = [ "name", "asset_class", diff --git a/src/Components/Facility/BedCapacity.tsx b/src/components/Facility/BedCapacity.tsx similarity index 98% rename from src/Components/Facility/BedCapacity.tsx rename to src/components/Facility/BedCapacity.tsx index 7d36190c441..5580ef63a84 100644 --- a/src/Components/Facility/BedCapacity.tsx +++ b/src/components/Facility/BedCapacity.tsx @@ -1,11 +1,11 @@ import { useEffect, useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { CapacityModal, OptionsType } from "./models"; import TextFormField from "../Form/FormFields/TextFormField"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { BED_TYPES } from "../../Common/constants"; +import { BED_TYPES } from "@/common/constants"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/Facility/BedDeleteDialog.tsx b/src/components/Facility/BedDeleteDialog.tsx similarity index 92% rename from src/Components/Facility/BedDeleteDialog.tsx rename to src/components/Facility/BedDeleteDialog.tsx index a563b94e849..58e9e97028d 100644 --- a/src/Components/Facility/BedDeleteDialog.tsx +++ b/src/components/Facility/BedDeleteDialog.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { name: string; diff --git a/src/Components/Facility/BedManagement.tsx b/src/components/Facility/BedManagement.tsx similarity index 95% rename from src/Components/Facility/BedManagement.tsx rename to src/components/Facility/BedManagement.tsx index 628e273b883..810a06e9c26 100644 --- a/src/Components/Facility/BedManagement.tsx +++ b/src/components/Facility/BedManagement.tsx @@ -1,18 +1,18 @@ import { useState } from "react"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { BedModel } from "./models"; -import * as Notification from "../../Utils/Notifications.js"; -import { LOCATION_BED_TYPES } from "../../Common/constants"; +import * as Notification from "../../Utils/Notifications"; +import { LOCATION_BED_TYPES } from "@/common/constants"; import BedDeleteDialog from "./BedDeleteDialog"; import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import useFilters from "../../Common/hooks/useFilters"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import Loading from "@/Components/Common/Loading"; +import useFilters from "@/common/hooks/useFilters"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import Loading from "@/components/Common/Loading"; import PaginatedList from "@/CAREUI/misc/PaginatedList"; import { useTranslation } from "react-i18next"; interface BedManagementProps { diff --git a/src/Components/Facility/BedTypeCard.tsx b/src/components/Facility/BedTypeCard.tsx similarity index 96% rename from src/Components/Facility/BedTypeCard.tsx rename to src/components/Facility/BedTypeCard.tsx index 5b8f17c7a51..ba95b9eb1f6 100644 --- a/src/Components/Facility/BedTypeCard.tsx +++ b/src/components/Facility/BedTypeCard.tsx @@ -1,12 +1,12 @@ import { useEffect, useState } from "react"; import * as Notification from "../../Utils/Notifications"; import { BedCapacity } from "./BedCapacity"; -import DialogModal from "../Common/Dialog"; -import ButtonV2 from "../Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import CareIcon from "../../CAREUI/icons/CareIcon"; import RecordMeta from "../../CAREUI/display/RecordMeta"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; diff --git a/src/Components/Facility/CentralNursingStation.tsx b/src/components/Facility/CentralNursingStation.tsx similarity index 94% rename from src/Components/Facility/CentralNursingStation.tsx rename to src/components/Facility/CentralNursingStation.tsx index 82a5542fc1e..985f472d011 100644 --- a/src/Components/Facility/CentralNursingStation.tsx +++ b/src/components/Facility/CentralNursingStation.tsx @@ -1,12 +1,12 @@ -import useFullscreen from "../../Common/hooks/useFullscreen"; +import useFullscreen from "@/common/hooks/useFullscreen"; import HL7PatientVitalsMonitor from "../VitalsMonitor/HL7PatientVitalsMonitor"; -import useFilters from "../../Common/hooks/useFilters"; -import Loading from "../Common/Loading"; -import Page from "../Common/components/Page"; -import ButtonV2 from "../Common/components/ButtonV2"; +import useFilters from "@/common/hooks/useFilters"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/components/Page"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { LocationSelect } from "../Common/LocationSelect"; -import Pagination from "../Common/Pagination"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import Pagination from "@/components/Common/Pagination"; import { Popover, PopoverButton, @@ -16,7 +16,7 @@ import { import { FieldLabel } from "../Form/FormFields/FormField"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { useTranslation } from "react-i18next"; -import { SortOption } from "../Common/SortDropdown"; +import { SortOption } from "@/components/Common/SortDropdown"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import useVitalsAspectRatioConfig from "../VitalsMonitor/useVitalsAspectRatioConfig"; import useQuery from "../../Utils/request/useQuery"; diff --git a/src/Components/Facility/ConsultationCard.tsx b/src/components/Facility/ConsultationCard.tsx similarity index 96% rename from src/Components/Facility/ConsultationCard.tsx rename to src/components/Facility/ConsultationCard.tsx index 23b9cb86567..f52353d5410 100644 --- a/src/Components/Facility/ConsultationCard.tsx +++ b/src/components/Facility/ConsultationCard.tsx @@ -1,13 +1,13 @@ import { navigate } from "raviger"; import { ConsultationModel } from "./models"; import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; import Chip from "../../CAREUI/display/Chip"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { useState } from "react"; -import DialogModal from "../Common/Dialog.js"; +import DialogModal from "@/components/Common/Dialog"; import Beds from "./Consultations/Beds"; import careConfig from "@careConfig"; diff --git a/src/Components/Facility/ConsultationClaims.tsx b/src/components/Facility/ConsultationClaims.tsx similarity index 95% rename from src/Components/Facility/ConsultationClaims.tsx rename to src/components/Facility/ConsultationClaims.tsx index 853d44c3c4c..a449f4c18f1 100644 --- a/src/Components/Facility/ConsultationClaims.tsx +++ b/src/components/Facility/ConsultationClaims.tsx @@ -2,10 +2,10 @@ import * as Notification from "../../Utils/Notifications"; import ClaimCard from "../HCX/ClaimCard"; import CreateClaimCard from "../HCX/CreateClaimCard"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; import { navigate } from "raviger"; import routes from "../../Redux/api"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; import useQuery from "../../Utils/request/useQuery"; import { useState } from "react"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx similarity index 89% rename from src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx index 48cdc363f9b..a2163e823f0 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx @@ -1,7 +1,7 @@ import { ConsultationTabProps } from "./index"; import { ABGPlots } from "../Consultations/ABGPlots"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationABGTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx similarity index 87% rename from src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx index 8bd5201d922..0ead59404b9 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx @@ -1,7 +1,7 @@ import { ConsultationTabProps } from "./index"; import { DialysisPlots } from "../Consultations/DialysisPlots"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationDialysisTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx similarity index 96% rename from src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx index 91922c99205..9810b0bab85 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx @@ -2,19 +2,19 @@ import { useEffect, useRef, useState } from "react"; import { ConsultationTabProps } from "./index"; import useQuery from "../../../Utils/request/useQuery"; import CameraFeed from "../../CameraFeed/CameraFeed"; -import Loading from "../../Common/Loading"; +import Loading from "@/components/Common/Loading"; import CameraPresetSelect from "../../CameraFeed/CameraPresetSelect"; import { triggerGoal } from "../../../Integrations/Plausible"; -import useAuthUser from "../../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import useOperateCamera, { PTZPayload, } from "../../CameraFeed/useOperateCamera"; import request from "../../../Utils/request/request"; import { classNames, isIOS } from "../../../Utils/utils"; -import ConfirmDialog from "../../Common/ConfirmDialog"; -import useBreakpoints from "../../../Common/hooks/useBreakpoints"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; import { Warn } from "../../../Utils/Notifications"; import { useTranslation } from "react-i18next"; import { diff --git a/src/Components/Facility/ConsultationDetails/ConsultationFilesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationFilesTab.tsx similarity index 100% rename from src/Components/Facility/ConsultationDetails/ConsultationFilesTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationFilesTab.tsx diff --git a/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx similarity index 91% rename from src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx index 7f49fda1581..967d987414e 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx @@ -1,12 +1,12 @@ import { ConsultationTabProps } from "./index"; import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { navigate } from "raviger"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import InvestigationTab from "../Investigations/investigationsTab"; import { t } from "i18next"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationInvestigationsTab = (props: ConsultationTabProps) => { return (
diff --git a/src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx similarity index 93% rename from src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx index 27af4bb6480..9bd7b662d4b 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx @@ -1,5 +1,5 @@ import { ConsultationTabProps } from "./index"; -import PageTitle from "../../Common/PageHeadTitle"; +import PageTitle from "@/components/Common/PageHeadTitle"; import MedicineAdministrationSheet from "../../Medicine/MedicineAdministrationSheet"; import { MedicinePrescriptionSummary } from "../../Medicine/MedicinePrescriptionSummary"; diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx similarity index 90% rename from src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx index 7aed6bb96d5..86afc562e91 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx @@ -1,7 +1,7 @@ import { NeurologicalTable } from "../Consultations/NeurologicalTables"; import { ConsultationTabProps } from "./index"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationNeurologicalMonitoringTab = ( props: ConsultationTabProps, diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx similarity index 96% rename from src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx index 63e3330bffd..6203377892d 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx @@ -5,12 +5,12 @@ import { useTranslation } from "react-i18next"; import request from "../../../Utils/request/request"; import routes from "../../../Redux/api"; import { RoutineAnalysisRes, RoutineFields } from "../models"; -import Loading from "../../Common/Loading"; +import Loading from "@/components/Common/Loading"; import { classNames, formatDate, formatTime } from "../../../Utils/utils"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export default function ConsultationNursingTab(props: ConsultationTabProps) { const { t } = useTranslation(); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx similarity index 89% rename from src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx index f1b51ec4b81..faad29f0908 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx @@ -1,7 +1,7 @@ import { ConsultationTabProps } from "./index"; import { NutritionPlots } from "../Consultations/NutritionPlots"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationNutritionTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx similarity index 88% rename from src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx index 5f8c0403afe..6f055144618 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx @@ -1,7 +1,7 @@ import { ConsultationTabProps } from "./index"; import { PressureSoreDiagrams } from "../Consultations/PressureSoreDiagrams"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationPressureSoreTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx similarity index 90% rename from src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx index ef4482b674c..25d27dcf6b0 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx @@ -1,7 +1,7 @@ import { ConsultationTabProps } from "./index"; import { PrimaryParametersPlot } from "../Consultations/PrimaryParametersPlot"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationSummaryTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx similarity index 99% rename from src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 88b9b292eea..de2fc6a7e5a 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -5,7 +5,7 @@ import { BedModel } from "../models"; import HL7PatientVitalsMonitor from "../../VitalsMonitor/HL7PatientVitalsMonitor"; import VentilatorPatientVitalsMonitor from "../../VitalsMonitor/VentilatorPatientVitalsMonitor"; import useVitalsAspectRatioConfig from "../../VitalsMonitor/useVitalsAspectRatioConfig"; -import { DISCHARGE_REASONS } from "../../../Common/constants"; +import { DISCHARGE_REASONS } from "@/common/constants"; import PrescriptionsTable from "../../Medicine/PrescriptionsTable"; import Chip from "../../../CAREUI/display/Chip"; import { @@ -15,7 +15,7 @@ import { isAntenatal, isPostPartum, } from "../../../Utils/utils"; -import ReadMore from "../../Common/components/Readmore"; +import ReadMore from "@/components/Common/components/Readmore"; import DailyRoundsList from "../Consultations/DailyRoundsList"; import EventsList from "./Events/EventsList"; import { getVitalsMonitorSocketUrl } from "../../VitalsMonitor/utils"; @@ -23,9 +23,9 @@ import useQuery from "../../../Utils/request/useQuery"; import routes from "../../../Redux/api"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import EncounterSymptomsCard from "../../Symptoms/SymptomsCard"; -import Tabs from "../../Common/components/Tabs"; +import Tabs from "@/components/Common/components/Tabs"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { const [hl7SocketUrl, setHL7SocketUrl] = useState(); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx similarity index 90% rename from src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx rename to src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx index 3381045faeb..23f5852cad1 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx @@ -1,7 +1,7 @@ import { ConsultationTabProps } from "./index"; import { VentilatorPlot } from "../Consultations/VentilatorPlot"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export const ConsultationVentilatorTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/Events/EventsList.tsx b/src/components/Facility/ConsultationDetails/Events/EventsList.tsx similarity index 95% rename from src/Components/Facility/ConsultationDetails/Events/EventsList.tsx rename to src/components/Facility/ConsultationDetails/Events/EventsList.tsx index b3897dee145..81eced70e87 100644 --- a/src/Components/Facility/ConsultationDetails/Events/EventsList.tsx +++ b/src/components/Facility/ConsultationDetails/Events/EventsList.tsx @@ -1,14 +1,14 @@ import { useTranslation } from "react-i18next"; import { TimelineNode } from "../../../../CAREUI/display/Timeline"; import PaginatedList from "../../../../CAREUI/misc/PaginatedList"; -import { useSlugs } from "../../../../Common/hooks/useSlug"; +import { useSlugs } from "@/common/hooks/useSlug"; import routes from "../../../../Redux/api"; import LoadingLogUpdateCard from "../../Consultations/DailyRounds/LoadingCard"; import GenericEvent from "./GenericEvent"; import { getEventIcon } from "./iconMap"; import { EventGeneric } from "./types"; -import SortDropdownMenu from "../../../Common/SortDropdown"; -import { EVENTS_SORT_OPTIONS } from "../../../../Common/constants"; +import SortDropdownMenu from "@/components/Common/SortDropdown"; +import { EVENTS_SORT_OPTIONS } from "@/common/constants"; import { QueryParams } from "../../../../Utils/request/types"; import { useState } from "react"; diff --git a/src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx b/src/components/Facility/ConsultationDetails/Events/GenericEvent.tsx similarity index 100% rename from src/Components/Facility/ConsultationDetails/Events/GenericEvent.tsx rename to src/components/Facility/ConsultationDetails/Events/GenericEvent.tsx diff --git a/src/Components/Facility/ConsultationDetails/Events/iconMap.ts b/src/components/Facility/ConsultationDetails/Events/iconMap.ts similarity index 100% rename from src/Components/Facility/ConsultationDetails/Events/iconMap.ts rename to src/components/Facility/ConsultationDetails/Events/iconMap.ts diff --git a/src/Components/Facility/ConsultationDetails/Events/types.ts b/src/components/Facility/ConsultationDetails/Events/types.ts similarity index 100% rename from src/Components/Facility/ConsultationDetails/Events/types.ts rename to src/components/Facility/ConsultationDetails/Events/types.ts diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/components/Facility/ConsultationDetails/index.tsx similarity index 98% rename from src/Components/Facility/ConsultationDetails/index.tsx rename to src/components/Facility/ConsultationDetails/index.tsx index a6af8d39a78..6a4dba966c4 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/components/Facility/ConsultationDetails/index.tsx @@ -1,4 +1,4 @@ -import { GENDER_TYPES } from "../../../Common/constants"; +import { GENDER_TYPES } from "@/common/constants"; import { ConsultationModel } from "../models"; import { useCallback, useEffect, useState } from "react"; import DoctorVideoSlideover from "../DoctorVideoSlideover"; @@ -12,7 +12,7 @@ import { import { Link, navigate, useQueryParams } from "raviger"; import { triggerGoal } from "../../../Integrations/Plausible"; -import useAuthUser from "../../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import { ConsultationUpdatesTab } from "./ConsultationUpdatesTab"; import { ConsultationABGTab } from "./ConsultationABGTab"; import ConsultationNursingTab from "./ConsultationNursingTab"; @@ -29,7 +29,7 @@ import ABDMRecordsTab from "../../ABDM/ABDMRecordsTab"; import { ConsultationNutritionTab } from "./ConsultationNutritionTab"; import PatientNotesSlideover from "../PatientNotesSlideover"; import PatientInfoCard from "../../Patient/PatientInfoCard"; -import RelativeDateUserMention from "../../Common/RelativeDateUserMention"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; import DiagnosesListAccordion from "../../Diagnosis/DiagnosesListAccordion"; import { AbhaNumberModel } from "../../ABDM/types/abha"; import routes from "../../../Redux/api"; @@ -39,8 +39,8 @@ import Error404 from "../../ErrorPages/404"; import { useTranslation } from "react-i18next"; import useQuery from "../../../Utils/request/useQuery"; -import Loading from "@/Components/Common/Loading"; -import PageTitle from "@/Components/Common/PageTitle"; +import Loading from "@/components/Common/Loading"; +import PageTitle from "@/components/Common/PageTitle"; export interface ConsultationTabProps { consultationId: string; diff --git a/src/Components/Facility/ConsultationDoctorNotes/index.tsx b/src/components/Facility/ConsultationDoctorNotes/index.tsx similarity index 90% rename from src/Components/Facility/ConsultationDoctorNotes/index.tsx rename to src/components/Facility/ConsultationDoctorNotes/index.tsx index 3d334ba2cb6..f422eca2763 100644 --- a/src/Components/Facility/ConsultationDoctorNotes/index.tsx +++ b/src/components/Facility/ConsultationDoctorNotes/index.tsx @@ -1,21 +1,21 @@ import { useState } from "react"; -import * as Notification from "../../../Utils/Notifications.js"; -import Page from "../../Common/components/Page"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import * as Notification from "../../../Utils/Notifications"; +import Page from "@/components/Common/components/Page"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; -import { useMessageListener } from "../../../Common/hooks/useMessageListener"; -import PatientConsultationNotesList from "../PatientConsultationNotesList.js"; -import { PatientNoteStateType, PaitentNotesReplyModel } from "../models.js"; -import routes from "../../../Redux/api.js"; -import request from "../../../Utils/request/request.js"; -import useQuery from "../../../Utils/request/useQuery.js"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; +import PatientConsultationNotesList from "../PatientConsultationNotesList"; +import { PatientNoteStateType, PaitentNotesReplyModel } from "../models"; +import routes from "../../../Redux/api"; +import request from "../../../Utils/request/request"; +import useQuery from "../../../Utils/request/useQuery"; import useKeyboardShortcut from "use-keyboard-shortcut"; -import { classNames, isAppleDevice, keysOf } from "../../../Utils/utils.js"; -import AutoExpandingTextInputFormField from "../../Form/FormFields/AutoExpandingTextInputFormField.js"; -import { PATIENT_NOTES_THREADS } from "../../../Common/constants.js"; -import useAuthUser from "../../../Common/hooks/useAuthUser.js"; -import DoctorNoteReplyPreviewCard from "../DoctorNoteReplyPreviewCard.js"; +import { classNames, isAppleDevice, keysOf } from "../../../Utils/utils"; +import AutoExpandingTextInputFormField from "../../Form/FormFields/AutoExpandingTextInputFormField"; +import { PATIENT_NOTES_THREADS } from "@/common/constants"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import DoctorNoteReplyPreviewCard from "../DoctorNoteReplyPreviewCard"; import { t } from "i18next"; interface ConsultationDoctorNotesProps { diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/components/Facility/ConsultationForm.tsx similarity index 97% rename from src/Components/Facility/ConsultationForm.tsx rename to src/components/Facility/ConsultationForm.tsx index ef3d7daa781..47ba2eea77f 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/components/Facility/ConsultationForm.tsx @@ -1,4 +1,4 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { BedModel, FacilityModel } from "./models"; import { @@ -8,22 +8,22 @@ import { PATIENT_CATEGORIES, REVIEW_AT_CHOICES, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +} from "@/common/constants"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; import InvestigationBuilder, { InvestigationType, -} from "../Common/prescription-builder/InvestigationBuilder"; +} from "@/components/Common/prescription-builder/InvestigationBuilder"; import { LegacyRef, createRef, useEffect, useRef, useState } from "react"; import ProcedureBuilder, { ProcedureType, -} from "../Common/prescription-builder/ProcedureBuilder"; -import { BedSelect } from "../Common/BedSelect"; +} from "@/components/Common/prescription-builder/ProcedureBuilder"; +import { BedSelect } from "@/components/Common/BedSelect"; import Beds from "./Consultations/Beds"; import CareIcon from "../../CAREUI/icons/CareIcon"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FieldChangeEvent, FieldChangeEventHandler, @@ -33,41 +33,41 @@ import PatientCategorySelect from "../Patient/PatientCategorySelect"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -import UserAutocomplete from "../Common/UserAutocompleteFormField"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; import { UserBareMinimum } from "../Users/models"; import { navigate } from "raviger"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import useVisibility from "../../Utils/useVisibility"; import dayjs from "../../Utils/dayjs"; import RouteToFacilitySelect, { RouteToFacility, -} from "../Common/RouteToFacilitySelect.js"; -import { LocationSelect } from "../Common/LocationSelect.js"; -import { classNames } from "../../Utils/utils.js"; +} from "@/components/Common/RouteToFacilitySelect"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import { classNames } from "../../Utils/utils"; import { ConditionVerificationStatuses, ConsultationDiagnosis, CreateDiagnosis, -} from "../Diagnosis/types.js"; +} from "../Diagnosis/types"; import { CreateDiagnosesBuilder, EditDiagnosesBuilder, -} from "../Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.js"; -import request from "../../Utils/request/request.js"; -import routes from "../../Redux/api.js"; -import useQuery from "../../Utils/request/useQuery.js"; +} from "../Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; +import useQuery from "../../Utils/request/useQuery"; import { t } from "i18next"; -import { Writable } from "../../Utils/types.js"; -import { EncounterSymptom } from "../Symptoms/types.js"; +import { Writable } from "../../Utils/types"; +import { EncounterSymptom } from "../Symptoms/types"; import { EncounterSymptomsBuilder, CreateSymptomsBuilder, -} from "../Symptoms/SymptomsBuilder.js"; +} from "../Symptoms/SymptomsBuilder"; import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; -import PageTitle from "@/Components/Common/PageTitle"; +import Loading from "@/components/Common/Loading"; +import PageTitle from "@/components/Common/PageTitle"; type BooleanStrings = "true" | "false"; diff --git a/src/Components/Facility/Consultations/ABGPlots.tsx b/src/components/Facility/Consultations/ABGPlots.tsx similarity index 97% rename from src/Components/Facility/Consultations/ABGPlots.tsx rename to src/components/Facility/Consultations/ABGPlots.tsx index 10415920ceb..36f4d934254 100644 --- a/src/Components/Facility/Consultations/ABGPlots.tsx +++ b/src/components/Facility/Consultations/ABGPlots.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; import { LinePlot } from "./components/LinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; diff --git a/src/Components/Facility/Consultations/BedActivityTimeline.tsx b/src/components/Facility/Consultations/BedActivityTimeline.tsx similarity index 100% rename from src/Components/Facility/Consultations/BedActivityTimeline.tsx rename to src/components/Facility/Consultations/BedActivityTimeline.tsx diff --git a/src/Components/Facility/Consultations/Beds.tsx b/src/components/Facility/Consultations/Beds.tsx similarity index 94% rename from src/Components/Facility/Consultations/Beds.tsx rename to src/components/Facility/Consultations/Beds.tsx index 0b62af9fdcb..4c8409fbebf 100644 --- a/src/Components/Facility/Consultations/Beds.tsx +++ b/src/components/Facility/Consultations/Beds.tsx @@ -1,4 +1,4 @@ -import * as Notification from "../../../Utils/Notifications.js"; +import * as Notification from "../../../Utils/Notifications"; import { BedModel, CurrentBed } from "../models"; import { Dispatch, SetStateAction, useState } from "react"; @@ -6,23 +6,23 @@ import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; import useQuery from "../../../Utils/request/useQuery"; -import { BedSelect } from "../../Common/BedSelect"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import { BedSelect } from "@/components/Common/BedSelect"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import CircularProgress from "../../Common/components/CircularProgress.js"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import { FieldLabel } from "../../Form/FormFields/FormField"; -import Loading from "../../Common/Loading"; +import Loading from "@/components/Common/Loading"; import TextFormField from "../../Form/FormFields/TextFormField"; import dayjs from "../../../Utils/dayjs"; -import { AssetSelect } from "../../Common/AssetSelect.js"; -import DialogModal from "../../Common/Dialog.js"; +import { AssetSelect } from "@/components/Common/AssetSelect"; +import DialogModal from "@/components/Common/Dialog"; import { Link } from "raviger"; import { AssetClass, assetClassProps, AssetData, -} from "../../Assets/AssetTypes.js"; -import Chip from "../../../CAREUI/display/Chip.js"; +} from "../../Assets/AssetTypes"; +import Chip from "../../../CAREUI/display/Chip"; import BedActivityTimeline from "./BedActivityTimeline"; interface BedsProps { diff --git a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx similarity index 95% rename from src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx rename to src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index 705b0390e50..467d9d980e6 100644 --- a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -1,10 +1,10 @@ import { useTranslation } from "react-i18next"; import CareIcon from "../../../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { DailyRoundsModel } from "../../../Patient/models"; import LogUpdateCardAttribute from "./LogUpdateCardAttribute"; import { ConsultationModel } from "../../models"; -import { useSlugs } from "../../../../Common/hooks/useSlug"; +import { useSlugs } from "@/common/hooks/useSlug"; interface Props { round: DailyRoundsModel; diff --git a/src/Components/Facility/Consultations/DailyRounds/LoadingCard.tsx b/src/components/Facility/Consultations/DailyRounds/LoadingCard.tsx similarity index 100% rename from src/Components/Facility/Consultations/DailyRounds/LoadingCard.tsx rename to src/components/Facility/Consultations/DailyRounds/LoadingCard.tsx diff --git a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx similarity index 97% rename from src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx rename to src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index 7e58f96069c..d433710a787 100644 --- a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -1,5 +1,5 @@ import { useTranslation } from "react-i18next"; -import PatientCategoryBadge from "../../../Common/PatientCategoryBadge"; +import PatientCategoryBadge from "@/components/Common/PatientCategoryBadge"; import { DailyRoundsModel, NameQuantity } from "../../../Patient/models"; import { PatientCategory } from "../../models"; diff --git a/src/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx b/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx similarity index 100% rename from src/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx rename to src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx diff --git a/src/Components/Facility/Consultations/DailyRoundsFilter.tsx b/src/components/Facility/Consultations/DailyRoundsFilter.tsx similarity index 98% rename from src/Components/Facility/Consultations/DailyRoundsFilter.tsx rename to src/components/Facility/Consultations/DailyRoundsFilter.tsx index f84705e0fa8..5e9104b5992 100644 --- a/src/Components/Facility/Consultations/DailyRoundsFilter.tsx +++ b/src/components/Facility/Consultations/DailyRoundsFilter.tsx @@ -4,7 +4,7 @@ import { PopoverPanel, Transition, } from "@headlessui/react"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { SelectFormField } from "../../Form/FormFields/SelectFormField"; import TextFormField from "../../Form/FormFields/TextFormField"; import CareIcon from "../../../CAREUI/icons/CareIcon"; diff --git a/src/Components/Facility/Consultations/DailyRoundsList.tsx b/src/components/Facility/Consultations/DailyRoundsList.tsx similarity index 97% rename from src/Components/Facility/Consultations/DailyRoundsList.tsx rename to src/components/Facility/Consultations/DailyRoundsList.tsx index 561a4f1a958..0ae6ffb1765 100644 --- a/src/Components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/components/Facility/Consultations/DailyRoundsList.tsx @@ -7,12 +7,12 @@ import routes from "../../../Redux/api"; import PaginatedList from "../../../CAREUI/misc/PaginatedList"; import DailyRoundsFilter from "./DailyRoundsFilter"; import { ConsultationModel } from "../models"; -import { useSlugs } from "../../../Common/hooks/useSlug"; +import { useSlugs } from "@/common/hooks/useSlug"; import Timeline, { TimelineNode } from "../../../CAREUI/display/Timeline"; import { useState } from "react"; import { QueryParams } from "../../../Utils/request/types"; -import { UserRole } from "../../../Common/constants"; +import { UserRole } from "@/common/constants"; interface Props { consultation: ConsultationModel; diff --git a/src/Components/Facility/Consultations/DialysisPlots.tsx b/src/components/Facility/Consultations/DialysisPlots.tsx similarity index 95% rename from src/Components/Facility/Consultations/DialysisPlots.tsx rename to src/components/Facility/Consultations/DialysisPlots.tsx index 54c2dab60b9..a99a9d43ffb 100644 --- a/src/Components/Facility/Consultations/DialysisPlots.tsx +++ b/src/components/Facility/Consultations/DialysisPlots.tsx @@ -2,8 +2,8 @@ import { useEffect, useState } from "react"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; import { LinePlot } from "./components/LinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import { DialysisPlotsFields } from "../models"; diff --git a/src/Components/Facility/Consultations/Mews.tsx b/src/components/Facility/Consultations/Mews.tsx similarity index 100% rename from src/Components/Facility/Consultations/Mews.tsx rename to src/components/Facility/Consultations/Mews.tsx diff --git a/src/Components/Facility/Consultations/NeurologicalTables.tsx b/src/components/Facility/Consultations/NeurologicalTables.tsx similarity index 99% rename from src/Components/Facility/Consultations/NeurologicalTables.tsx rename to src/components/Facility/Consultations/NeurologicalTables.tsx index 6ee363e341f..bbf6d529c08 100644 --- a/src/Components/Facility/Consultations/NeurologicalTables.tsx +++ b/src/components/Facility/Consultations/NeurologicalTables.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; -import Pagination from "../../Common/Pagination"; +import Pagination from "@/components/Common/Pagination"; import { CONSCIOUSNESS_LEVEL, EYE_OPEN_SCALE, @@ -12,7 +12,7 @@ import { PAGINATION_LIMIT, PUPIL_REACTION_OPTIONS, VERBAL_RESPONSE_SCALE, -} from "../../../Common/constants"; +} from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import { useTranslation } from "react-i18next"; import { NeurologicalTablesFields } from "../models"; diff --git a/src/Components/Facility/Consultations/NursingPlot.tsx b/src/components/Facility/Consultations/NursingPlot.tsx similarity index 96% rename from src/Components/Facility/Consultations/NursingPlot.tsx rename to src/components/Facility/Consultations/NursingPlot.tsx index c747ec60d26..5797be27737 100644 --- a/src/Components/Facility/Consultations/NursingPlot.tsx +++ b/src/components/Facility/Consultations/NursingPlot.tsx @@ -1,12 +1,9 @@ import { useEffect, useState } from "react"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; -import { - NURSING_CARE_PROCEDURES, - PAGINATION_LIMIT, -} from "../../../Common/constants"; +import { NURSING_CARE_PROCEDURES, PAGINATION_LIMIT } from "@/common/constants"; -import Pagination from "../../Common/Pagination"; +import Pagination from "@/components/Common/Pagination"; import { formatDateTime } from "../../../Utils/utils"; import { useTranslation } from "react-i18next"; import { NursingPlotFields } from "../models"; diff --git a/src/Components/Facility/Consultations/NutritionPlots.tsx b/src/components/Facility/Consultations/NutritionPlots.tsx similarity index 99% rename from src/Components/Facility/Consultations/NutritionPlots.tsx rename to src/components/Facility/Consultations/NutritionPlots.tsx index b489b257184..dea0f351a2c 100644 --- a/src/Components/Facility/Consultations/NutritionPlots.tsx +++ b/src/components/Facility/Consultations/NutritionPlots.tsx @@ -4,8 +4,8 @@ import request from "../../../Utils/request/request"; import { LinePlot } from "./components/LinePlot"; import { StackedLinePlot } from "./components/StackedLinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { NutritionPlotsFields } from "../models"; diff --git a/src/Components/Facility/Consultations/PainDiagrams.tsx b/src/components/Facility/Consultations/PainDiagrams.tsx similarity index 100% rename from src/Components/Facility/Consultations/PainDiagrams.tsx rename to src/components/Facility/Consultations/PainDiagrams.tsx diff --git a/src/Components/Facility/Consultations/PressureSoreDiagrams.tsx b/src/components/Facility/Consultations/PressureSoreDiagrams.tsx similarity index 97% rename from src/Components/Facility/Consultations/PressureSoreDiagrams.tsx rename to src/components/Facility/Consultations/PressureSoreDiagrams.tsx index 8113a81e99b..4da3dedc60d 100644 --- a/src/Components/Facility/Consultations/PressureSoreDiagrams.tsx +++ b/src/components/Facility/Consultations/PressureSoreDiagrams.tsx @@ -1,8 +1,8 @@ import { useEffect, useState } from "react"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import { PressureSoreDiagramsFields, PressureSoreDiagramsRes } from "../models"; diff --git a/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx b/src/components/Facility/Consultations/PrimaryParametersPlot.tsx similarity index 97% rename from src/Components/Facility/Consultations/PrimaryParametersPlot.tsx rename to src/components/Facility/Consultations/PrimaryParametersPlot.tsx index e6d45c706af..eb831127773 100644 --- a/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx +++ b/src/components/Facility/Consultations/PrimaryParametersPlot.tsx @@ -3,14 +3,14 @@ import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; import { LinePlot } from "./components/LinePlot"; import { StackedLinePlot } from "./components/StackedLinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { PainDiagrams } from "./PainDiagrams"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; import dayjs from "../../../Utils/dayjs"; -import { meanArterialPressure } from "../../Common/BloodPressureFormField"; +import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; import { PrimaryParametersPlotFields } from "../models"; interface PrimaryParametersPlotProps { diff --git a/src/Components/Facility/Consultations/VentilatorPlot.tsx b/src/components/Facility/Consultations/VentilatorPlot.tsx similarity index 98% rename from src/Components/Facility/Consultations/VentilatorPlot.tsx rename to src/components/Facility/Consultations/VentilatorPlot.tsx index 778f274918c..db672f5de7d 100644 --- a/src/Components/Facility/Consultations/VentilatorPlot.tsx +++ b/src/components/Facility/Consultations/VentilatorPlot.tsx @@ -2,8 +2,8 @@ import { useEffect, useState } from "react"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; import { LinePlot } from "./components/LinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; +import Pagination from "@/components/Common/Pagination"; +import { PAGINATION_LIMIT } from "@/common/constants"; import { formatDateTime } from "../../../Utils/utils"; import BinaryChronologicalChart from "./components/BinaryChronologicalChart"; import { VentilatorPlotFields } from "../models"; diff --git a/src/Components/Facility/Consultations/components/BinaryChronologicalChart.tsx b/src/components/Facility/Consultations/components/BinaryChronologicalChart.tsx similarity index 100% rename from src/Components/Facility/Consultations/components/BinaryChronologicalChart.tsx rename to src/components/Facility/Consultations/components/BinaryChronologicalChart.tsx diff --git a/src/Components/Facility/Consultations/components/LinePlot.tsx b/src/components/Facility/Consultations/components/LinePlot.tsx similarity index 100% rename from src/Components/Facility/Consultations/components/LinePlot.tsx rename to src/components/Facility/Consultations/components/LinePlot.tsx diff --git a/src/Components/Facility/Consultations/components/StackedLinePlot.tsx b/src/components/Facility/Consultations/components/StackedLinePlot.tsx similarity index 100% rename from src/Components/Facility/Consultations/components/StackedLinePlot.tsx rename to src/components/Facility/Consultations/components/StackedLinePlot.tsx diff --git a/src/Components/Facility/DischargeModal.tsx b/src/components/Facility/DischargeModal.tsx similarity index 96% rename from src/Components/Facility/DischargeModal.tsx rename to src/components/Facility/DischargeModal.tsx index 786e23ec8a3..122aacd1368 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/components/Facility/DischargeModal.tsx @@ -1,17 +1,17 @@ import * as Notification from "../../Utils/Notifications"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { useEffect, useState } from "react"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import ClaimCard from "../HCX/ClaimCard"; import { ConsultationModel } from "./models"; import CreateClaimCard from "../HCX/CreateClaimCard"; -import { DISCHARGE_REASONS } from "../../Common/constants"; -import DialogModal from "../Common/Dialog"; +import { DISCHARGE_REASONS } from "@/common/constants"; +import DialogModal from "@/components/Common/Dialog"; import { FacilityModel } from "./models"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FieldError } from "../Form/FieldValidators"; import { FieldLabel } from "../Form/FormFields/FormField"; import { HCXClaimModel } from "../HCX/models"; @@ -20,14 +20,14 @@ import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import dayjs from "../../Utils/dayjs"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; import useQuery from "../../Utils/request/useQuery"; import { useTranslation } from "react-i18next"; -import useConfirmedAction from "../../Common/hooks/useConfirmedAction"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import useConfirmedAction from "@/common/hooks/useConfirmedAction"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import routes from "../../Redux/api"; import { EditDiagnosesBuilder } from "../Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; -import Loading from "../Common/Loading"; +import Loading from "@/components/Common/Loading"; import careConfig from "@careConfig"; import request from "../../Utils/request/request"; diff --git a/src/Components/Facility/DischargeSummaryModal.tsx b/src/components/Facility/DischargeSummaryModal.tsx similarity index 97% rename from src/Components/Facility/DischargeSummaryModal.tsx rename to src/components/Facility/DischargeSummaryModal.tsx index 01020b25ad3..37609d84e89 100644 --- a/src/Components/Facility/DischargeSummaryModal.tsx +++ b/src/components/Facility/DischargeSummaryModal.tsx @@ -1,8 +1,8 @@ import { useState } from "react"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import TextFormField from "../Form/FormFields/TextFormField"; import { ConsultationModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { EmailValidator, diff --git a/src/Components/Facility/DischargedPatientsList.tsx b/src/components/Facility/DischargedPatientsList.tsx similarity index 97% rename from src/Components/Facility/DischargedPatientsList.tsx rename to src/components/Facility/DischargedPatientsList.tsx index 47e5cd5a68d..d9a7ac9aae7 100644 --- a/src/Components/Facility/DischargedPatientsList.tsx +++ b/src/components/Facility/DischargedPatientsList.tsx @@ -1,8 +1,8 @@ import { Link, navigate } from "raviger"; import routes from "../../Redux/api"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import Loading from "../Common/Loading"; +import Loading from "@/components/Common/Loading"; import { PatientModel } from "../Patient/models"; import useQuery from "../../Utils/request/useQuery"; import SearchInput from "../Form/SearchInput"; @@ -13,20 +13,20 @@ import { DISCHARGE_REASONS, GENDER_TYPES, PATIENT_CATEGORIES, -} from "../../Common/constants"; +} from "@/common/constants"; import CareIcon from "../../CAREUI/icons/CareIcon"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import { formatPatientAge, humanizeStrings } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import SortDropdownMenu from "../Common/SortDropdown"; -import useFilters from "../../Common/hooks/useFilters"; +import SortDropdownMenu from "@/components/Common/SortDropdown"; +import useFilters from "@/common/hooks/useFilters"; import PatientFilter from "../Patient/PatientFilter"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CountBlock from "../../CAREUI/display/Count"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import { useEffect, useState } from "react"; -import { parseOptionId } from "../../Common/utils"; +import { parseOptionId } from "@/common/utils"; import { DIAGNOSES_FILTER_LABELS, DiagnosesFilterKey, @@ -35,7 +35,7 @@ import { import { getDiagnosesByIds } from "../Diagnosis/utils"; import { ICD11DiagnosisModel } from "./models"; import FilterBadge from "../../CAREUI/display/FilterBadge"; -import Tabs from "../Common/components/Tabs"; +import Tabs from "@/components/Common/components/Tabs"; const DischargedPatientsList = ({ facility_external_id, diff --git a/src/Components/Facility/DoctorNote.tsx b/src/components/Facility/DoctorNote.tsx similarity index 95% rename from src/Components/Facility/DoctorNote.tsx rename to src/components/Facility/DoctorNote.tsx index c2bf8155cf2..456eab075c3 100644 --- a/src/Components/Facility/DoctorNote.tsx +++ b/src/components/Facility/DoctorNote.tsx @@ -1,5 +1,5 @@ import InfiniteScroll from "react-infinite-scroll-component"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import PatientNoteCard from "./PatientNoteCard"; import { PatientNoteStateType, PatientNotesModel } from "./models"; import DoctorNoteReplyPreviewCard from "./DoctorNoteReplyPreviewCard"; diff --git a/src/Components/Facility/DoctorNoteReplyPreviewCard.tsx b/src/components/Facility/DoctorNoteReplyPreviewCard.tsx similarity index 97% rename from src/Components/Facility/DoctorNoteReplyPreviewCard.tsx rename to src/components/Facility/DoctorNoteReplyPreviewCard.tsx index 470f05f2bfe..8e9009ed1a5 100644 --- a/src/Components/Facility/DoctorNoteReplyPreviewCard.tsx +++ b/src/components/Facility/DoctorNoteReplyPreviewCard.tsx @@ -1,6 +1,6 @@ import React from "react"; import { PaitentNotesReplyModel } from "./models"; -import { USER_TYPES_MAP } from "../../Common/constants"; +import { USER_TYPES_MAP } from "@/common/constants"; import { formatDateTime, relativeDate } from "../../Utils/utils"; interface Props { diff --git a/src/Components/Facility/DoctorVideoSlideover.tsx b/src/components/Facility/DoctorVideoSlideover.tsx similarity index 99% rename from src/Components/Facility/DoctorVideoSlideover.tsx rename to src/components/Facility/DoctorVideoSlideover.tsx index 519a04014fa..b45bdbeb59e 100644 --- a/src/Components/Facility/DoctorVideoSlideover.tsx +++ b/src/components/Facility/DoctorVideoSlideover.tsx @@ -9,13 +9,13 @@ import { isUserOnline, relativeTime, } from "../../Utils/utils"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import { triggerGoal } from "../../Integrations/Plausible"; import { Warn } from "../../Utils/Notifications"; import Switch from "../../CAREUI/interactive/Switch"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import Loading from "../Common/Loading"; +import Loading from "@/components/Common/Loading"; import { PLUGIN_DoctorConnectButtons } from "@/PluginEngine"; const UserGroups = { diff --git a/src/Components/Facility/DuplicatePatientDialog.tsx b/src/components/Facility/DuplicatePatientDialog.tsx similarity index 96% rename from src/Components/Facility/DuplicatePatientDialog.tsx rename to src/components/Facility/DuplicatePatientDialog.tsx index b9d740f85e8..92da71a1321 100644 --- a/src/Components/Facility/DuplicatePatientDialog.tsx +++ b/src/components/Facility/DuplicatePatientDialog.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; import { DupPatientModel } from "./models"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/Facility/FacilityBedCapacity.tsx b/src/components/Facility/FacilityBedCapacity.tsx similarity index 95% rename from src/Components/Facility/FacilityBedCapacity.tsx rename to src/components/Facility/FacilityBedCapacity.tsx index a293787afce..0fe3609d6b0 100644 --- a/src/Components/Facility/FacilityBedCapacity.tsx +++ b/src/components/Facility/FacilityBedCapacity.tsx @@ -1,10 +1,10 @@ import { useState } from "react"; -import { BED_TYPES } from "../../Common/constants"; +import { BED_TYPES } from "@/common/constants"; import routes from "../../Redux/api"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import useQuery from "../../Utils/request/useQuery"; -import DialogModal from "../Common/Dialog"; -import ButtonV2 from "../Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { BedCapacity } from "./BedCapacity"; import BedTypeCard from "./BedTypeCard"; import CareIcon from "../../CAREUI/icons/CareIcon"; diff --git a/src/Components/Facility/FacilityBlock.tsx b/src/components/Facility/FacilityBlock.tsx similarity index 95% rename from src/Components/Facility/FacilityBlock.tsx rename to src/components/Facility/FacilityBlock.tsx index 0ad87b050c5..34e6b442b4c 100644 --- a/src/Components/Facility/FacilityBlock.tsx +++ b/src/components/Facility/FacilityBlock.tsx @@ -1,7 +1,7 @@ import { Link } from "raviger"; import { FacilityModel } from "./models"; import { ReactNode } from "react"; -import { Avatar } from "@/Components/Common/Avatar"; +import { Avatar } from "@/components/Common/Avatar"; export default function FacilityBlock(props: { facility: FacilityModel; diff --git a/src/Components/Facility/FacilityCard.tsx b/src/components/Facility/FacilityCard.tsx similarity index 97% rename from src/Components/Facility/FacilityCard.tsx rename to src/components/Facility/FacilityCard.tsx index e874a0f85c0..e7cc25f2494 100644 --- a/src/Components/Facility/FacilityCard.tsx +++ b/src/components/Facility/FacilityCard.tsx @@ -1,19 +1,22 @@ import { useState } from "react"; import { Link } from "raviger"; import { useTranslation } from "react-i18next"; -import { FACILITY_FEATURE_TYPES } from "../../Common/constants"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import * as Notification from "../../Utils/Notifications.js"; +import { FACILITY_FEATURE_TYPES } from "@/common/constants"; +import ButtonV2, { + Cancel, + Submit, +} from "@/components/Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications"; import Chip from "../../CAREUI/display/Chip"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { formatPhoneNumber, parsePhoneNumber } from "../../Utils/utils"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import careConfig from "@careConfig"; import { FacilityModel } from "./models"; -import { Avatar } from "../Common/Avatar"; +import { Avatar } from "@/components/Common/Avatar"; export const FacilityCard = (props: { facility: FacilityModel; diff --git a/src/Components/Facility/FacilityConfigure.tsx b/src/components/Facility/FacilityConfigure.tsx similarity index 93% rename from src/Components/Facility/FacilityConfigure.tsx rename to src/components/Facility/FacilityConfigure.tsx index 2d948bb9cf7..a8068692545 100644 --- a/src/Components/Facility/FacilityConfigure.tsx +++ b/src/components/Facility/FacilityConfigure.tsx @@ -1,16 +1,16 @@ import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; -import { Submit } from "../Common/components/ButtonV2"; +import { Submit } from "@/components/Common/components/ButtonV2"; import TextFormField from "../Form/FormFields/TextFormField"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import { ConfigureHealthFacility } from "../ABDM/ConfigureHealthFacility"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import { FieldChangeEvent } from "../Form/FormFields/Utils.js"; +import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { t } from "i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const initForm = { name: "", state: 0, diff --git a/src/Components/Facility/FacilityCreate.tsx b/src/components/Facility/FacilityCreate.tsx similarity index 96% rename from src/Components/Facility/FacilityCreate.tsx rename to src/components/Facility/FacilityCreate.tsx index 76e2c64ddb0..08939932840 100644 --- a/src/Components/Facility/FacilityCreate.tsx +++ b/src/components/Facility/FacilityCreate.tsx @@ -1,18 +1,21 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; +import ButtonV2, { + Cancel, + Submit, +} from "@/components/Common/components/ButtonV2"; import { CapacityModal, DistrictModel, DoctorModal, FacilityRequest, } from "./models"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave.js"; +import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; import { BED_TYPES, FACILITY_FEATURE_TYPES, FACILITY_TYPES, -} from "../../Common/constants"; +} from "@/common/constants"; import { MultiSelectFormField, SelectFormField, @@ -24,7 +27,7 @@ import { Transition, } from "@headlessui/react"; import { useEffect, useState } from "react"; -import Steps, { Step } from "../Common/Steps"; +import Steps, { Step } from "@/components/Common/Steps"; import { getPincodeDetails, includesIgnoreCase, @@ -36,36 +39,36 @@ import { validateLatitude, validateLongitude, validatePincode, -} from "../../Common/validation"; +} from "@/common/validation"; import { BedCapacity } from "./BedCapacity"; import BedTypeCard from "./BedTypeCard"; -import Card from "../../CAREUI/display/Card.js"; +import Card from "../../CAREUI/display/Card"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { StaffCapacity } from "./StaffCapacity.js"; -import StaffCountCard from "./StaffCountCard.js"; +import { StaffCapacity } from "./StaffCapacity"; +import StaffCountCard from "./StaffCountCard"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FormAction } from "../Form/Utils.js"; -import GLocationPicker from "../Common/GLocationPicker"; -import Page from "../Common/components/Page.js"; +import { FormAction } from "../Form/Utils"; +import GLocationPicker from "@/components/Common/GLocationPicker"; +import Page from "@/components/Common/components/Page"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import RadioFormField from "../Form/FormFields/RadioFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import { navigate } from "raviger"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import { useTranslation } from "react-i18next"; -import { PhoneNumberValidator } from "../Form/FieldValidators.js"; -import request from "../../Utils/request/request.js"; -import routes from "../../Redux/api.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import { RequestResult } from "../../Utils/request/types.js"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import SpokeFacilityEditor from "./SpokeFacilityEditor.js"; +import { PhoneNumberValidator } from "../Form/FieldValidators"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; +import useQuery from "../../Utils/request/useQuery"; +import { RequestResult } from "../../Utils/request/types"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import SpokeFacilityEditor from "./SpokeFacilityEditor"; import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface FacilityProps { facilityId?: string; } diff --git a/src/Components/Facility/FacilityFilter/DistrictSelect.tsx b/src/components/Facility/FacilityFilter/DistrictSelect.tsx similarity index 100% rename from src/Components/Facility/FacilityFilter/DistrictSelect.tsx rename to src/components/Facility/FacilityFilter/DistrictSelect.tsx diff --git a/src/Components/Facility/FacilityFilter/index.tsx b/src/components/Facility/FacilityFilter/index.tsx similarity index 85% rename from src/Components/Facility/FacilityFilter/index.tsx rename to src/components/Facility/FacilityFilter/index.tsx index df93d49f78c..b9c5586ccf8 100644 --- a/src/Components/Facility/FacilityFilter/index.tsx +++ b/src/components/Facility/FacilityFilter/index.tsx @@ -1,11 +1,11 @@ -import { FACILITY_TYPES } from "../../../Common/constants"; -import useMergeState from "../../../Common/hooks/useMergeState"; +import { FACILITY_TYPES } from "@/common/constants"; +import useMergeState from "@/common/hooks/useMergeState"; import FiltersSlideover from "../../../CAREUI/interactive/FiltersSlideover"; import { useTranslation } from "react-i18next"; -import StateAutocompleteFormField from "../../Common/StateAutocompleteFormField"; +import StateAutocompleteFormField from "@/components/Common/StateAutocompleteFormField"; import { FieldChangeEvent } from "../../Form/FormFields/Utils"; -import DistrictAutocompleteFormField from "../../Common/DistrictAutocompleteFormField"; -import LocalBodyAutocompleteFormField from "../../Common/LocalBodyAutocompleteFormField"; +import DistrictAutocompleteFormField from "@/components/Common/DistrictAutocompleteFormField"; +import LocalBodyAutocompleteFormField from "@/components/Common/LocalBodyAutocompleteFormField"; import { SelectFormField } from "../../Form/FormFields/SelectFormField"; function FacilityFilter(props: any) { diff --git a/src/Components/Facility/FacilityHome.tsx b/src/components/Facility/FacilityHome.tsx similarity index 94% rename from src/Components/Facility/FacilityHome.tsx rename to src/components/Facility/FacilityHome.tsx index 1a6b79611ad..13505889173 100644 --- a/src/Components/Facility/FacilityHome.tsx +++ b/src/components/Facility/FacilityHome.tsx @@ -1,47 +1,49 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import { FACILITY_FEATURE_TYPES, LocalStorageKeys, USER_TYPES, -} from "../../Common/constants"; -import DropdownMenu, { DropdownItem } from "../Common/components/Menu"; +} from "@/common/constants"; +import DropdownMenu, { + DropdownItem, +} from "@/components/Common/components/Menu"; import { useState } from "react"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import Chip from "../../CAREUI/display/Chip"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import ContactLink from "../Common/components/ContactLink"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import ContactLink from "@/components/Common/components/ContactLink"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import RecordMeta from "../../CAREUI/display/RecordMeta"; -import Table from "../Common/components/Table"; +import Table from "@/components/Common/components/Table"; import { navigate } from "raviger"; import { useTranslation } from "react-i18next"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import request from "../../Utils/request/request.js"; -import routes from "../../Redux/api.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import { FacilityHomeTriage } from "./FacilityHomeTriage.js"; -import { FacilityBedCapacity } from "./FacilityBedCapacity.js"; -import useSlug from "../../Common/hooks/useSlug.js"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; +import useQuery from "../../Utils/request/useQuery"; +import { FacilityHomeTriage } from "./FacilityHomeTriage"; +import { FacilityBedCapacity } from "./FacilityBedCapacity"; +import useSlug from "@/common/hooks/useSlug"; import { Popover, PopoverButton, PopoverPanel, Transition, } from "@headlessui/react"; -import { FieldLabel } from "../Form/FormFields/FormField.js"; -import { LocationSelect } from "../Common/LocationSelect.js"; -import { CameraFeedPermittedUserTypes } from "../../Utils/permissions.js"; -import { FacilityStaffList } from "./FacilityStaffList.js"; -import FacilityBlock from "./FacilityBlock.js"; -import Loading from "@/Components/Common/Loading"; -import AvatarEditable from "@/Components/Common/AvatarEditable"; -import AvatarEditModal from "@/Components/Common/AvatarEditModal"; +import { FieldLabel } from "../Form/FormFields/FormField"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import { CameraFeedPermittedUserTypes } from "../../Utils/permissions"; +import { FacilityStaffList } from "./FacilityStaffList"; +import FacilityBlock from "./FacilityBlock"; +import Loading from "@/components/Common/Loading"; +import AvatarEditable from "@/components/Common/AvatarEditable"; +import AvatarEditModal from "@/components/Common/AvatarEditModal"; import careConfig from "@careConfig"; import uploadFile from "@/Utils/request/uploadFile"; import { sleep } from "@/Utils/utils"; diff --git a/src/Components/Facility/FacilityHomeTriage.tsx b/src/components/Facility/FacilityHomeTriage.tsx similarity index 96% rename from src/Components/Facility/FacilityHomeTriage.tsx rename to src/components/Facility/FacilityHomeTriage.tsx index 67d7563846d..43f4e39f4e5 100644 --- a/src/Components/Facility/FacilityHomeTriage.tsx +++ b/src/components/Facility/FacilityHomeTriage.tsx @@ -1,6 +1,6 @@ import { navigate } from "raviger"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Table from "../Common/components/Table"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Table from "@/components/Common/components/Table"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import CareIcon from "../../CAREUI/icons/CareIcon"; diff --git a/src/Components/Facility/FacilityList.tsx b/src/components/Facility/FacilityList.tsx similarity index 95% rename from src/Components/Facility/FacilityList.tsx rename to src/components/Facility/FacilityList.tsx index 9143ec29355..7c38923ef5f 100644 --- a/src/Components/Facility/FacilityList.tsx +++ b/src/components/Facility/FacilityList.tsx @@ -1,23 +1,23 @@ import { useEffect } from "react"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CountBlock from "../../CAREUI/display/Count"; -import ExportMenu from "../Common/Export"; -import { FACILITY_TYPES } from "../../Common/constants"; +import ExportMenu from "@/components/Common/Export"; +import { FACILITY_TYPES } from "@/common/constants"; import { FacilityCard } from "./FacilityCard"; import FacilityFilter from "./FacilityFilter"; import { FacilityModel } from "./models"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import SearchInput from "../Form/SearchInput"; import { navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; +import useFilters from "@/common/hooks/useFilters"; import { useTranslation } from "react-i18next"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export const FacilityList = () => { const { qParams, diff --git a/src/Components/Facility/FacilityStaffList.tsx b/src/components/Facility/FacilityStaffList.tsx similarity index 96% rename from src/Components/Facility/FacilityStaffList.tsx rename to src/components/Facility/FacilityStaffList.tsx index ae3c5fb0662..7b51568a871 100644 --- a/src/Components/Facility/FacilityStaffList.tsx +++ b/src/components/Facility/FacilityStaffList.tsx @@ -1,8 +1,8 @@ import { useState } from "react"; -import { DOCTOR_SPECIALIZATION } from "../../Common/constants"; +import { DOCTOR_SPECIALIZATION } from "@/common/constants"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import ButtonV2 from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; import { StaffCapacity } from "./StaffCapacity"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; diff --git a/src/Components/Facility/FacilityUsers.tsx b/src/components/Facility/FacilityUsers.tsx similarity index 95% rename from src/Components/Facility/FacilityUsers.tsx rename to src/components/Facility/FacilityUsers.tsx index f7fe62810fc..06367f05238 100644 --- a/src/Components/Facility/FacilityUsers.tsx +++ b/src/components/Facility/FacilityUsers.tsx @@ -1,14 +1,14 @@ import { useState } from "react"; import CountBlock from "../../CAREUI/display/Count"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; -import * as Notification from "../../Utils/Notifications.js"; +import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; +import * as Notification from "../../Utils/Notifications"; import { formatName, isUserOnline, relativeTime } from "../../Utils/utils"; import SlideOver from "../../CAREUI/interactive/SlideOver"; -import Pagination from "../Common/Pagination"; -import UserDetails from "../Common/UserDetails"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; +import Pagination from "@/components/Common/Pagination"; +import UserDetails from "@/components/Common/UserDetails"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; import LinkFacilityDialog from "../Users/LinkFacilityDialog"; import UserDeleteDialog from "../Users/UserDeleteDialog"; import request from "../../Utils/request/request"; @@ -17,7 +17,7 @@ import useQuery from "../../Utils/request/useQuery"; import { UserFacilities } from "../Users/ManageUsers"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function FacilityUsers(props: any) { const { t } = useTranslation(); const { facilityId } = props; diff --git a/src/Components/Facility/InventoryList.tsx b/src/components/Facility/InventoryList.tsx similarity index 95% rename from src/Components/Facility/InventoryList.tsx rename to src/components/Facility/InventoryList.tsx index c7f11f6d3bc..3aeb3af4ea5 100644 --- a/src/Components/Facility/InventoryList.tsx +++ b/src/components/Facility/InventoryList.tsx @@ -1,13 +1,13 @@ import { useState } from "react"; import { navigate } from "raviger"; -import Pagination from "../Common/Pagination"; +import Pagination from "@/components/Common/Pagination"; import { classNames } from "../../Utils/utils"; -import Page from "../Common/components/Page"; -import ButtonV2 from "../Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function InventoryList(props: any) { const { facilityId }: any = props; let inventoryItem: any = null; diff --git a/src/Components/Facility/InventoryLog.tsx b/src/components/Facility/InventoryLog.tsx similarity index 94% rename from src/Components/Facility/InventoryLog.tsx rename to src/components/Facility/InventoryLog.tsx index 0450801f4b0..a1bd8e3ce81 100644 --- a/src/Components/Facility/InventoryLog.tsx +++ b/src/components/Facility/InventoryLog.tsx @@ -1,16 +1,16 @@ import { useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import Pagination from "../Common/Pagination"; +import * as Notification from "../../Utils/Notifications"; +import Pagination from "@/components/Common/Pagination"; import { formatDateTime } from "../../Utils/utils"; -import Page from "../Common/components/Page.js"; -import CareIcon from "../../CAREUI/icons/CareIcon.js"; -import ButtonV2 from "../Common/components/ButtonV2.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; +import Page from "@/components/Common/components/Page"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function InventoryLog(props: any) { const { facilityId, inventoryId }: any = props; const [saving, setSaving] = useState(false); diff --git a/src/Components/Facility/Investigations/InvestigationSuggestions.tsx b/src/components/Facility/Investigations/InvestigationSuggestions.tsx similarity index 99% rename from src/Components/Facility/Investigations/InvestigationSuggestions.tsx rename to src/components/Facility/Investigations/InvestigationSuggestions.tsx index 4a5882678c4..e574f17ffe3 100644 --- a/src/Components/Facility/Investigations/InvestigationSuggestions.tsx +++ b/src/components/Facility/Investigations/InvestigationSuggestions.tsx @@ -3,8 +3,8 @@ import CareIcon from "../../../CAREUI/icons/CareIcon"; import routes from "../../../Redux/api"; import dayjs from "../../../Utils/dayjs"; import useQuery from "../../../Utils/request/useQuery"; -import Loading from "../../Common/Loading"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { InvestigationResponse } from "./Reports/types"; export default function ViewInvestigationSuggestions(props: { diff --git a/src/Components/Facility/Investigations/InvestigationTable.tsx b/src/components/Facility/Investigations/InvestigationTable.tsx similarity index 99% rename from src/Components/Facility/Investigations/InvestigationTable.tsx rename to src/components/Facility/Investigations/InvestigationTable.tsx index 84198eea50c..09a29eb992a 100644 --- a/src/Components/Facility/Investigations/InvestigationTable.tsx +++ b/src/components/Facility/Investigations/InvestigationTable.tsx @@ -1,4 +1,4 @@ -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { SelectFormField } from "../../Form/FormFields/SelectFormField"; import TextFormField from "../../Form/FormFields/TextFormField"; diff --git a/src/Components/Facility/Investigations/InvestigationsPrintPreview.tsx b/src/components/Facility/Investigations/InvestigationsPrintPreview.tsx similarity index 98% rename from src/Components/Facility/Investigations/InvestigationsPrintPreview.tsx rename to src/components/Facility/Investigations/InvestigationsPrintPreview.tsx index 97a5375fa28..107b0831bed 100644 --- a/src/Components/Facility/Investigations/InvestigationsPrintPreview.tsx +++ b/src/components/Facility/Investigations/InvestigationsPrintPreview.tsx @@ -4,7 +4,7 @@ import routes from "../../../Redux/api"; import useQuery from "../../../Utils/request/useQuery"; import PrintPreview from "../../../CAREUI/misc/PrintPreview"; import { useTranslation } from "react-i18next"; -const Loading = lazy(() => import("../../Common/Loading")); +const Loading = lazy(() => import("@/components/Common/Loading")); import { Investigation } from "./Reports/types"; import careConfig from "@careConfig"; diff --git a/src/Components/Facility/Investigations/Reports/ReportTable.tsx b/src/components/Facility/Investigations/Reports/ReportTable.tsx similarity index 98% rename from src/Components/Facility/Investigations/Reports/ReportTable.tsx rename to src/components/Facility/Investigations/Reports/ReportTable.tsx index 5640fd04ea4..aedbbc8da51 100644 --- a/src/Components/Facility/Investigations/Reports/ReportTable.tsx +++ b/src/components/Facility/Investigations/Reports/ReportTable.tsx @@ -1,6 +1,6 @@ import { getColorIndex, rowColor, transformData } from "./utils"; -import ButtonV2 from "../../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { InvestigationResponse } from "./types"; import { formatDateTime } from "../../../../Utils/utils"; import { FC } from "react"; diff --git a/src/Components/Facility/Investigations/Reports/index.tsx b/src/components/Facility/Investigations/Reports/index.tsx similarity index 98% rename from src/Components/Facility/Investigations/Reports/index.tsx rename to src/components/Facility/Investigations/Reports/index.tsx index 45bc7de0a26..e4e54c36994 100644 --- a/src/Components/Facility/Investigations/Reports/index.tsx +++ b/src/components/Facility/Investigations/Reports/index.tsx @@ -8,10 +8,10 @@ import * as Notification from "../../../../Utils/Notifications"; import request from "../../../../Utils/request/request"; import { PaginatedResponse } from "../../../../Utils/request/types"; import useQuery from "../../../../Utils/request/useQuery"; -import Loading from "../../../Common/Loading"; -import ButtonV2 from "../../../Common/components/ButtonV2"; -import CircularProgress from "../../../Common/components/CircularProgress"; -import Page from "../../../Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import Page from "@/components/Common/components/Page"; import AutocompleteMultiSelectFormField from "../../../Form/FormFields/AutocompleteMultiselect"; import { FieldChangeEvent } from "../../../Form/FormFields/Utils"; import ReportTable from "./ReportTable"; diff --git a/src/Components/Facility/Investigations/Reports/types.ts b/src/components/Facility/Investigations/Reports/types.ts similarity index 100% rename from src/Components/Facility/Investigations/Reports/types.ts rename to src/components/Facility/Investigations/Reports/types.ts diff --git a/src/Components/Facility/Investigations/Reports/utils.tsx b/src/components/Facility/Investigations/Reports/utils.tsx similarity index 100% rename from src/Components/Facility/Investigations/Reports/utils.tsx rename to src/components/Facility/Investigations/Reports/utils.tsx diff --git a/src/Components/Facility/Investigations/ShowInvestigation.tsx b/src/components/Facility/Investigations/ShowInvestigation.tsx similarity index 97% rename from src/Components/Facility/Investigations/ShowInvestigation.tsx rename to src/components/Facility/Investigations/ShowInvestigation.tsx index 85f2fb1fd7d..0755b3687cd 100644 --- a/src/Components/Facility/Investigations/ShowInvestigation.tsx +++ b/src/components/Facility/Investigations/ShowInvestigation.tsx @@ -1,13 +1,13 @@ import * as _ from "lodash-es"; import { useCallback, useReducer } from "react"; import routes from "../../../Redux/api"; -import * as Notification from "../../../Utils/Notifications.js"; +import * as Notification from "../../../Utils/Notifications"; import request from "../../../Utils/request/request"; import useQuery from "../../../Utils/request/useQuery"; import InvestigationTable from "./InvestigationTable"; import { useTranslation } from "react-i18next"; -import Page from "../../Common/components/Page"; -import Loading from "@/Components/Common/Loading"; +import Page from "@/components/Common/components/Page"; +import Loading from "@/components/Common/Loading"; const initialState = { changedFields: {}, initialValues: {}, diff --git a/src/Components/Facility/Investigations/Table.tsx b/src/components/Facility/Investigations/Table.tsx similarity index 100% rename from src/Components/Facility/Investigations/Table.tsx rename to src/components/Facility/Investigations/Table.tsx diff --git a/src/Components/Facility/Investigations/ViewInvestigations.tsx b/src/components/Facility/Investigations/ViewInvestigations.tsx similarity index 96% rename from src/Components/Facility/Investigations/ViewInvestigations.tsx rename to src/components/Facility/Investigations/ViewInvestigations.tsx index 6ea846ecbd0..1798664949e 100644 --- a/src/Components/Facility/Investigations/ViewInvestigations.tsx +++ b/src/components/Facility/Investigations/ViewInvestigations.tsx @@ -5,10 +5,10 @@ import { useTranslation } from "react-i18next"; import { formatDateTime } from "../../../Utils/utils"; import { InvestigationResponse } from "./Reports/types"; import { InvestigationSessionType } from "./investigationsTab"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function ViewInvestigations(props: { isLoading: boolean; investigations: InvestigationResponse; diff --git a/src/Components/Facility/Investigations/index.tsx b/src/components/Facility/Investigations/index.tsx similarity index 97% rename from src/Components/Facility/Investigations/index.tsx rename to src/components/Facility/Investigations/index.tsx index 5c40766b6b9..386f6f45db4 100644 --- a/src/Components/Facility/Investigations/index.tsx +++ b/src/components/Facility/Investigations/index.tsx @@ -1,6 +1,6 @@ import { navigate, useQueryParams } from "raviger"; import { useEffect, useReducer, useState } from "react"; -import * as Notification from "../../../Utils/Notifications.js"; +import * as Notification from "../../../Utils/Notifications"; import { TestTable } from "./Table"; import { useTranslation } from "react-i18next"; @@ -8,11 +8,11 @@ import Card from "../../../CAREUI/display/Card"; import routes from "../../../Redux/api"; import request from "../../../Utils/request/request"; import useQuery from "../../../Utils/request/useQuery"; -import { Submit } from "../../Common/components/ButtonV2"; -import Page from "../../Common/components/Page"; +import { Submit } from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; import AutocompleteMultiSelectFormField from "../../Form/FormFields/AutocompleteMultiselect"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const initialState = { form: {}, }; diff --git a/src/Components/Facility/Investigations/investigationsTab.tsx b/src/components/Facility/Investigations/investigationsTab.tsx similarity index 100% rename from src/Components/Facility/Investigations/investigationsTab.tsx rename to src/components/Facility/Investigations/investigationsTab.tsx diff --git a/src/Components/Facility/LocationManagement.tsx b/src/components/Facility/LocationManagement.tsx similarity index 96% rename from src/Components/Facility/LocationManagement.tsx rename to src/components/Facility/LocationManagement.tsx index 2223aa2e8fd..82184887332 100644 --- a/src/Components/Facility/LocationManagement.tsx +++ b/src/components/Facility/LocationManagement.tsx @@ -1,21 +1,21 @@ import { useState } from "react"; -import ButtonV2, { Cancel } from "../Common/components/ButtonV2"; +import ButtonV2, { Cancel } from "@/components/Common/components/ButtonV2"; import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import routes from "../../Redux/api"; import PaginatedList from "../../CAREUI/misc/PaginatedList"; import { LocationModel } from "./models"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import request from "../../Utils/request/request"; -import * as Notification from "../../Utils/Notifications.js"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import DialogModal from "../Common/Dialog"; -import Uptime from "../Common/Uptime"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import * as Notification from "../../Utils/Notifications"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import DialogModal from "@/components/Common/Dialog"; +import Uptime from "@/components/Common/Uptime"; +import useAuthUser from "@/common/hooks/useAuthUser"; import useQuery from "../../Utils/request/useQuery"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; import { cn } from "@/lib/utils"; interface Props { facilityId: string; diff --git a/src/Components/Facility/MinQuantityList.tsx b/src/components/Facility/MinQuantityList.tsx similarity index 97% rename from src/Components/Facility/MinQuantityList.tsx rename to src/components/Facility/MinQuantityList.tsx index eeff6a7fed4..5486cb0abab 100644 --- a/src/Components/Facility/MinQuantityList.tsx +++ b/src/components/Facility/MinQuantityList.tsx @@ -1,12 +1,12 @@ import { useState } from "react"; -import Pagination from "../Common/Pagination"; +import Pagination from "@/components/Common/Pagination"; import { MinQuantityRequiredModal } from "./MinQuantityRequiredModal"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function MinQuantityList(props: any) { const { facilityId }: any = props; let inventoryItem: any = null; diff --git a/src/Components/Facility/MinQuantityRequiredModal.tsx b/src/components/Facility/MinQuantityRequiredModal.tsx similarity index 96% rename from src/Components/Facility/MinQuantityRequiredModal.tsx rename to src/components/Facility/MinQuantityRequiredModal.tsx index 0fbfbeee9a4..0663ccfa3bf 100644 --- a/src/Components/Facility/MinQuantityRequiredModal.tsx +++ b/src/components/Facility/MinQuantityRequiredModal.tsx @@ -1,7 +1,7 @@ import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import ButtonV2 from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; +import * as Notification from "../../Utils/Notifications"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; import TextFormField from "../Form/FormFields/TextFormField"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; diff --git a/src/Components/Facility/PatientConsultationNotesList.tsx b/src/components/Facility/PatientConsultationNotesList.tsx similarity index 93% rename from src/Components/Facility/PatientConsultationNotesList.tsx rename to src/components/Facility/PatientConsultationNotesList.tsx index 15238ff189f..99069927660 100644 --- a/src/Components/Facility/PatientConsultationNotesList.tsx +++ b/src/components/Facility/PatientConsultationNotesList.tsx @@ -1,9 +1,9 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react"; -import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; -import CircularProgress from "../Common/components/CircularProgress"; +import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import routes from "../../Redux/api"; import { PatientNoteStateType, PatientNotesModel } from "./models"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import DoctorNote from "./DoctorNote"; import request from "../../Utils/request/request"; diff --git a/src/Components/Facility/PatientNoteCard.tsx b/src/components/Facility/PatientNoteCard.tsx similarity index 96% rename from src/Components/Facility/PatientNoteCard.tsx rename to src/components/Facility/PatientNoteCard.tsx index 80443ad02ae..26d16edcea3 100644 --- a/src/Components/Facility/PatientNoteCard.tsx +++ b/src/components/Facility/PatientNoteCard.tsx @@ -4,20 +4,20 @@ import { classNames, formatName, } from "../../Utils/utils"; -import { USER_TYPES_MAP } from "../../Common/constants"; +import { USER_TYPES_MAP } from "@/common/constants"; import { PatientNotesEditModel, PatientNotesModel } from "./models"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { useState } from "react"; import { Error, Success } from "../../Utils/Notifications"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import { t } from "i18next"; import dayjs from "dayjs"; -import Spinner from "../Common/Spinner"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import useSlug from "../../Common/hooks/useSlug"; +import Spinner from "@/components/Common/Spinner"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import useSlug from "@/common/hooks/useSlug"; const PatientNoteCard = ({ note, diff --git a/src/Components/Facility/PatientNotesList.tsx b/src/components/Facility/PatientNotesList.tsx similarity index 93% rename from src/Components/Facility/PatientNotesList.tsx rename to src/components/Facility/PatientNotesList.tsx index bbd037e866c..77100fe7e3d 100644 --- a/src/Components/Facility/PatientNotesList.tsx +++ b/src/components/Facility/PatientNotesList.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react"; -import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; -import CircularProgress from "../Common/components/CircularProgress"; +import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import DoctorNote from "./DoctorNote"; import { PatientNoteStateType, PatientNotesModel } from "./models"; import routes from "../../Redux/api"; diff --git a/src/Components/Facility/PatientNotesSlideover.tsx b/src/components/Facility/PatientNotesSlideover.tsx similarity index 95% rename from src/Components/Facility/PatientNotesSlideover.tsx rename to src/components/Facility/PatientNotesSlideover.tsx index fe716950aa9..779782b2dc7 100644 --- a/src/Components/Facility/PatientNotesSlideover.tsx +++ b/src/components/Facility/PatientNotesSlideover.tsx @@ -1,20 +1,20 @@ import { useState, useEffect, Dispatch, SetStateAction } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { classNames, isAppleDevice, keysOf } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; import PatientConsultationNotesList from "./PatientConsultationNotesList"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import { PatientNoteStateType, PaitentNotesReplyModel } from "./models"; import useKeyboardShortcut from "use-keyboard-shortcut"; -import AutoExpandingTextInputFormField from "../Form/FormFields/AutoExpandingTextInputFormField.js"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import { PATIENT_NOTES_THREADS } from "../../Common/constants.js"; -import DoctorNoteReplyPreviewCard from "./DoctorNoteReplyPreviewCard.js"; -import useNotificationSubscriptionState from "../../Common/hooks/useNotificationSubscriptionState.js"; +import AutoExpandingTextInputFormField from "../Form/FormFields/AutoExpandingTextInputFormField"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import { PATIENT_NOTES_THREADS } from "@/common/constants"; +import DoctorNoteReplyPreviewCard from "./DoctorNoteReplyPreviewCard"; +import useNotificationSubscriptionState from "@/common/hooks/useNotificationSubscriptionState"; import { Link } from "raviger"; import { t } from "i18next"; diff --git a/src/Components/Facility/SetInventoryForm.tsx b/src/components/Facility/SetInventoryForm.tsx similarity index 95% rename from src/Components/Facility/SetInventoryForm.tsx rename to src/components/Facility/SetInventoryForm.tsx index fb4b05d7b41..ef354331c3b 100644 --- a/src/Components/Facility/SetInventoryForm.tsx +++ b/src/components/Facility/SetInventoryForm.tsx @@ -1,9 +1,9 @@ import { useReducer, useState, useEffect } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { InventoryItemsModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import Page from "../Common/components/Page"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import useAppHistory from "@/common/hooks/useAppHistory"; +import Page from "@/components/Common/components/Page"; import Card from "../../CAREUI/display/Card"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; diff --git a/src/Components/Facility/SpokeFacilityEditor.tsx b/src/components/Facility/SpokeFacilityEditor.tsx similarity index 96% rename from src/Components/Facility/SpokeFacilityEditor.tsx rename to src/components/Facility/SpokeFacilityEditor.tsx index 197d68da2bf..a6dfe9e00aa 100644 --- a/src/Components/Facility/SpokeFacilityEditor.tsx +++ b/src/components/Facility/SpokeFacilityEditor.tsx @@ -10,9 +10,9 @@ import { SpokeRelationship, } from "./models"; import ModelCrudEditor from "../Form/ModelCrudEditor"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { useEffect, useState } from "react"; -import { SPOKE_RELATION_TYPES } from "../../Common/constants"; +import { SPOKE_RELATION_TYPES } from "@/common/constants"; import FacilityBlock from "./FacilityBlock"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/Facility/StaffCapacity.tsx b/src/components/Facility/StaffCapacity.tsx similarity index 93% rename from src/Components/Facility/StaffCapacity.tsx rename to src/components/Facility/StaffCapacity.tsx index 8326ed6a323..602ec9a33f7 100644 --- a/src/Components/Facility/StaffCapacity.tsx +++ b/src/components/Facility/StaffCapacity.tsx @@ -1,15 +1,15 @@ import { useReducer, useState } from "react"; -import { DOCTOR_SPECIALIZATION } from "../../Common/constants.js"; -import * as Notification from "../../Utils/Notifications.js"; -import ButtonV2, { Cancel } from "../Common/components/ButtonV2.js"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField.js"; -import TextFormField from "../Form/FormFields/TextFormField.js"; -import { FieldChangeEventHandler } from "../Form/FormFields/Utils.js"; -import SelectMenuV2 from "../Form/SelectMenuV2.js"; -import { DoctorModal } from "./models.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; +import { DOCTOR_SPECIALIZATION } from "@/common/constants"; +import * as Notification from "../../Utils/Notifications"; +import ButtonV2, { Cancel } from "@/components/Common/components/ButtonV2"; +import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; +import TextFormField from "../Form/FormFields/TextFormField"; +import { FieldChangeEventHandler } from "../Form/FormFields/Utils"; +import SelectMenuV2 from "../Form/SelectMenuV2"; +import { DoctorModal } from "./models"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; interface DoctorCapacityProps extends DoctorModal { diff --git a/src/Components/Facility/StaffCountCard.tsx b/src/components/Facility/StaffCountCard.tsx similarity index 93% rename from src/Components/Facility/StaffCountCard.tsx rename to src/components/Facility/StaffCountCard.tsx index 884b2b1cfdc..d45ad979a9e 100644 --- a/src/Components/Facility/StaffCountCard.tsx +++ b/src/components/Facility/StaffCountCard.tsx @@ -1,12 +1,12 @@ import { useState } from "react"; import { DoctorModal } from "./models"; -import { DOCTOR_SPECIALIZATION } from "../../Common/constants"; +import { DOCTOR_SPECIALIZATION } from "@/common/constants"; import * as Notification from "../../Utils/Notifications"; import { DoctorIcon } from "../TeleIcu/Icons/DoctorIcon"; import { StaffCapacity } from "./StaffCapacity"; -import DialogModal from "../Common/Dialog"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import ButtonV2 from "../Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; diff --git a/src/Components/Facility/TransferPatientDialog.tsx b/src/components/Facility/TransferPatientDialog.tsx similarity index 93% rename from src/Components/Facility/TransferPatientDialog.tsx rename to src/components/Facility/TransferPatientDialog.tsx index 4facfc2b35e..f6e3dec5a42 100644 --- a/src/Components/Facility/TransferPatientDialog.tsx +++ b/src/components/Facility/TransferPatientDialog.tsx @@ -1,14 +1,14 @@ -import * as Notification from "../../Utils/Notifications.js"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { useReducer, useState } from "react"; import { DupPatientModel } from "./models"; -import { OptionsType } from "../../Common/constants"; +import { OptionsType } from "@/common/constants"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { navigate } from "raviger"; -import request from "../../Utils/request/request.js"; -import routes from "../../Redux/api.js"; -import TextFormField from "../Form/FormFields/TextFormField.js"; -import { FieldChangeEvent } from "../Form/FormFields/Utils.js"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; +import TextFormField from "../Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { useTranslation } from "react-i18next"; interface Props { diff --git a/src/Components/Facility/TreatmentSummary.tsx b/src/components/Facility/TreatmentSummary.tsx similarity index 99% rename from src/Components/Facility/TreatmentSummary.tsx rename to src/components/Facility/TreatmentSummary.tsx index 610e7dc189d..ba40dbeb5ae 100644 --- a/src/Components/Facility/TreatmentSummary.tsx +++ b/src/components/Facility/TreatmentSummary.tsx @@ -1,4 +1,4 @@ -import { GENDER_TYPES } from "../../Common/constants"; +import { GENDER_TYPES } from "@/common/constants"; import { formatDate, formatDateTime, @@ -12,7 +12,7 @@ import { ActiveConditionVerificationStatuses, ConsultationDiagnosis, } from "../Diagnosis/types"; -import PageHeadTitle from "../Common/PageHeadTitle"; +import PageHeadTitle from "@/components/Common/PageHeadTitle"; import { useTranslation } from "react-i18next"; import { PatientModel } from "../Patient/models"; import MedicineRoutes from "../Medicine/routes"; diff --git a/src/Components/Facility/TriageForm.tsx b/src/components/Facility/TriageForm.tsx similarity index 96% rename from src/Components/Facility/TriageForm.tsx rename to src/components/Facility/TriageForm.tsx index 4413d9a48db..72b391f2318 100644 --- a/src/Components/Facility/TriageForm.tsx +++ b/src/components/Facility/TriageForm.tsx @@ -1,17 +1,17 @@ -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import Card from "../../CAREUI/display/Card"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import TextFormField from "../Form/FormFields/TextFormField"; import { PatientStatsModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import useAppHistory from "@/common/hooks/useAppHistory"; import DateFormField from "../Form/FormFields/DateFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import Loading from "@/Components/Common/Loading"; -import Page from "../Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/components/Page"; import dayjs from "dayjs"; import { dateQueryString, scrollTo } from "../../Utils/utils"; import useQuery from "../../Utils/request/useQuery"; diff --git a/src/Components/Facility/models.tsx b/src/components/Facility/models.tsx similarity index 98% rename from src/Components/Facility/models.tsx rename to src/components/Facility/models.tsx index 1be0472c1c3..73473c57c1e 100644 --- a/src/Components/Facility/models.tsx +++ b/src/components/Facility/models.tsx @@ -7,7 +7,7 @@ import { PATIENT_NOTES_THREADS, SHIFTING_CHOICES_PEACETIME, UserRole, -} from "../../Common/constants"; +} from "@/common/constants"; import { FeatureFlag } from "../../Utils/featureFlags"; import { ConsultationDiagnosis, CreateDiagnosis } from "../Diagnosis/types"; import { @@ -20,9 +20,9 @@ import { } from "../Patient/models"; import { EncounterSymptom } from "../Symptoms/types"; import { UserBareMinimum, UserModel } from "../Users/models"; -import { InvestigationType } from "../Common/prescription-builder/InvestigationBuilder"; -import { ProcedureType } from "../Common/prescription-builder/ProcedureBuilder"; -import { RouteToFacility } from "../Common/RouteToFacilitySelect"; +import { InvestigationType } from "@/components/Common/prescription-builder/InvestigationBuilder"; +import { ProcedureType } from "@/components/Common/prescription-builder/ProcedureBuilder"; +import { RouteToFacility } from "@/components/Common/RouteToFacilitySelect"; export interface LocalBodyModel { id: number; diff --git a/src/Components/Files/AudioCaptureDialog.tsx b/src/components/Files/AudioCaptureDialog.tsx similarity index 100% rename from src/Components/Files/AudioCaptureDialog.tsx rename to src/components/Files/AudioCaptureDialog.tsx diff --git a/src/Components/Files/CameraCaptureDialog.tsx b/src/components/Files/CameraCaptureDialog.tsx similarity index 96% rename from src/Components/Files/CameraCaptureDialog.tsx rename to src/components/Files/CameraCaptureDialog.tsx index 96de547eebe..b5af6ace8d5 100644 --- a/src/Components/Files/CameraCaptureDialog.tsx +++ b/src/components/Files/CameraCaptureDialog.tsx @@ -1,10 +1,10 @@ import Webcam from "react-webcam"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "../Common/Dialog"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; import { t } from "i18next"; import { useCallback, useRef, useState } from "react"; -import useWindowDimensions from "../../Common/hooks/useWindowDimensions"; +import useWindowDimensions from "@/common/hooks/useWindowDimensions"; export interface CameraCaptureDialogProps { show: boolean; diff --git a/src/Components/Files/FileBlock.tsx b/src/components/Files/FileBlock.tsx similarity index 97% rename from src/Components/Files/FileBlock.tsx rename to src/components/Files/FileBlock.tsx index 3ecf4a2c315..732ac0c0faf 100644 --- a/src/Components/Files/FileBlock.tsx +++ b/src/components/Files/FileBlock.tsx @@ -1,11 +1,11 @@ import dayjs from "dayjs"; import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { FileUploadModel } from "../Patient/models"; import { FileManagerResult } from "../../Utils/useFileManager"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import { FILE_EXTENSIONS } from "../../Common/constants"; +import { FILE_EXTENSIONS } from "@/common/constants"; import { t } from "i18next"; export interface FileBlockProps { diff --git a/src/Components/Files/FileUpload.tsx b/src/components/Files/FileUpload.tsx similarity index 92% rename from src/Components/Files/FileUpload.tsx rename to src/components/Files/FileUpload.tsx index 1701a632472..30af4d1b0d8 100644 --- a/src/Components/Files/FileUpload.tsx +++ b/src/components/Files/FileUpload.tsx @@ -1,20 +1,20 @@ import { useState, ReactNode } from "react"; -import { FileUploadModel } from "../Patient/models.js"; -import Pagination from "../Common/Pagination.js"; -import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants.js"; +import { FileUploadModel } from "../Patient/models"; +import Pagination from "@/components/Common/Pagination"; +import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "../Common/components/ButtonV2.js"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon.js"; -import TextFormField from "../Form/FormFields/TextFormField.js"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor.js"; -import AuthorizedChild from "../../CAREUI/misc/AuthorizedChild.js"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import useFileUpload from "../../Utils/useFileUpload.js"; -import useFileManager from "../../Utils/useFileManager.js"; -import Tabs from "../Common/components/Tabs.js"; -import FileBlock from "./FileBlock.js"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; +import TextFormField from "../Form/FormFields/TextFormField"; +import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; +import AuthorizedChild from "../../CAREUI/misc/AuthorizedChild"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import useFileUpload from "../../Utils/useFileUpload"; +import useFileManager from "../../Utils/useFileManager"; +import Tabs from "@/components/Common/components/Tabs"; +import FileBlock from "./FileBlock"; export const LinearProgressWithLabel = (props: { value: number }) => { return ( diff --git a/src/Components/Form/AutoCompleteAsync.tsx b/src/components/Form/AutoCompleteAsync.tsx similarity index 98% rename from src/Components/Form/AutoCompleteAsync.tsx rename to src/components/Form/AutoCompleteAsync.tsx index f362918dfc2..ddec1503042 100644 --- a/src/Components/Form/AutoCompleteAsync.tsx +++ b/src/components/Form/AutoCompleteAsync.tsx @@ -12,7 +12,7 @@ import { import { useEffect, useMemo, useState } from "react"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "../Common/components/HelperComponents"; +import { DropdownTransition } from "@/components/Common/components/HelperComponents"; import { classNames } from "../../Utils/utils"; import { debounce } from "lodash-es"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/Form/FieldValidators.tsx b/src/components/Form/FieldValidators.tsx similarity index 100% rename from src/Components/Form/FieldValidators.tsx rename to src/components/Form/FieldValidators.tsx diff --git a/src/Components/Form/Form.tsx b/src/components/Form/Form.tsx similarity index 98% rename from src/Components/Form/Form.tsx rename to src/components/Form/Form.tsx index 4bf4bd22d01..36b542f889d 100644 --- a/src/Components/Form/Form.tsx +++ b/src/components/Form/Form.tsx @@ -1,7 +1,7 @@ import { isEmpty, omitBy } from "lodash-es"; import { useEffect, useMemo, useState } from "react"; import { classNames } from "../../Utils/utils"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { FieldValidator } from "./FieldValidators"; import { FormContextValue, createFormContext } from "./FormContext"; import { FieldChangeEvent } from "./FormFields/Utils"; diff --git a/src/Components/Form/FormContext.ts b/src/components/Form/FormContext.ts similarity index 100% rename from src/Components/Form/FormContext.ts rename to src/components/Form/FormContext.ts diff --git a/src/Components/Form/FormFields/AutoExpandingTextInputFormField.tsx b/src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/AutoExpandingTextInputFormField.tsx rename to src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx diff --git a/src/Components/Form/FormFields/Autocomplete.tsx b/src/components/Form/FormFields/Autocomplete.tsx similarity index 99% rename from src/Components/Form/FormFields/Autocomplete.tsx rename to src/components/Form/FormFields/Autocomplete.tsx index a829c3373d2..a93186ef080 100644 --- a/src/Components/Form/FormFields/Autocomplete.tsx +++ b/src/components/Form/FormFields/Autocomplete.tsx @@ -9,7 +9,7 @@ import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; import { useEffect, useState } from "react"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "../../Common/components/HelperComponents"; +import { DropdownTransition } from "@/components/Common/components/HelperComponents"; import FormField from "./FormField"; import { classNames } from "../../../Utils/utils"; import { dropdownOptionClassNames } from "../MultiSelectMenuV2"; diff --git a/src/Components/Form/FormFields/AutocompleteMultiselect.tsx b/src/components/Form/FormFields/AutocompleteMultiselect.tsx similarity index 99% rename from src/Components/Form/FormFields/AutocompleteMultiselect.tsx rename to src/components/Form/FormFields/AutocompleteMultiselect.tsx index d8bde2dba03..3a67dbb05f4 100644 --- a/src/Components/Form/FormFields/AutocompleteMultiselect.tsx +++ b/src/components/Form/FormFields/AutocompleteMultiselect.tsx @@ -13,7 +13,7 @@ import { import { ReactNode, useEffect, useRef, useState } from "react"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "../../Common/components/HelperComponents"; +import { DropdownTransition } from "@/components/Common/components/HelperComponents"; import FormField from "./FormField"; import { classNames } from "../../../Utils/utils"; diff --git a/src/Components/Form/FormFields/CheckBoxFormField.tsx b/src/components/Form/FormFields/CheckBoxFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/CheckBoxFormField.tsx rename to src/components/Form/FormFields/CheckBoxFormField.tsx diff --git a/src/Components/Form/FormFields/DateFormField.tsx b/src/components/Form/FormFields/DateFormField.tsx similarity index 94% rename from src/Components/Form/FormFields/DateFormField.tsx rename to src/components/Form/FormFields/DateFormField.tsx index 3bec3712e2b..674d2572b6d 100644 --- a/src/Components/Form/FormFields/DateFormField.tsx +++ b/src/components/Form/FormFields/DateFormField.tsx @@ -1,4 +1,6 @@ -import DateInputV2, { DatePickerPosition } from "../../Common/DateInputV2"; +import DateInputV2, { + DatePickerPosition, +} from "@/components/Common/DateInputV2"; import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; import FormField from "./FormField"; diff --git a/src/Components/Form/FormFields/DateRangeFormField.tsx b/src/components/Form/FormFields/DateRangeFormField.tsx similarity index 92% rename from src/Components/Form/FormFields/DateRangeFormField.tsx rename to src/components/Form/FormFields/DateRangeFormField.tsx index 43edbc9ad0c..d7b7a62dbce 100644 --- a/src/Components/Form/FormFields/DateRangeFormField.tsx +++ b/src/components/Form/FormFields/DateRangeFormField.tsx @@ -1,5 +1,7 @@ import { classNames } from "../../../Utils/utils"; -import DateRangeInputV2, { DateRange } from "../../Common/DateRangeInputV2"; +import DateRangeInputV2, { + DateRange, +} from "@/components/Common/DateRangeInputV2"; import FormField from "./FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; diff --git a/src/Components/Form/FormFields/DosageFormField.tsx b/src/components/Form/FormFields/DosageFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/DosageFormField.tsx rename to src/components/Form/FormFields/DosageFormField.tsx diff --git a/src/Components/Form/FormFields/FormField.tsx b/src/components/Form/FormFields/FormField.tsx similarity index 100% rename from src/Components/Form/FormFields/FormField.tsx rename to src/components/Form/FormFields/FormField.tsx diff --git a/src/Components/Form/FormFields/Month.tsx b/src/components/Form/FormFields/Month.tsx similarity index 100% rename from src/Components/Form/FormFields/Month.tsx rename to src/components/Form/FormFields/Month.tsx diff --git a/src/Components/Form/FormFields/NumericWithUnitsFormField.tsx b/src/components/Form/FormFields/NumericWithUnitsFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/NumericWithUnitsFormField.tsx rename to src/components/Form/FormFields/NumericWithUnitsFormField.tsx diff --git a/src/Components/Form/FormFields/OtpFormField.tsx b/src/components/Form/FormFields/OtpFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/OtpFormField.tsx rename to src/components/Form/FormFields/OtpFormField.tsx diff --git a/src/Components/Form/FormFields/PhoneNumberFormField.tsx b/src/components/Form/FormFields/PhoneNumberFormField.tsx similarity index 99% rename from src/Components/Form/FormFields/PhoneNumberFormField.tsx rename to src/components/Form/FormFields/PhoneNumberFormField.tsx index e2e34a6ef65..4d1bda64399 100644 --- a/src/Components/Form/FormFields/PhoneNumberFormField.tsx +++ b/src/components/Form/FormFields/PhoneNumberFormField.tsx @@ -9,7 +9,7 @@ import { CountryData, humanizeStrings, } from "../../../Utils/utils"; -import phoneCodesJson from "../../../Common/static/countryPhoneAndFlags.json"; +import phoneCodesJson from "@/common/static/countryPhoneAndFlags.json"; import { FieldError, PhoneNumberValidator, diff --git a/src/Components/Form/FormFields/RadioFormField.tsx b/src/components/Form/FormFields/RadioFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/RadioFormField.tsx rename to src/components/Form/FormFields/RadioFormField.tsx diff --git a/src/Components/Form/FormFields/RangeAutocompleteFormField.tsx b/src/components/Form/FormFields/RangeAutocompleteFormField.tsx similarity index 97% rename from src/Components/Form/FormFields/RangeAutocompleteFormField.tsx rename to src/components/Form/FormFields/RangeAutocompleteFormField.tsx index 8feebe651b0..968f78019e5 100644 --- a/src/Components/Form/FormFields/RangeAutocompleteFormField.tsx +++ b/src/components/Form/FormFields/RangeAutocompleteFormField.tsx @@ -2,7 +2,7 @@ import { useMemo } from "react"; import AutocompleteFormField from "./Autocomplete"; import { FormFieldBaseProps } from "./Utils"; import { classNames, compareBy } from "../../../Utils/utils"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; interface Threshold { value: number; diff --git a/src/Components/Form/FormFields/RangeFormField.tsx b/src/components/Form/FormFields/RangeFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/RangeFormField.tsx rename to src/components/Form/FormFields/RangeFormField.tsx diff --git a/src/Components/Form/FormFields/SelectFormField.tsx b/src/components/Form/FormFields/SelectFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/SelectFormField.tsx rename to src/components/Form/FormFields/SelectFormField.tsx diff --git a/src/Components/Form/FormFields/TextAreaFormField.tsx b/src/components/Form/FormFields/TextAreaFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/TextAreaFormField.tsx rename to src/components/Form/FormFields/TextAreaFormField.tsx diff --git a/src/Components/Form/FormFields/TextFormField.tsx b/src/components/Form/FormFields/TextFormField.tsx similarity index 100% rename from src/Components/Form/FormFields/TextFormField.tsx rename to src/components/Form/FormFields/TextFormField.tsx diff --git a/src/Components/Form/FormFields/Utils.ts b/src/components/Form/FormFields/Utils.ts similarity index 100% rename from src/Components/Form/FormFields/Utils.ts rename to src/components/Form/FormFields/Utils.ts diff --git a/src/Components/Form/ModelCrudEditor.tsx b/src/components/Form/ModelCrudEditor.tsx similarity index 98% rename from src/Components/Form/ModelCrudEditor.tsx rename to src/components/Form/ModelCrudEditor.tsx index 3ce4b15eba3..f9e000732d3 100644 --- a/src/Components/Form/ModelCrudEditor.tsx +++ b/src/components/Form/ModelCrudEditor.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { classNames } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/Form/MultiSelectMenuV2.tsx b/src/components/Form/MultiSelectMenuV2.tsx similarity index 100% rename from src/Components/Form/MultiSelectMenuV2.tsx rename to src/components/Form/MultiSelectMenuV2.tsx diff --git a/src/Components/Form/SearchInput.tsx b/src/components/Form/SearchInput.tsx similarity index 100% rename from src/Components/Form/SearchInput.tsx rename to src/components/Form/SearchInput.tsx diff --git a/src/Components/Form/SelectMenuV2.tsx b/src/components/Form/SelectMenuV2.tsx similarity index 100% rename from src/Components/Form/SelectMenuV2.tsx rename to src/components/Form/SelectMenuV2.tsx diff --git a/src/Components/Form/Utils.ts b/src/components/Form/Utils.ts similarity index 100% rename from src/Components/Form/Utils.ts rename to src/components/Form/Utils.ts diff --git a/src/Components/HCX/ClaimCard.tsx b/src/components/HCX/ClaimCard.tsx similarity index 100% rename from src/Components/HCX/ClaimCard.tsx rename to src/components/HCX/ClaimCard.tsx diff --git a/src/Components/HCX/ClaimCardCommunication.tsx b/src/components/HCX/ClaimCardCommunication.tsx similarity index 99% rename from src/Components/HCX/ClaimCardCommunication.tsx rename to src/components/HCX/ClaimCardCommunication.tsx index ff15ad7bb66..39edd63ce62 100644 --- a/src/Components/HCX/ClaimCardCommunication.tsx +++ b/src/components/HCX/ClaimCardCommunication.tsx @@ -2,7 +2,7 @@ import * as Notification from "../../Utils/Notifications"; import { HCXClaimModel, HCXCommunicationModel } from "./models"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { FileUploadModel } from "../Patient/models"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; diff --git a/src/Components/HCX/ClaimCardInfo.tsx b/src/components/HCX/ClaimCardInfo.tsx similarity index 100% rename from src/Components/HCX/ClaimCardInfo.tsx rename to src/components/HCX/ClaimCardInfo.tsx diff --git a/src/Components/HCX/ClaimCreatedModal.tsx b/src/components/HCX/ClaimCreatedModal.tsx similarity index 93% rename from src/Components/HCX/ClaimCreatedModal.tsx rename to src/components/HCX/ClaimCreatedModal.tsx index 41d58aa7df4..4edd4fb11f8 100644 --- a/src/Components/HCX/ClaimCreatedModal.tsx +++ b/src/components/HCX/ClaimCreatedModal.tsx @@ -1,10 +1,10 @@ import * as Notification from "../../Utils/Notifications"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import { FileUpload } from "../Files/FileUpload"; import { HCXClaimModel } from "./models"; -import { Submit } from "../Common/components/ButtonV2"; +import { Submit } from "@/components/Common/components/ButtonV2"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import { useState } from "react"; diff --git a/src/Components/HCX/ClaimsItemsBuilder.tsx b/src/components/HCX/ClaimsItemsBuilder.tsx similarity index 97% rename from src/Components/HCX/ClaimsItemsBuilder.tsx rename to src/components/HCX/ClaimsItemsBuilder.tsx index d636eb1a528..b4158c4443b 100644 --- a/src/Components/HCX/ClaimsItemsBuilder.tsx +++ b/src/components/HCX/ClaimsItemsBuilder.tsx @@ -6,11 +6,11 @@ import { import FormField, { FieldLabel } from "../Form/FormFields/FormField"; import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { HCXItemModel } from "./models"; import { ITEM_CATEGORIES } from "./constants"; -import PMJAYProcedurePackageAutocomplete from "../Common/PMJAYProcedurePackageAutocomplete"; +import PMJAYProcedurePackageAutocomplete from "@/components/Common/PMJAYProcedurePackageAutocomplete"; import TextFormField from "../Form/FormFields/TextFormField"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/HCX/CreateClaimCard.tsx b/src/components/HCX/CreateClaimCard.tsx similarity index 97% rename from src/Components/HCX/CreateClaimCard.tsx rename to src/components/HCX/CreateClaimCard.tsx index b4701aadf7a..7d4b7d3edb0 100644 --- a/src/Components/HCX/CreateClaimCard.tsx +++ b/src/components/HCX/CreateClaimCard.tsx @@ -1,16 +1,16 @@ import * as Notification from "../../Utils/Notifications"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; +import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; import { HCXClaimModel, HCXItemModel, HCXPolicyModel } from "./models"; import { classNames, formatCurrency } from "../../Utils/utils"; import CareIcon from "../../CAREUI/icons/CareIcon"; import ClaimCreatedModal from "./ClaimCreatedModal"; import ClaimsItemsBuilder from "./ClaimsItemsBuilder"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import HCXPolicyEligibilityCheck from "./PolicyEligibilityCheck"; import PatientInsuranceDetailsEditor from "./PatientInsuranceDetailsEditor"; -import { ProcedureType } from "../Common/prescription-builder/ProcedureBuilder"; +import { ProcedureType } from "@/components/Common/prescription-builder/ProcedureBuilder"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; diff --git a/src/Components/HCX/InsuranceDetailsBuilder.tsx b/src/components/HCX/InsuranceDetailsBuilder.tsx similarity index 98% rename from src/Components/HCX/InsuranceDetailsBuilder.tsx rename to src/components/HCX/InsuranceDetailsBuilder.tsx index 834e3a66953..1d963200ee3 100644 --- a/src/Components/HCX/InsuranceDetailsBuilder.tsx +++ b/src/components/HCX/InsuranceDetailsBuilder.tsx @@ -5,7 +5,7 @@ import { } from "../Form/FormFields/Utils"; import FormField, { FieldLabel } from "../Form/FormFields/FormField"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { HCXPolicyModel } from "./models"; import InsurerAutocomplete from "./InsurerAutocomplete"; diff --git a/src/Components/HCX/InsurerAutocomplete.tsx b/src/components/HCX/InsurerAutocomplete.tsx similarity index 100% rename from src/Components/HCX/InsurerAutocomplete.tsx rename to src/components/HCX/InsurerAutocomplete.tsx diff --git a/src/Components/HCX/PatientInsuranceDetailsEditor.tsx b/src/components/HCX/PatientInsuranceDetailsEditor.tsx similarity index 97% rename from src/Components/HCX/PatientInsuranceDetailsEditor.tsx rename to src/components/HCX/PatientInsuranceDetailsEditor.tsx index 78de8ef201d..1c6803d7a1e 100644 --- a/src/Components/HCX/PatientInsuranceDetailsEditor.tsx +++ b/src/components/HCX/PatientInsuranceDetailsEditor.tsx @@ -1,4 +1,7 @@ -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; +import ButtonV2, { + Cancel, + Submit, +} from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { HCXPolicyModel } from "./models"; diff --git a/src/Components/HCX/PolicyEligibilityCheck.tsx b/src/components/HCX/PolicyEligibilityCheck.tsx similarity index 95% rename from src/Components/HCX/PolicyEligibilityCheck.tsx rename to src/components/HCX/PolicyEligibilityCheck.tsx index 1d951bd0638..fa02baaea30 100644 --- a/src/Components/HCX/PolicyEligibilityCheck.tsx +++ b/src/components/HCX/PolicyEligibilityCheck.tsx @@ -1,14 +1,14 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { useEffect, useState } from "react"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { HCXPolicyModel } from "./models"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import request from "../../Utils/request/request.js"; +import request from "../../Utils/request/request"; import routes from "../../Redux/api"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; import useQuery from "../../Utils/request/useQuery"; import { useTranslation } from "react-i18next"; diff --git a/src/Components/HCX/constants.ts b/src/components/HCX/constants.ts similarity index 100% rename from src/Components/HCX/constants.ts rename to src/components/HCX/constants.ts diff --git a/src/Components/HCX/misc.ts b/src/components/HCX/misc.ts similarity index 100% rename from src/Components/HCX/misc.ts rename to src/components/HCX/misc.ts diff --git a/src/Components/HCX/models.ts b/src/components/HCX/models.ts similarity index 100% rename from src/Components/HCX/models.ts rename to src/components/HCX/models.ts diff --git a/src/Components/HCX/validators.ts b/src/components/HCX/validators.ts similarity index 100% rename from src/Components/HCX/validators.ts rename to src/components/HCX/validators.ts diff --git a/src/Components/Kanban/Board.tsx b/src/components/Kanban/Board.tsx similarity index 100% rename from src/Components/Kanban/Board.tsx rename to src/components/Kanban/Board.tsx diff --git a/src/Components/Licenses/LicensesPage.tsx b/src/components/Licenses/LicensesPage.tsx similarity index 100% rename from src/Components/Licenses/LicensesPage.tsx rename to src/components/Licenses/LicensesPage.tsx diff --git a/src/Components/Licenses/SBOMViewer.tsx b/src/components/Licenses/SBOMViewer.tsx similarity index 100% rename from src/Components/Licenses/SBOMViewer.tsx rename to src/components/Licenses/SBOMViewer.tsx diff --git a/src/Components/Licenses/be-sbom.json b/src/components/Licenses/be-sbom.json similarity index 100% rename from src/Components/Licenses/be-sbom.json rename to src/components/Licenses/be-sbom.json diff --git a/src/Components/Licenses/fe-sbom.json b/src/components/Licenses/fe-sbom.json similarity index 100% rename from src/Components/Licenses/fe-sbom.json rename to src/components/Licenses/fe-sbom.json diff --git a/src/Components/Licenses/licenseUrls.json b/src/components/Licenses/licenseUrls.json similarity index 100% rename from src/Components/Licenses/licenseUrls.json rename to src/components/Licenses/licenseUrls.json diff --git a/src/Components/LogUpdate/CriticalCareEditor.tsx b/src/components/LogUpdate/CriticalCareEditor.tsx similarity index 97% rename from src/Components/LogUpdate/CriticalCareEditor.tsx rename to src/components/LogUpdate/CriticalCareEditor.tsx index 975d06848b0..5a3e7f896d4 100644 --- a/src/Components/LogUpdate/CriticalCareEditor.tsx +++ b/src/components/LogUpdate/CriticalCareEditor.tsx @@ -2,15 +2,15 @@ import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import LogUpdateSections, { RoundTypeSections } from "./Sections"; import React, { useState } from "react"; -import Loading from "../Common/Loading"; +import Loading from "@/components/Common/Loading"; import { DailyRoundsModel } from "../Patient/models"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; +import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import Card from "../../CAREUI/display/Card"; import { navigate } from "raviger"; import { classNames } from "../../Utils/utils"; import request from "../../Utils/request/request"; -import { useSlugs } from "../../Common/hooks/useSlug"; +import { useSlugs } from "@/common/hooks/useSlug"; import { useTranslation } from "react-i18next"; import { Success } from "../../Utils/Notifications"; diff --git a/src/Components/LogUpdate/CriticalCarePreview.tsx b/src/components/LogUpdate/CriticalCarePreview.tsx similarity index 99% rename from src/Components/LogUpdate/CriticalCarePreview.tsx rename to src/components/LogUpdate/CriticalCarePreview.tsx index a458b1e245c..8546a7501f4 100644 --- a/src/Components/LogUpdate/CriticalCarePreview.tsx +++ b/src/components/LogUpdate/CriticalCarePreview.tsx @@ -1,8 +1,8 @@ import { useTranslation } from "react-i18next"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Loading from "../Common/Loading"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Loading from "@/components/Common/Loading"; import Card from "../../CAREUI/display/Card"; import React, { useEffect } from "react"; import { ABGAnalysisFields } from "./Sections/ABGAnalysis"; @@ -16,7 +16,7 @@ import { VentilatorFields } from "./Sections/RespiratorySupport/Ventilator"; import PressureSore from "./Sections/PressureSore/PressureSore"; import { IOBalanceSections } from "./Sections/IOBalance"; import PainChart from "./components/PainChart"; -import { meanArterialPressure } from "../Common/BloodPressureFormField"; +import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; import { DailyRoundsModel } from "../Patient/models"; type Props = { diff --git a/src/Components/LogUpdate/Sections/ABGAnalysis.tsx b/src/components/LogUpdate/Sections/ABGAnalysis.tsx similarity index 100% rename from src/Components/LogUpdate/Sections/ABGAnalysis.tsx rename to src/components/LogUpdate/Sections/ABGAnalysis.tsx diff --git a/src/Components/LogUpdate/Sections/BloodSugar.tsx b/src/components/LogUpdate/Sections/BloodSugar.tsx similarity index 95% rename from src/Components/LogUpdate/Sections/BloodSugar.tsx rename to src/components/LogUpdate/Sections/BloodSugar.tsx index eb9db7c2e74..aecfe887f51 100644 --- a/src/Components/LogUpdate/Sections/BloodSugar.tsx +++ b/src/components/LogUpdate/Sections/BloodSugar.tsx @@ -3,7 +3,7 @@ import { rangeValueDescription } from "../../../Utils/utils"; import RadioFormField from "../../Form/FormFields/RadioFormField"; import RangeFormField from "../../Form/FormFields/RangeFormField"; import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import { INSULIN_INTAKE_FREQUENCY_OPTIONS } from "../../../Common/constants"; +import { INSULIN_INTAKE_FREQUENCY_OPTIONS } from "@/common/constants"; const BloodSugar = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/Components/LogUpdate/Sections/Dialysis.tsx b/src/components/LogUpdate/Sections/Dialysis.tsx similarity index 100% rename from src/Components/LogUpdate/Sections/Dialysis.tsx rename to src/components/LogUpdate/Sections/Dialysis.tsx diff --git a/src/Components/LogUpdate/Sections/IOBalance.tsx b/src/components/LogUpdate/Sections/IOBalance.tsx similarity index 98% rename from src/Components/LogUpdate/Sections/IOBalance.tsx rename to src/components/LogUpdate/Sections/IOBalance.tsx index 10f76581a46..044b00c7b5f 100644 --- a/src/Components/LogUpdate/Sections/IOBalance.tsx +++ b/src/components/LogUpdate/Sections/IOBalance.tsx @@ -1,7 +1,7 @@ import { Fragment } from "react/jsx-runtime"; import { DailyRoundsModel } from "../../Patient/models"; import TextFormField from "../../Form/FormFields/TextFormField"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; import { SelectFormField } from "../../Form/FormFields/SelectFormField"; diff --git a/src/Components/LogUpdate/Sections/NeurologicalMonitoring.tsx b/src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx similarity index 99% rename from src/Components/LogUpdate/Sections/NeurologicalMonitoring.tsx rename to src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx index 7ef98c4010b..a49a61b8848 100644 --- a/src/Components/LogUpdate/Sections/NeurologicalMonitoring.tsx +++ b/src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx @@ -6,7 +6,7 @@ import { MOTOR_RESPONSE_SCALE, PUPIL_REACTION_OPTIONS, VERBAL_RESPONSE_SCALE, -} from "../../../Common/constants"; +} from "@/common/constants"; import CheckBoxFormField from "../../Form/FormFields/CheckBoxFormField"; import RadioFormField from "../../Form/FormFields/RadioFormField"; import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; diff --git a/src/Components/LogUpdate/Sections/NursingCare.tsx b/src/components/LogUpdate/Sections/NursingCare.tsx similarity index 97% rename from src/Components/LogUpdate/Sections/NursingCare.tsx rename to src/components/LogUpdate/Sections/NursingCare.tsx index b1dd7c09c3a..280152db744 100644 --- a/src/Components/LogUpdate/Sections/NursingCare.tsx +++ b/src/components/LogUpdate/Sections/NursingCare.tsx @@ -1,5 +1,5 @@ import { useTranslation } from "react-i18next"; -import { NURSING_CARE_PROCEDURES } from "../../../Common/constants"; +import { NURSING_CARE_PROCEDURES } from "@/common/constants"; import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; import AutoExpandingTextInputFormField from "../../Form/FormFields/AutoExpandingTextInputFormField"; import AutocompleteMultiSelectFormField from "../../Form/FormFields/AutocompleteMultiselect"; diff --git a/src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx b/src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx similarity index 99% rename from src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx rename to src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx index 63970d4c25c..a632191a609 100644 --- a/src/Components/LogUpdate/Sections/PressureSore/PressureSore.tsx +++ b/src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx @@ -9,7 +9,7 @@ import { HumanBodyRegion, PressureSoreExudateAmountOptions, PressureSoreTissueTypeOptions, -} from "../../../../Common/constants"; +} from "@/common/constants"; import { IPressureSore } from "../../../Patient/models"; import { Error } from "../../../../Utils/Notifications"; import { classNames, getValueDescription } from "../../../../Utils/utils"; diff --git a/src/Components/LogUpdate/Sections/PressureSore/utils.ts b/src/components/LogUpdate/Sections/PressureSore/utils.ts similarity index 95% rename from src/Components/LogUpdate/Sections/PressureSore/utils.ts rename to src/components/LogUpdate/Sections/PressureSore/utils.ts index cc75a7ef06c..64aed7342a7 100644 --- a/src/Components/LogUpdate/Sections/PressureSore/utils.ts +++ b/src/components/LogUpdate/Sections/PressureSore/utils.ts @@ -1,7 +1,7 @@ import { PressureSoreExudateAmountOptions, PressureSoreTissueTypeOptions, -} from "../../../../Common/constants"; +} from "@/common/constants"; import { IPressureSore } from "../../../Patient/models"; const areaIntervalPoints = [0.0, 0.3, 0.6, 1.0, 2.2, 3.0, 4.0, 8.0, 12.0, 24.0]; diff --git a/src/Components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx similarity index 97% rename from src/Components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx rename to src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx index 758b49613ce..4c343f71f74 100644 --- a/src/Components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx +++ b/src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx @@ -3,7 +3,7 @@ import { rangeValueDescription } from "../../../../Utils/utils"; import RadioFormField from "../../../Form/FormFields/RadioFormField"; import RangeFormField from "../../../Form/FormFields/RangeFormField"; import { LogUpdateSectionProps } from "../../utils"; -import { OXYGEN_MODALITY_OPTIONS } from "../../../../Common/constants"; +import { OXYGEN_MODALITY_OPTIONS } from "@/common/constants"; const OxygenRespiratorySupport = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/Components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx similarity index 100% rename from src/Components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx rename to src/components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx diff --git a/src/Components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx similarity index 100% rename from src/Components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx rename to src/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx diff --git a/src/Components/LogUpdate/Sections/RespiratorySupport/index.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/index.tsx similarity index 96% rename from src/Components/LogUpdate/Sections/RespiratorySupport/index.tsx rename to src/components/LogUpdate/Sections/RespiratorySupport/index.tsx index 6c58d0bfa72..74164ab6de1 100644 --- a/src/Components/LogUpdate/Sections/RespiratorySupport/index.tsx +++ b/src/components/LogUpdate/Sections/RespiratorySupport/index.tsx @@ -1,10 +1,10 @@ import { useEffect } from "react"; -import { useSlugs } from "../../../../Common/hooks/useSlug"; +import { useSlugs } from "@/common/hooks/useSlug"; import routes from "../../../../Redux/api"; import useQuery from "../../../../Utils/request/useQuery"; import { rangeValueDescription } from "../../../../Utils/utils"; import { AssetClass } from "../../../Assets/AssetTypes"; -import DialogModal from "../../../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import Beds from "../../../Facility/Consultations/Beds"; import RadioFormField from "../../../Form/FormFields/RadioFormField"; import RangeFormField from "../../../Form/FormFields/RangeFormField"; @@ -13,7 +13,7 @@ import OxygenRespiratorySupport from "./OxygenSupport"; import VentilatorRespiratorySupport from "./Ventilator"; import { Warn } from "../../../../Utils/Notifications"; import { useTranslation } from "react-i18next"; -import { RESPIRATORY_SUPPORT } from "../../../../Common/constants"; +import { RESPIRATORY_SUPPORT } from "@/common/constants"; const RespiratorySupport = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/Components/LogUpdate/Sections/Vitals.tsx b/src/components/LogUpdate/Sections/Vitals.tsx similarity index 97% rename from src/Components/LogUpdate/Sections/Vitals.tsx rename to src/components/LogUpdate/Sections/Vitals.tsx index 9253d2e8697..57815a6723a 100644 --- a/src/Components/LogUpdate/Sections/Vitals.tsx +++ b/src/components/LogUpdate/Sections/Vitals.tsx @@ -4,13 +4,13 @@ import { fahrenheitToCelsius, rangeValueDescription, } from "../../../Utils/utils"; -import { meanArterialPressure } from "../../Common/BloodPressureFormField"; +import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; import RadioFormField from "../../Form/FormFields/RadioFormField"; import RangeFormField from "../../Form/FormFields/RangeFormField"; import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; import PainChart from "../components/PainChart"; import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import { HEARTBEAT_RHYTHM_CHOICES } from "../../../Common/constants"; +import { HEARTBEAT_RHYTHM_CHOICES } from "@/common/constants"; import { BloodPressure } from "../../Patient/models"; const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { diff --git a/src/Components/LogUpdate/Sections/index.tsx b/src/components/LogUpdate/Sections/index.tsx similarity index 100% rename from src/Components/LogUpdate/Sections/index.tsx rename to src/components/LogUpdate/Sections/index.tsx diff --git a/src/Components/LogUpdate/components/PainChart.tsx b/src/components/LogUpdate/components/PainChart.tsx similarity index 98% rename from src/Components/LogUpdate/components/PainChart.tsx rename to src/components/LogUpdate/components/PainChart.tsx index fd784cd5bba..3ba2ce0a650 100644 --- a/src/Components/LogUpdate/components/PainChart.tsx +++ b/src/components/LogUpdate/components/PainChart.tsx @@ -5,7 +5,7 @@ import HumanBodyChart from "../../../CAREUI/interactive/HumanChart"; import PopupModal from "../../../CAREUI/display/PopupModal"; import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; import { classNames, getValueDescription } from "../../../Utils/utils"; -import { HumanBodyRegion } from "../../../Common/constants"; +import { HumanBodyRegion } from "@/common/constants"; import { Error } from "../../../Utils/Notifications"; type Props = { diff --git a/src/Components/LogUpdate/components/PupilSizeSelect.tsx b/src/components/LogUpdate/components/PupilSizeSelect.tsx similarity index 100% rename from src/Components/LogUpdate/components/PupilSizeSelect.tsx rename to src/components/LogUpdate/components/PupilSizeSelect.tsx diff --git a/src/Components/LogUpdate/utils.ts b/src/components/LogUpdate/utils.ts similarity index 100% rename from src/Components/LogUpdate/utils.ts rename to src/components/LogUpdate/utils.ts diff --git a/src/Components/Medicine/AdministerMedicine.tsx b/src/components/Medicine/AdministerMedicine.tsx similarity index 98% rename from src/Components/Medicine/AdministerMedicine.tsx rename to src/components/Medicine/AdministerMedicine.tsx index 0fcf7864a8a..2813999895b 100644 --- a/src/Components/Medicine/AdministerMedicine.tsx +++ b/src/components/Medicine/AdministerMedicine.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { DosageValue, Prescription } from "./models"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import { Success } from "../../Utils/Notifications"; @@ -10,7 +10,7 @@ import { useTranslation } from "react-i18next"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import dayjs from "../../Utils/dayjs"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import request from "../../Utils/request/request"; import MedicineRoutes from "./routes"; import DosageFormField from "../Form/FormFields/DosageFormField"; diff --git a/src/Components/Medicine/CreatePrescriptionForm.tsx b/src/components/Medicine/CreatePrescriptionForm.tsx similarity index 99% rename from src/Components/Medicine/CreatePrescriptionForm.tsx rename to src/components/Medicine/CreatePrescriptionForm.tsx index a75cd868318..8808a7ef0b0 100644 --- a/src/Components/Medicine/CreatePrescriptionForm.tsx +++ b/src/components/Medicine/CreatePrescriptionForm.tsx @@ -12,7 +12,7 @@ import { PrescriptionFormValidator } from "./validators"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import MedicineRoutes from "./routes"; import request from "../../Utils/request/request"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import { Success } from "../../Utils/Notifications"; import DosageFormField from "../Form/FormFields/DosageFormField"; diff --git a/src/Components/Medicine/DiscontinuePrescription.tsx b/src/components/Medicine/DiscontinuePrescription.tsx similarity index 94% rename from src/Components/Medicine/DiscontinuePrescription.tsx rename to src/components/Medicine/DiscontinuePrescription.tsx index 1d2cc5baa94..c71d18ee2d9 100644 --- a/src/Components/Medicine/DiscontinuePrescription.tsx +++ b/src/components/Medicine/DiscontinuePrescription.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { Prescription } from "./models"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import { Success } from "../../Utils/Notifications"; @@ -7,7 +7,7 @@ import PrescriptionDetailCard from "./PrescriptionDetailCard"; import { useTranslation } from "react-i18next"; import request from "../../Utils/request/request"; import MedicineRoutes from "./routes"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; interface Props { prescription: Prescription; diff --git a/src/Components/Medicine/EditPrescriptionForm.tsx b/src/components/Medicine/EditPrescriptionForm.tsx similarity index 99% rename from src/Components/Medicine/EditPrescriptionForm.tsx rename to src/components/Medicine/EditPrescriptionForm.tsx index 78af7f38526..5552ca1d635 100644 --- a/src/Components/Medicine/EditPrescriptionForm.tsx +++ b/src/components/Medicine/EditPrescriptionForm.tsx @@ -3,7 +3,7 @@ import Form from "../Form/Form"; import { Prescription } from "./models"; import request from "../../Utils/request/request"; import * as Notification from "../../Utils/Notifications"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import { RequiredFieldValidator } from "../Form/FieldValidators"; import { useTranslation } from "react-i18next"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; diff --git a/src/Components/Medicine/ManagePrescriptions.tsx b/src/components/Medicine/ManagePrescriptions.tsx similarity index 91% rename from src/Components/Medicine/ManagePrescriptions.tsx rename to src/components/Medicine/ManagePrescriptions.tsx index f47ed7d8045..d80d5733071 100644 --- a/src/Components/Medicine/ManagePrescriptions.tsx +++ b/src/components/Medicine/ManagePrescriptions.tsx @@ -1,8 +1,8 @@ import { useTranslation } from "react-i18next"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; +import useAppHistory from "@/common/hooks/useAppHistory"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; import PrescriptionBuilder from "./PrescriptionBuilder"; export default function ManagePrescriptions() { diff --git a/src/Components/Medicine/MedibaseAutocompleteFormField.tsx b/src/components/Medicine/MedibaseAutocompleteFormField.tsx similarity index 100% rename from src/Components/Medicine/MedibaseAutocompleteFormField.tsx rename to src/components/Medicine/MedibaseAutocompleteFormField.tsx diff --git a/src/Components/Medicine/MedicineAdministration.tsx b/src/components/Medicine/MedicineAdministration.tsx similarity index 98% rename from src/Components/Medicine/MedicineAdministration.tsx rename to src/components/Medicine/MedicineAdministration.tsx index 7a8fb663704..1b29fa7d108 100644 --- a/src/Components/Medicine/MedicineAdministration.tsx +++ b/src/components/Medicine/MedicineAdministration.tsx @@ -3,7 +3,7 @@ import PrescriptionDetailCard from "./PrescriptionDetailCard"; import { MedicineAdministrationRecord, Prescription } from "./models"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { Error, Success } from "../../Utils/Notifications"; import { formatDateTime } from "../../Utils/utils"; @@ -12,7 +12,7 @@ import dayjs from "../../Utils/dayjs"; import TextFormField from "../Form/FormFields/TextFormField"; import request from "../../Utils/request/request"; import MedicineRoutes from "./routes"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import DosageFormField from "../Form/FormFields/DosageFormField"; import { AdministrationDosageValidator } from "./validators"; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx similarity index 98% rename from src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx rename to src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx index 81e92e32a58..b460e90e87e 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx @@ -2,7 +2,7 @@ import dayjs from "../../../Utils/dayjs"; import { MedicineAdministrationRecord, Prescription } from "../models"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import { classNames, formatDateTime } from "../../../Utils/utils"; -import DialogModal from "../../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import PrescrpitionActivityTimeline from "../PrescrpitionTimeline"; import { useState } from "react"; import PrescriptionDetailCard from "../PrescriptionDetailCard"; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx similarity index 100% rename from src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx rename to src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx similarity index 96% rename from src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx rename to src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx index 4bfc59c47c0..f7442c3a51b 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx @@ -1,8 +1,8 @@ import { useTranslation } from "react-i18next"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useRangePagination from "../../../Common/hooks/useRangePagination"; +import useRangePagination from "@/common/hooks/useRangePagination"; import { classNames, formatDateTime } from "../../../Utils/utils"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { Prescription } from "../models"; import MedicineAdministrationTableRow from "./AdministrationTableRow"; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx similarity index 98% rename from src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx rename to src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx index a6bd9d3a983..5c2bc100c9a 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx @@ -4,12 +4,15 @@ import { useState } from "react"; import useQuery from "../../../Utils/request/useQuery"; import MedicineRoutes from "../routes"; import { classNames, formatDateTime } from "../../../Utils/utils"; -import useSlug from "../../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import DiscontinuePrescription from "../DiscontinuePrescription"; import AdministerMedicine from "../AdministerMedicine"; -import DialogModal from "../../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import PrescriptionDetailCard from "../PrescriptionDetailCard"; -import ButtonV2, { Cancel, Submit } from "../../Common/components/ButtonV2"; +import ButtonV2, { + Cancel, + Submit, +} from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import EditPrescriptionForm from "../EditPrescriptionForm"; import AdministrationEventSeperator from "./AdministrationEventSeperator"; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx b/src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx similarity index 95% rename from src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx rename to src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx index f4111f24eb0..d3844125e83 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx @@ -1,7 +1,7 @@ import { useTranslation } from "react-i18next"; import { Prescription } from "../models"; import { useState } from "react"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import SlideOver from "../../../CAREUI/interactive/SlideOver"; import MedicineAdministration from "../MedicineAdministration"; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx b/src/components/Medicine/MedicineAdministrationSheet/index.tsx similarity index 95% rename from src/Components/Medicine/MedicineAdministrationSheet/index.tsx rename to src/components/Medicine/MedicineAdministrationSheet/index.tsx index cf79285712d..9a7325163bc 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/index.tsx @@ -1,17 +1,17 @@ import { useTranslation } from "react-i18next"; -import useSlug from "../../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import useQuery from "../../../Utils/request/useQuery"; import MedicineRoutes from "../routes"; import { useMemo, useState } from "react"; import { computeActivityBounds } from "./utils"; -import useBreakpoints from "../../../Common/hooks/useBreakpoints"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; import SubHeading from "../../../CAREUI/display/SubHeading"; -import ButtonV2 from "../../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../../CAREUI/icons/CareIcon"; import BulkAdminister from "./BulkAdminister"; -import useRangePagination from "../../../Common/hooks/useRangePagination"; +import useRangePagination from "@/common/hooks/useRangePagination"; import MedicineAdministrationTable from "./AdministrationTable"; -import Loading from "../../Common/Loading"; +import Loading from "@/components/Common/Loading"; import ScrollOverlay from "../../../CAREUI/interactive/ScrollOverlay"; import { AuthorizedForConsultationRelatedActions } from "../../../CAREUI/misc/AuthorizedChild"; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/utils.ts b/src/components/Medicine/MedicineAdministrationSheet/utils.ts similarity index 100% rename from src/Components/Medicine/MedicineAdministrationSheet/utils.ts rename to src/components/Medicine/MedicineAdministrationSheet/utils.ts diff --git a/src/Components/Medicine/MedicinePrescriptionSummary.tsx b/src/components/Medicine/MedicinePrescriptionSummary.tsx similarity index 98% rename from src/Components/Medicine/MedicinePrescriptionSummary.tsx rename to src/components/Medicine/MedicinePrescriptionSummary.tsx index 929c70d7e59..eb1c0b9ad03 100644 --- a/src/Components/Medicine/MedicinePrescriptionSummary.tsx +++ b/src/components/Medicine/MedicinePrescriptionSummary.tsx @@ -1,13 +1,13 @@ -import MedicineRoutes from "../Medicine/routes"; +import MedicineRoutes from "./routes"; import useQuery from "../../Utils/request/useQuery"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import { useState } from "react"; import Timeline, { TimelineNode } from "../../CAREUI/display/Timeline"; -import { MedibaseMedicine, Prescription } from "../Medicine/models"; +import { MedibaseMedicine, Prescription } from "./models"; import { useTranslation } from "react-i18next"; import { humanizeStrings } from "../../Utils/utils"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface MedicinePrescriptionSummaryProps { consultation: string; } diff --git a/src/Components/Medicine/PrescriptionBuilder.tsx b/src/components/Medicine/PrescriptionBuilder.tsx similarity index 96% rename from src/Components/Medicine/PrescriptionBuilder.tsx rename to src/components/Medicine/PrescriptionBuilder.tsx index 18efa27ee08..8cb0d7ecda6 100644 --- a/src/Components/Medicine/PrescriptionBuilder.tsx +++ b/src/components/Medicine/PrescriptionBuilder.tsx @@ -1,8 +1,8 @@ import { useState } from "react"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NormalPrescription, Prescription, PRNPrescription } from "./models"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import CreatePrescriptionForm from "./CreatePrescriptionForm"; import PrescriptionDetailCard from "./PrescriptionDetailCard"; import DiscontinuePrescription from "./DiscontinuePrescription"; @@ -10,7 +10,7 @@ import AdministerMedicine from "./AdministerMedicine"; import { useTranslation } from "react-i18next"; import useQuery from "../../Utils/request/useQuery"; import MedicineRoutes from "./routes"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild"; import { compareBy } from "../../Utils/utils"; diff --git a/src/Components/Medicine/PrescriptionDetailCard.tsx b/src/components/Medicine/PrescriptionDetailCard.tsx similarity index 98% rename from src/Components/Medicine/PrescriptionDetailCard.tsx rename to src/components/Medicine/PrescriptionDetailCard.tsx index 4f84238afcf..98430c23c1a 100644 --- a/src/Components/Medicine/PrescriptionDetailCard.tsx +++ b/src/components/Medicine/PrescriptionDetailCard.tsx @@ -1,8 +1,8 @@ import { Prescription } from "./models"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { classNames } from "../../Utils/utils"; -import ReadMore from "../Common/components/Readmore"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ReadMore from "@/components/Common/components/Readmore"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import { useState } from "react"; diff --git a/src/Components/Medicine/PrescriptionsTable.tsx b/src/components/Medicine/PrescriptionsTable.tsx similarity index 96% rename from src/Components/Medicine/PrescriptionsTable.tsx rename to src/components/Medicine/PrescriptionsTable.tsx index 8feaa0b151f..0121acf7159 100644 --- a/src/Components/Medicine/PrescriptionsTable.tsx +++ b/src/components/Medicine/PrescriptionsTable.tsx @@ -3,12 +3,12 @@ import ResponsiveMedicineTable from "./ResponsiveMedicineTables"; import { formatDateTime } from "../../Utils/utils"; import { Prescription } from "./models"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { Cancel } from "../Common/components/ButtonV2"; +import { Cancel } from "@/components/Common/components/ButtonV2"; import RecordMeta from "../../CAREUI/display/RecordMeta"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import PrescriptionDetailCard from "./PrescriptionDetailCard"; import { useTranslation } from "react-i18next"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import useQuery from "../../Utils/request/useQuery"; import MedicineRoutes from "./routes"; diff --git a/src/Components/Medicine/PrescrpitionTimeline.tsx b/src/components/Medicine/PrescrpitionTimeline.tsx similarity index 97% rename from src/Components/Medicine/PrescrpitionTimeline.tsx rename to src/components/Medicine/PrescrpitionTimeline.tsx index f26957f63c6..08d81457d6c 100644 --- a/src/Components/Medicine/PrescrpitionTimeline.tsx +++ b/src/components/Medicine/PrescrpitionTimeline.tsx @@ -1,5 +1,5 @@ import dayjs from "../../Utils/dayjs"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import useQuery from "../../Utils/request/useQuery"; import { classNames, formatDateTime, formatTime } from "../../Utils/utils"; import { MedicineAdministrationRecord, Prescription } from "./models"; @@ -9,9 +9,9 @@ import Timeline, { TimelineNode, TimelineNodeNotes, } from "../../CAREUI/display/Timeline"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import request from "../../Utils/request/request"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import CareIcon from "../../CAREUI/icons/CareIcon"; diff --git a/src/Components/Medicine/PrintPreview.tsx b/src/components/Medicine/PrintPreview.tsx similarity index 99% rename from src/Components/Medicine/PrintPreview.tsx rename to src/components/Medicine/PrintPreview.tsx index a5b78b5a3ec..fdc586b2ccc 100644 --- a/src/Components/Medicine/PrintPreview.tsx +++ b/src/components/Medicine/PrintPreview.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; import PrintPreview from "../../CAREUI/misc/PrintPreview"; -import { useSlugs } from "../../Common/hooks/useSlug"; +import { useSlugs } from "@/common/hooks/useSlug"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; import { diff --git a/src/Components/Medicine/ResponsiveMedicineTables.tsx b/src/components/Medicine/ResponsiveMedicineTables.tsx similarity index 98% rename from src/Components/Medicine/ResponsiveMedicineTables.tsx rename to src/components/Medicine/ResponsiveMedicineTables.tsx index 0d6408c6ba4..5337f1cd20f 100644 --- a/src/Components/Medicine/ResponsiveMedicineTables.tsx +++ b/src/components/Medicine/ResponsiveMedicineTables.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import AccordionV2 from "../Common/components/AccordionV2"; +import AccordionV2 from "@/components/Common/components/AccordionV2"; import { classNames } from "../../Utils/utils"; function getWindowSize() { diff --git a/src/Components/Medicine/models.ts b/src/components/Medicine/models.ts similarity index 100% rename from src/Components/Medicine/models.ts rename to src/components/Medicine/models.ts diff --git a/src/Components/Medicine/routes.ts b/src/components/Medicine/routes.ts similarity index 100% rename from src/Components/Medicine/routes.ts rename to src/components/Medicine/routes.ts diff --git a/src/Components/Medicine/validators.ts b/src/components/Medicine/validators.ts similarity index 100% rename from src/Components/Medicine/validators.ts rename to src/components/Medicine/validators.ts diff --git a/src/Components/Notifications/NoticeBoard.tsx b/src/components/Notifications/NoticeBoard.tsx similarity index 94% rename from src/Components/Notifications/NoticeBoard.tsx rename to src/components/Notifications/NoticeBoard.tsx index 689478fd93b..1981a989588 100644 --- a/src/Components/Notifications/NoticeBoard.tsx +++ b/src/components/Notifications/NoticeBoard.tsx @@ -1,5 +1,5 @@ -import Page from "../Common/components/Page"; -import Loading from "../Common/Loading"; +import Page from "@/components/Common/components/Page"; +import Loading from "@/components/Common/Loading"; import { formatDateTime, formatName } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; import CareIcon from "../../CAREUI/icons/CareIcon"; diff --git a/src/Components/Notifications/NotificationsList.tsx b/src/components/Notifications/NotificationsList.tsx similarity index 97% rename from src/Components/Notifications/NotificationsList.tsx rename to src/components/Notifications/NotificationsList.tsx index 30c380fe9a6..f15d5e8cb2a 100644 --- a/src/Components/Notifications/NotificationsList.tsx +++ b/src/components/Notifications/NotificationsList.tsx @@ -1,21 +1,21 @@ import { navigate } from "raviger"; import { useEffect, useRef, useState } from "react"; -import Spinner from "../Common/Spinner"; -import { NOTIFICATION_EVENTS } from "../../Common/constants"; -import { Error, Success, Warn } from "../../Utils/Notifications.js"; +import Spinner from "@/components/Common/Spinner"; +import { NOTIFICATION_EVENTS } from "@/common/constants"; +import { Error, Success, Warn } from "../../Utils/Notifications"; import { classNames, formatDateTime } from "../../Utils/utils"; import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; import * as Sentry from "@sentry/browser"; import { ShrinkedSidebarItem, SidebarItem, -} from "../Common/Sidebar/SidebarItem"; +} from "@/components/Common/Sidebar/SidebarItem"; import SlideOver from "../../CAREUI/interactive/SlideOver"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import SelectMenuV2 from "../Form/SelectMenuV2"; import { useTranslation } from "react-i18next"; -import CircularProgress from "../Common/components/CircularProgress"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import useAuthUser from "@/common/hooks/useAuthUser"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; diff --git a/src/Components/Notifications/ShowPushNotification.tsx b/src/components/Notifications/ShowPushNotification.tsx similarity index 100% rename from src/Components/Notifications/ShowPushNotification.tsx rename to src/components/Notifications/ShowPushNotification.tsx diff --git a/src/Components/Notifications/models.tsx b/src/components/Notifications/models.tsx similarity index 100% rename from src/Components/Notifications/models.tsx rename to src/components/Notifications/models.tsx diff --git a/src/Components/Patient/DailyRoundListDetails.tsx b/src/components/Patient/DailyRoundListDetails.tsx similarity index 97% rename from src/Components/Patient/DailyRoundListDetails.tsx rename to src/components/Patient/DailyRoundListDetails.tsx index db68bc734d7..727658d7146 100644 --- a/src/Components/Patient/DailyRoundListDetails.tsx +++ b/src/components/Patient/DailyRoundListDetails.tsx @@ -1,12 +1,12 @@ import { useState } from "react"; import { DailyRoundsModel } from "./models"; -import Page from "../Common/components/Page"; -import ButtonV2 from "../Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { formatDateTime } from "../../Utils/utils"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export const DailyRoundListDetails = (props: any) => { const { t } = useTranslation(); const { facilityId, patientId, consultationId, id } = props; diff --git a/src/Components/Patient/DailyRounds.tsx b/src/components/Patient/DailyRounds.tsx similarity index 98% rename from src/Components/Patient/DailyRounds.tsx rename to src/components/Patient/DailyRounds.tsx index 3e10383e78a..d37e942c109 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/components/Patient/DailyRounds.tsx @@ -15,17 +15,17 @@ import { SLEEP_CHOICES, TELEMEDICINE_ACTIONS, URINATION_FREQUENCY_CHOICES, -} from "../../Common/constants"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +} from "@/common/constants"; +import useAppHistory from "@/common/hooks/useAppHistory"; import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; import * as Notification from "../../Utils/Notifications"; import { formatDateTime } from "../../Utils/utils"; import BloodPressureFormField, { BloodPressureValidator, -} from "../Common/BloodPressureFormField"; -import TemperatureFormField from "../Common/TemperatureFormField"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; +} from "@/components/Common/BloodPressureFormField"; +import TemperatureFormField from "@/components/Common/TemperatureFormField"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; import RangeAutocompleteFormField from "../Form/FormFields/RangeAutocompleteFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; @@ -38,7 +38,7 @@ import routes from "../../Redux/api"; import { Scribe } from "../Scribe/Scribe"; import { SCRIBE_FORMS } from "../Scribe/formDetails"; import { DailyRoundsModel, DailyRoundTypes } from "./models"; -import InvestigationBuilder from "../Common/prescription-builder/InvestigationBuilder"; +import InvestigationBuilder from "@/components/Common/prescription-builder/InvestigationBuilder"; import { FieldErrorText } from "../Form/FormFields/FormField"; import { error } from "@pnotify/core"; import { useTranslation } from "react-i18next"; @@ -50,14 +50,14 @@ import { } from "../Diagnosis/types"; import { EncounterSymptomsBuilder } from "../Symptoms/SymptomsBuilder"; import { FieldLabel } from "../Form/FormFields/FormField"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import SymptomsApi from "../Symptoms/api"; import { scrollTo } from "../../Utils/utils"; import { ICD11DiagnosisModel } from "../Facility/models"; import NursingCare from "../LogUpdate/Sections/NursingCare"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export const DailyRounds = (props: any) => { const { t } = useTranslation(); const authUser = useAuthUser(); diff --git a/src/Components/Patient/DiagnosesFilter.tsx b/src/components/Patient/DiagnosesFilter.tsx similarity index 100% rename from src/Components/Patient/DiagnosesFilter.tsx rename to src/components/Patient/DiagnosesFilter.tsx diff --git a/src/Components/Patient/FileUploadPage.tsx b/src/components/Patient/FileUploadPage.tsx similarity index 95% rename from src/Components/Patient/FileUploadPage.tsx rename to src/components/Patient/FileUploadPage.tsx index a99e2833a2c..2fae97dc159 100644 --- a/src/Components/Patient/FileUploadPage.tsx +++ b/src/components/Patient/FileUploadPage.tsx @@ -1,6 +1,6 @@ import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import { FileUpload } from "../Files/FileUpload"; export default function FileUploadPage(props: { diff --git a/src/Components/Patient/InsuranceDetails.tsx b/src/components/Patient/InsuranceDetails.tsx similarity index 93% rename from src/Components/Patient/InsuranceDetails.tsx rename to src/components/Patient/InsuranceDetails.tsx index f8bd4473c5f..58efe498712 100644 --- a/src/Components/Patient/InsuranceDetails.tsx +++ b/src/components/Patient/InsuranceDetails.tsx @@ -1,10 +1,10 @@ import { HCXPolicyModel } from "../HCX/models"; import { InsuranceDetialsCard } from "./InsuranceDetailsCard"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface IProps { facilityId: string; id: string; diff --git a/src/Components/Patient/InsuranceDetailsCard.tsx b/src/components/Patient/InsuranceDetailsCard.tsx similarity index 97% rename from src/Components/Patient/InsuranceDetailsCard.tsx rename to src/components/Patient/InsuranceDetailsCard.tsx index 07c207b9826..132647cc67f 100644 --- a/src/Components/Patient/InsuranceDetailsCard.tsx +++ b/src/components/Patient/InsuranceDetailsCard.tsx @@ -1,4 +1,4 @@ -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { HCXPolicyModel } from "../HCX/models"; import { navigate } from "raviger"; diff --git a/src/Components/Patient/ManagePatients.tsx b/src/components/Patient/ManagePatients.tsx similarity index 97% rename from src/Components/Patient/ManagePatients.tsx rename to src/components/Patient/ManagePatients.tsx index c6bc3352115..22399b081f1 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/components/Patient/ManagePatients.tsx @@ -1,4 +1,4 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { ADMITTED_TO, @@ -9,19 +9,19 @@ import { PATIENT_SORT_OPTIONS, RESPIRATORY_SUPPORT, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; +} from "@/common/constants"; import { FacilityModel, PatientCategory } from "../Facility/models"; import { Link, navigate } from "raviger"; import { ReactNode, useEffect, useState } from "react"; -import { parseOptionId } from "../../Common/utils"; +import { parseOptionId } from "@/common/utils"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import Chip from "../../CAREUI/display/Chip"; import CountBlock from "../../CAREUI/display/Count"; import DoctorVideoSlideover from "../Facility/DoctorVideoSlideover"; -import { ExportMenu } from "../Common/Export"; +import { ExportMenu } from "@/components/Common/Export"; import FacilitiesSelectDialogue from "../ExternalResult/FacilitiesSelectDialogue"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import FilterBadge from "../../CAREUI/display/FilterBadge"; @@ -29,35 +29,35 @@ import PatientFilter from "./PatientFilter"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import SearchInput from "../Form/SearchInput"; -import SortDropdownMenu from "../Common/SortDropdown"; +import SortDropdownMenu from "@/components/Common/SortDropdown"; import { formatPatientAge, humanizeStrings, isAntenatal, parsePhoneNumber, -} from "../../Utils/utils.js"; -import useFilters from "../../Common/hooks/useFilters"; +} from "../../Utils/utils"; +import useFilters from "@/common/hooks/useFilters"; import { useTranslation } from "react-i18next"; -import Page from "../Common/components/Page.js"; +import Page from "@/components/Common/components/Page"; import dayjs from "dayjs"; -import { triggerGoal } from "../../Integrations/Plausible.js"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; +import { triggerGoal } from "../../Integrations/Plausible"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; import { DIAGNOSES_FILTER_LABELS, DiagnosesFilterKey, FILTER_BY_DIAGNOSES_KEYS, -} from "./DiagnosesFilter.js"; -import { ICD11DiagnosisModel } from "../Diagnosis/types.js"; -import { getDiagnosesByIds } from "../Diagnosis/utils.js"; -import Tabs from "../Common/components/Tabs.js"; -import { PhoneNumberValidator } from "../Form/FieldValidators.js"; -import { isPatientMandatoryDataFilled } from "./Utils.js"; -import request from "../../Utils/request/request.js"; -import { Avatar } from "../Common/Avatar.js"; +} from "./DiagnosesFilter"; +import { ICD11DiagnosisModel } from "../Diagnosis/types"; +import { getDiagnosesByIds } from "../Diagnosis/utils"; +import Tabs from "@/components/Common/components/Tabs"; +import { PhoneNumberValidator } from "../Form/FieldValidators"; +import { isPatientMandatoryDataFilled } from "./Utils"; +import request from "../../Utils/request/request"; +import { Avatar } from "@/components/Common/Avatar"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface TabPanelProps { children?: ReactNode; dir?: string; diff --git a/src/Components/Patient/PatientCategorySelect.tsx b/src/components/Patient/PatientCategorySelect.tsx similarity index 94% rename from src/Components/Patient/PatientCategorySelect.tsx rename to src/components/Patient/PatientCategorySelect.tsx index 17265a3940a..58717a81ca7 100644 --- a/src/Components/Patient/PatientCategorySelect.tsx +++ b/src/components/Patient/PatientCategorySelect.tsx @@ -1,4 +1,4 @@ -import { PatientCategoryID, PATIENT_CATEGORIES } from "../../Common/constants"; +import { PatientCategoryID, PATIENT_CATEGORIES } from "@/common/constants"; import { classNames } from "../../Utils/utils"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { FormFieldBaseProps } from "../Form/FormFields/Utils"; diff --git a/src/Components/Patient/PatientConsentRecordBlock.tsx b/src/components/Patient/PatientConsentRecordBlock.tsx similarity index 95% rename from src/Components/Patient/PatientConsentRecordBlock.tsx rename to src/components/Patient/PatientConsentRecordBlock.tsx index b66a6cbd8aa..4d0fd092ee4 100644 --- a/src/Components/Patient/PatientConsentRecordBlock.tsx +++ b/src/components/Patient/PatientConsentRecordBlock.tsx @@ -1,10 +1,10 @@ import { CONSENT_PATIENT_CODE_STATUS_CHOICES, CONSENT_TYPE_CHOICES, -} from "../../Common/constants"; +} from "@/common/constants"; import { FileUploadModel } from "./models"; -import ButtonV2 from "../Common/components/ButtonV2"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import useAuthUser from "@/common/hooks/useAuthUser"; import { PatientConsentModel } from "../Facility/models"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { useEffect, useState } from "react"; diff --git a/src/Components/Patient/PatientConsentRecords.tsx b/src/components/Patient/PatientConsentRecords.tsx similarity index 97% rename from src/Components/Patient/PatientConsentRecords.tsx rename to src/components/Patient/PatientConsentRecords.tsx index 4ea9a0f294a..9850cfe0b2c 100644 --- a/src/Components/Patient/PatientConsentRecords.tsx +++ b/src/components/Patient/PatientConsentRecords.tsx @@ -2,22 +2,22 @@ import { useState } from "react"; import { CONSENT_PATIENT_CODE_STATUS_CHOICES, CONSENT_TYPE_CHOICES, -} from "../../Common/constants"; +} from "@/common/constants"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import request from "../../Utils/request/request"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { formatDateTime } from "../../Utils/utils"; import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import useFileUpload from "../../Utils/useFileUpload"; import PatientConsentRecordBlockGroup from "./PatientConsentRecordBlock"; import useFileManager from "../../Utils/useFileManager"; import { PatientConsentModel } from "../Facility/models"; -import Tabs from "../Common/components/Tabs"; +import Tabs from "@/components/Common/components/Tabs"; import { t } from "i18next"; export default function PatientConsentRecords(props: { diff --git a/src/Components/Patient/PatientFilter.tsx b/src/components/Patient/PatientFilter.tsx similarity index 98% rename from src/Components/Patient/PatientFilter.tsx rename to src/components/Patient/PatientFilter.tsx index ffe75ca8c7e..2d94aa270fc 100644 --- a/src/Components/Patient/PatientFilter.tsx +++ b/src/components/Patient/PatientFilter.tsx @@ -9,13 +9,13 @@ import { GENDER_TYPES, PATIENT_FILTER_CATEGORIES, RATION_CARD_CATEGORY, -} from "../../Common/constants"; -import useMergeState from "../../Common/hooks/useMergeState"; +} from "@/common/constants"; +import useMergeState from "@/common/hooks/useMergeState"; import { dateQueryString } from "../../Utils/utils"; -import { DateRange } from "../Common/DateRangeInputV2"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { LocationSelect } from "../Common/LocationSelect"; -import AccordionV2 from "../Common/components/AccordionV2"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import AccordionV2 from "@/components/Common/components/AccordionV2"; import DistrictSelect from "../Facility/FacilityFilter/DistrictSelect"; import AutoCompleteAsync from "../Form/AutoCompleteAsync"; import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; @@ -31,7 +31,7 @@ import DiagnosesFilter, { FILTER_BY_DIAGNOSES_KEYS } from "./DiagnosesFilter"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { useTranslation } from "react-i18next"; import careConfig from "@careConfig"; diff --git a/src/Components/Patient/PatientHome.tsx b/src/components/Patient/PatientHome.tsx similarity index 98% rename from src/Components/Patient/PatientHome.tsx rename to src/components/Patient/PatientHome.tsx index ba2f6e33a3f..d95c6d1df21 100644 --- a/src/Components/Patient/PatientHome.tsx +++ b/src/components/Patient/PatientHome.tsx @@ -7,7 +7,7 @@ import { GENDER_TYPES, OCCUPATION_TYPES, SAMPLE_TEST_STATUS, -} from "../../Common/constants"; +} from "@/common/constants"; import { PatientModel, SampleTestModel } from "./models"; import { classNames, @@ -18,31 +18,31 @@ import { isAntenatal, isPostPartum, } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import Chip from "../../CAREUI/display/Chip"; -import CircularProgress from "../Common/components/CircularProgress"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { ConsultationCard } from "../Facility/ConsultationCard"; import { ConsultationModel } from "../Facility/models"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Page from "../Common/components/Page"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; +import Page from "@/components/Common/components/Page"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; import { SampleTestCard } from "./SampleTestCard"; -import UserAutocomplete from "../Common/UserAutocompleteFormField"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; import dayjs from "../../Utils/dayjs"; import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import { InsuranceDetialsCard } from "./InsuranceDetailsCard"; import request from "../../Utils/request/request"; import PaginatedList from "../../CAREUI/misc/PaginatedList"; import { useTranslation } from "react-i18next"; -import { Alert, AlertDescription, AlertTitle } from "@/Components/ui/alert"; -import { Button } from "@/Components/ui/button"; -import Loading from "@/Components/Common/Loading"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Button } from "@/components/ui/button"; +import Loading from "@/components/Common/Loading"; export const parseOccupation = (occupation: string | undefined) => { return OCCUPATION_TYPES.find((i) => i.value === occupation)?.text; diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/components/Patient/PatientInfoCard.tsx similarity index 97% rename from src/Components/Patient/PatientInfoCard.tsx rename to src/components/Patient/PatientInfoCard.tsx index 7e3a9563799..4566cfbfb4f 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/components/Patient/PatientInfoCard.tsx @@ -1,4 +1,4 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { CONSULTATION_SUGGESTION, @@ -6,13 +6,13 @@ import { PATIENT_CATEGORIES, RESPIRATORY_SUPPORT, TELEMEDICINE_ACTIONS, -} from "../../Common/constants.js"; -import { ConsultationModel, PatientCategory } from "../Facility/models.js"; +} from "@/common/constants"; +import { ConsultationModel, PatientCategory } from "../Facility/models"; import { Switch, MenuItem, Field, Label } from "@headlessui/react"; import { Link, navigate } from "raviger"; import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon.js"; -import dayjs from "../../Utils/dayjs.js"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import dayjs from "../../Utils/dayjs"; import { classNames, formatDate, @@ -20,28 +20,28 @@ import { formatName, formatPatientAge, humanizeStrings, -} from "../../Utils/utils.js"; -import ABHAProfileModal from "../ABDM/ABHAProfileModal.js"; -import DialogModal from "../Common/Dialog.js"; -import ButtonV2 from "../Common/components/ButtonV2.js"; -import Beds from "../Facility/Consultations/Beds.js"; -import { PatientModel } from "./models.js"; -import request from "../../Utils/request/request.js"; -import routes from "../../Redux/api.js"; -import DropdownMenu from "../Common/components/Menu.js"; -import { triggerGoal } from "../../Integrations/Plausible.js"; +} from "../../Utils/utils"; +import ABHAProfileModal from "../ABDM/ABHAProfileModal"; +import DialogModal from "@/components/Common/Dialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Beds from "../Facility/Consultations/Beds"; +import { PatientModel } from "./models"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; +import DropdownMenu from "@/components/Common/components/Menu"; +import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import { Mews } from "../Facility/Consultations/Mews.js"; -import DischargeSummaryModal from "../Facility/DischargeSummaryModal.js"; -import DischargeModal from "../Facility/DischargeModal.js"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import { Mews } from "../Facility/Consultations/Mews"; +import DischargeSummaryModal from "../Facility/DischargeSummaryModal"; +import DischargeModal from "../Facility/DischargeModal"; import { useTranslation } from "react-i18next"; -import useQuery from "../../Utils/request/useQuery.js"; -import FetchRecordsModal from "../ABDM/FetchRecordsModal.js"; -import { AbhaNumberModel } from "../ABDM/types/abha.js"; -import { SkillModel } from "../Users/models.js"; -import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild.js"; -import LinkAbhaNumber from "../ABDM/LinkAbhaNumber"; +import useQuery from "../../Utils/request/useQuery"; +import FetchRecordsModal from "../ABDM/FetchRecordsModal"; +import { AbhaNumberModel } from "../ABDM/types/abha"; +import { SkillModel } from "../Users/models"; +import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild"; +import LinkAbhaNumber from "../ABDM/LinkAbhaNumber/index"; import careConfig from "@careConfig"; const formatSkills = (arr: SkillModel[]) => { diff --git a/src/Components/Patient/PatientNotes.tsx b/src/components/Patient/PatientNotes.tsx similarity index 91% rename from src/Components/Patient/PatientNotes.tsx rename to src/components/Patient/PatientNotes.tsx index da97e5d3f4f..9edbbd2b5d8 100644 --- a/src/Components/Patient/PatientNotes.tsx +++ b/src/components/Patient/PatientNotes.tsx @@ -1,19 +1,19 @@ import { useState, useEffect } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import PatientNotesList from "../Facility/PatientNotesList"; -import Page from "../Common/components/Page"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; +import Page from "@/components/Common/components/Page"; +import { useMessageListener } from "@/common/hooks/useMessageListener"; import { PatientNoteStateType, PatientNotesModel } from "../Facility/models"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; -import { PATIENT_NOTES_THREADS } from "../../Common/constants.js"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import DoctorNoteReplyPreviewCard from "../Facility/DoctorNoteReplyPreviewCard.js"; -import { classNames, keysOf } from "../../Utils/utils.js"; -import AutoExpandingTextInputFormField from "../Form/FormFields/AutoExpandingTextInputFormField.js"; +import { PATIENT_NOTES_THREADS } from "@/common/constants"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import DoctorNoteReplyPreviewCard from "../Facility/DoctorNoteReplyPreviewCard"; +import { classNames, keysOf } from "../../Utils/utils"; +import AutoExpandingTextInputFormField from "../Form/FormFields/AutoExpandingTextInputFormField"; import { t } from "i18next"; interface PatientNotesProps { diff --git a/src/Components/Patient/PatientRegister.tsx b/src/components/Patient/PatientRegister.tsx similarity index 98% rename from src/Components/Patient/PatientRegister.tsx rename to src/components/Patient/PatientRegister.tsx index 4b136ffa0f1..a39330dd0ee 100644 --- a/src/Components/Patient/PatientRegister.tsx +++ b/src/components/Patient/PatientRegister.tsx @@ -1,4 +1,4 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { BLOOD_GROUPS, @@ -9,7 +9,7 @@ import { RATION_CARD_CATEGORY, SOCIOECONOMIC_STATUS_CHOICES, VACCINES, -} from "../../Common/constants"; +} from "@/common/constants"; import { DistrictModel, DupPatientModel, WardModel } from "../Facility/models"; import { FieldError, @@ -27,52 +27,52 @@ import { } from "../../Utils/utils"; import { useCallback, useReducer, useRef, useState } from "react"; import { navigate } from "raviger"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +import { statusType, useAbortableEffect } from "@/common/utils"; -import AccordionV2 from "../Common/components/AccordionV2"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete.js"; -import ButtonV2 from "../Common/components/ButtonV2"; +import AccordionV2 from "@/components/Common/components/AccordionV2"; +import AutocompleteFormField from "../Form/FormFields/Autocomplete"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import CollapseV2 from "../Common/components/CollapseV2"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import CollapseV2 from "@/components/Common/components/CollapseV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import DateFormField from "../Form/FormFields/DateFormField"; -import DialogModal from "../Common/Dialog"; +import DialogModal from "@/components/Common/Dialog"; import DuplicatePatientDialog from "../Facility/DuplicatePatientDialog"; import Error404 from "../ErrorPages/404"; import Form from "../Form/Form"; import { HCXPolicyModel } from "../HCX/models"; import HCXPolicyValidator from "../HCX/validators"; -import { ILocalBodies } from "../ExternalResult/models.js"; +import { ILocalBodies } from "../ExternalResult/models"; import InsuranceDetailsBuilder from "../HCX/InsuranceDetailsBuilder"; import { PatientModel, Occupation, PatientMeta } from "./models"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import RadioFormField from "../Form/FormFields/RadioFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import SelectMenuV2 from "../Form/SelectMenuV2.js"; -import Spinner from "../Common/Spinner"; +import SelectMenuV2 from "../Form/SelectMenuV2"; +import Spinner from "@/components/Common/Spinner"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import TransferPatientDialog from "../Facility/TransferPatientDialog"; import _ from "lodash"; -import countryList from "../../Common/static/countries.json"; +import countryList from "@/common/static/countries.json"; import { debounce } from "lodash-es"; -import request from "../../Utils/request/request.js"; -import routes from "../../Redux/api.js"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import useQuery from "../../Utils/request/useQuery.js"; +import request from "../../Utils/request/request"; +import routes from "../../Redux/api"; +import useAppHistory from "@/common/hooks/useAppHistory"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import useQuery from "../../Utils/request/useQuery"; import { useTranslation } from "react-i18next"; -import LinkAbhaNumber from "../ABDM/LinkAbhaNumber/index.js"; -import { AbhaNumberModel } from "../ABDM/types/abha.js"; -import { validatePincode } from "../../Common/validation"; +import LinkAbhaNumber from "../ABDM/LinkAbhaNumber/index"; +import { AbhaNumberModel } from "../ABDM/types/abha"; +import { validatePincode } from "@/common/validation"; import careConfig from "@careConfig"; -import { Button } from "@/Components/ui/button"; +import { Button } from "@/components/ui/button"; -import Loading from "@/Components/Common/Loading"; -import PageTitle from "@/Components/Common/PageTitle"; -import { RestoreDraftButton } from "@/Utils/AutoSave.js"; -import { FormContextValue } from "../Form/FormContext.js"; +import Loading from "@/components/Common/Loading"; +import PageTitle from "@/components/Common/PageTitle"; +import { RestoreDraftButton } from "@/Utils/AutoSave"; +import { FormContextValue } from "../Form/FormContext"; type PatientForm = PatientModel & PatientMeta & { age?: number; is_postpartum?: boolean }; diff --git a/src/Components/Patient/SampleDetails.tsx b/src/components/Patient/SampleDetails.tsx similarity index 98% rename from src/Components/Patient/SampleDetails.tsx rename to src/components/Patient/SampleDetails.tsx index a80ca515122..2e8b93c7bb4 100644 --- a/src/Components/Patient/SampleDetails.tsx +++ b/src/components/Patient/SampleDetails.tsx @@ -1,10 +1,10 @@ import { FlowModel } from "./models"; -import { GENDER_TYPES, TEST_TYPE_CHOICES } from "../../Common/constants"; +import { GENDER_TYPES, TEST_TYPE_CHOICES } from "@/common/constants"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import Card from "../../CAREUI/display/Card"; import { FileUpload } from "../Files/FileUpload"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import * as _ from "lodash-es"; import { formatDateTime, formatPatientAge } from "../../Utils/utils"; @@ -13,7 +13,7 @@ import { DetailRoute } from "../../Routers/types"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export const SampleDetails = ({ id }: DetailRoute) => { const { loading: isLoading, data: sampleDetails } = useQuery( routes.getTestSample, diff --git a/src/Components/Patient/SampleFilters.tsx b/src/components/Patient/SampleFilters.tsx similarity index 93% rename from src/Components/Patient/SampleFilters.tsx rename to src/components/Patient/SampleFilters.tsx index 2a72f54204f..0cbb3056baa 100644 --- a/src/Components/Patient/SampleFilters.tsx +++ b/src/components/Patient/SampleFilters.tsx @@ -2,12 +2,12 @@ import { SAMPLE_TEST_STATUS, SAMPLE_TEST_RESULT, SAMPLE_TYPE_CHOICES, -} from "../../Common/constants"; -import { FacilitySelect } from "../Common/FacilitySelect"; +} from "@/common/constants"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FacilityModel } from "../Facility/models"; -import useMergeState from "../../Common/hooks/useMergeState"; +import useMergeState from "@/common/hooks/useMergeState"; import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import { FieldLabel } from "../Form/FormFields/FormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; diff --git a/src/Components/Patient/SamplePreview.tsx b/src/components/Patient/SamplePreview.tsx similarity index 99% rename from src/Components/Patient/SamplePreview.tsx rename to src/components/Patient/SamplePreview.tsx index 3e692d4d43a..f1c8489bed9 100644 --- a/src/Components/Patient/SamplePreview.tsx +++ b/src/components/Patient/SamplePreview.tsx @@ -1,11 +1,11 @@ import { classNames, formatDateTime, humanizeStrings } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface ISamplePreviewProps { id: string; sampleId: string; diff --git a/src/Components/Patient/SampleTest.tsx b/src/components/Patient/SampleTest.tsx similarity index 95% rename from src/Components/Patient/SampleTest.tsx rename to src/components/Patient/SampleTest.tsx index b4d36da74b6..4c158ff7189 100644 --- a/src/Components/Patient/SampleTest.tsx +++ b/src/components/Patient/SampleTest.tsx @@ -1,23 +1,23 @@ import { navigate } from "raviger"; import { useReducer, useState } from "react"; -import { SAMPLE_TYPE_CHOICES, ICMR_CATEGORY } from "../../Common/constants"; -import * as Notification from "../../Utils/Notifications.js"; +import { SAMPLE_TYPE_CHOICES, ICMR_CATEGORY } from "@/common/constants"; +import * as Notification from "../../Utils/Notifications"; import { SampleTestModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { FieldLabel } from "../Form/FormFields/FormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import Page from "../Common/components/Page"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import Page from "@/components/Common/components/Page"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; const initForm: SampleTestModel = { isFastTrack: false, fast_track: "", diff --git a/src/Components/Patient/SampleTestCard.tsx b/src/components/Patient/SampleTestCard.tsx similarity index 97% rename from src/Components/Patient/SampleTestCard.tsx rename to src/components/Patient/SampleTestCard.tsx index c1a5d38454a..ad54850ea10 100644 --- a/src/Components/Patient/SampleTestCard.tsx +++ b/src/components/Patient/SampleTestCard.tsx @@ -1,14 +1,14 @@ import { navigate } from "raviger"; import { useState } from "react"; import { SampleTestModel } from "./models"; -import { SAMPLE_TEST_STATUS } from "../../Common/constants"; +import { SAMPLE_TEST_STATUS } from "@/common/constants"; import * as Notification from "../../Utils/Notifications"; import UpdateStatusDialog from "./UpdateStatusDialog"; import * as _ from "lodash-es"; import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; diff --git a/src/Components/Patient/SampleViewAdmin.tsx b/src/components/Patient/SampleViewAdmin.tsx similarity index 98% rename from src/Components/Patient/SampleViewAdmin.tsx rename to src/components/Patient/SampleViewAdmin.tsx index 2361d2a697a..5b84059d6bc 100644 --- a/src/Components/Patient/SampleViewAdmin.tsx +++ b/src/components/Patient/SampleViewAdmin.tsx @@ -6,23 +6,23 @@ import { SAMPLE_TEST_RESULT, SAMPLE_FLOW_RULES, SAMPLE_TYPE_CHOICES, -} from "../../Common/constants"; +} from "@/common/constants"; import * as Notification from "../../Utils/Notifications"; import { SampleTestModel } from "./models"; import UpdateStatusDialog from "./UpdateStatusDialog"; import { formatDateTime } from "../../Utils/utils"; import SearchInput from "../Form/SearchInput"; -import useFilters from "../../Common/hooks/useFilters"; -import { ExportButton } from "../Common/Export"; +import useFilters from "@/common/hooks/useFilters"; +import { ExportButton } from "@/components/Common/Export"; import CountBlock from "../../CAREUI/display/Count"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function SampleViewAdmin() { const { qParams, diff --git a/src/Components/Patient/ShiftCreate.tsx b/src/components/Patient/ShiftCreate.tsx similarity index 93% rename from src/Components/Patient/ShiftCreate.tsx rename to src/components/Patient/ShiftCreate.tsx index 17d627d982c..350ebe4ccee 100644 --- a/src/Components/Patient/ShiftCreate.tsx +++ b/src/components/Patient/ShiftCreate.tsx @@ -1,15 +1,15 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { BREATHLESSNESS_LEVEL, FACILITY_TYPES, PATIENT_CATEGORIES, SHIFTING_VEHICLE_CHOICES, -} from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +} from "@/common/constants"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { useReducer, useState } from "react"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { FieldLabel } from "../Form/FormFields/FormField"; import PatientCategorySelect from "./PatientCategorySelect"; @@ -17,21 +17,21 @@ import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import { navigate } from "raviger"; -import { parsePhoneNumber } from "../../Utils/utils.js"; -import { phonePreg } from "../../Common/validation"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import { parsePhoneNumber } from "../../Utils/utils"; +import { phonePreg } from "@/common/validation"; +import useAppHistory from "@/common/hooks/useAppHistory"; import { useTranslation } from "react-i18next"; -import Page from "../Common/components/Page.js"; -import Card from "../../CAREUI/display/Card.js"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField.js"; -import { SelectFormField } from "../Form/FormFields/SelectFormField.js"; -import { PhoneNumberValidator } from "../Form/FieldValidators.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; +import Page from "@/components/Common/components/Page"; +import Card from "../../CAREUI/display/Card"; +import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; +import { SelectFormField } from "../Form/FormFields/SelectFormField"; +import { PhoneNumberValidator } from "../Form/FieldValidators"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface patientShiftProps { facilityId: string; patientId: string; diff --git a/src/Components/Patient/UpdateStatusDialog.tsx b/src/components/Patient/UpdateStatusDialog.tsx similarity index 97% rename from src/Components/Patient/UpdateStatusDialog.tsx rename to src/components/Patient/UpdateStatusDialog.tsx index c46bc4dfca6..eb75722c7e4 100644 --- a/src/Components/Patient/UpdateStatusDialog.tsx +++ b/src/components/Patient/UpdateStatusDialog.tsx @@ -4,13 +4,13 @@ import { SAMPLE_TEST_RESULT, SAMPLE_FLOW_RULES, HEADER_CONTENT_TYPES, -} from "../../Common/constants"; +} from "@/common/constants"; import { CreateFileResponse, SampleTestModel } from "./models"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { LinearProgressWithLabel } from "../Files/FileUpload"; -import { Submit } from "../Common/components/ButtonV2"; +import { Submit } from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import TextFormField from "../Form/FormFields/TextFormField"; diff --git a/src/Components/Patient/Utils.ts b/src/components/Patient/Utils.ts similarity index 100% rename from src/Components/Patient/Utils.ts rename to src/components/Patient/Utils.ts diff --git a/src/Components/Patient/models.tsx b/src/components/Patient/models.tsx similarity index 99% rename from src/Components/Patient/models.tsx rename to src/components/Patient/models.tsx index 9843b867a5b..8c27199461b 100644 --- a/src/Components/Patient/models.tsx +++ b/src/components/Patient/models.tsx @@ -24,7 +24,7 @@ import { SOCIOECONOMIC_STATUS_CHOICES, URINATION_FREQUENCY_CHOICES, VENTILATOR_MODE_OPTIONS, -} from "../../Common/constants"; +} from "@/common/constants"; export interface FlowModel { id?: number; diff --git a/src/Components/Resource/BadgesList.tsx b/src/components/Resource/BadgesList.tsx similarity index 96% rename from src/Components/Resource/BadgesList.tsx rename to src/components/Resource/BadgesList.tsx index 491e5b03c39..f32a204e733 100644 --- a/src/Components/Resource/BadgesList.tsx +++ b/src/components/Resource/BadgesList.tsx @@ -1,4 +1,4 @@ -import { SHIFTING_FILTER_ORDER } from "../../Common/constants"; +import { SHIFTING_FILTER_ORDER } from "@/common/constants"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; diff --git a/src/Components/Resource/CommentSection.tsx b/src/components/Resource/CommentSection.tsx similarity index 94% rename from src/Components/Resource/CommentSection.tsx rename to src/components/Resource/CommentSection.tsx index 2a82fa064c3..632d608cd14 100644 --- a/src/Components/Resource/CommentSection.tsx +++ b/src/components/Resource/CommentSection.tsx @@ -1,8 +1,8 @@ import { useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { formatDateTime, formatName } from "../../Utils/utils"; -import CircularProgress from "../Common/components/CircularProgress"; -import ButtonV2 from "../Common/components/ButtonV2"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import routes from "../../Redux/api"; import PaginatedList from "../../CAREUI/misc/PaginatedList"; diff --git a/src/Components/Resource/Commons.tsx b/src/components/Resource/Commons.tsx similarity index 100% rename from src/Components/Resource/Commons.tsx rename to src/components/Resource/Commons.tsx diff --git a/src/Components/Resource/ListFilter.tsx b/src/components/Resource/ListFilter.tsx similarity index 95% rename from src/Components/Resource/ListFilter.tsx rename to src/components/Resource/ListFilter.tsx index d39900aedb5..6e9fb54a5e2 100644 --- a/src/Components/Resource/ListFilter.tsx +++ b/src/components/Resource/ListFilter.tsx @@ -1,13 +1,13 @@ -import { FacilitySelect } from "../Common/FacilitySelect"; -import { RESOURCE_FILTER_ORDER } from "../../Common/constants"; -import { RESOURCE_CHOICES } from "../../Common/constants"; -import useMergeState from "../../Common/hooks/useMergeState"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { RESOURCE_FILTER_ORDER } from "@/common/constants"; +import { RESOURCE_CHOICES } from "@/common/constants"; +import useMergeState from "@/common/hooks/useMergeState"; import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; import { FieldLabel } from "../Form/FormFields/FormField"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { DateRange } from "../Common/DateRangeInputV2"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; import dayjs from "dayjs"; import { dateQueryString } from "../../Utils/utils"; diff --git a/src/Components/Resource/ListView.tsx b/src/components/Resource/ListView.tsx similarity index 96% rename from src/Components/Resource/ListView.tsx rename to src/components/Resource/ListView.tsx index 31b34065aa5..8c05c1c665f 100644 --- a/src/Components/Resource/ListView.tsx +++ b/src/components/Resource/ListView.tsx @@ -3,20 +3,20 @@ import ListFilter from "./ListFilter"; import { formatFilter } from "./Commons"; import BadgesList from "./BadgesList"; import { formatDateTime } from "../../Utils/utils"; -import useFilters from "../../Common/hooks/useFilters"; -import { ExportButton } from "../Common/Export"; -import ButtonV2 from "../Common/components/ButtonV2"; +import useFilters from "@/common/hooks/useFilters"; +import { ExportButton } from "@/components/Common/Export"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; import dayjs from "../../Utils/dayjs"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import SearchInput from "../Form/SearchInput"; import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function ListView() { const { qParams, diff --git a/src/Components/Resource/ResourceBoardView.tsx b/src/components/Resource/ResourceBoardView.tsx similarity index 96% rename from src/Components/Resource/ResourceBoardView.tsx rename to src/components/Resource/ResourceBoardView.tsx index de432496fdd..8d5299fd3f8 100644 --- a/src/Components/Resource/ResourceBoardView.tsx +++ b/src/components/Resource/ResourceBoardView.tsx @@ -1,17 +1,17 @@ import { useState } from "react"; import { Link, navigate } from "raviger"; import ListFilter from "./ListFilter"; -import { RESOURCE_CHOICES } from "../../Common/constants"; +import { RESOURCE_CHOICES } from "@/common/constants"; import BadgesList from "./BadgesList"; import { formatFilter } from "./Commons"; -import useFilters from "../../Common/hooks/useFilters"; -import { ExportButton } from "../Common/Export"; -import ButtonV2 from "../Common/components/ButtonV2"; +import useFilters from "@/common/hooks/useFilters"; +import { ExportButton } from "@/components/Common/Export"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; import SearchInput from "../Form/SearchInput"; -import Tabs from "../Common/components/Tabs"; +import Tabs from "@/components/Common/components/Tabs"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import KanbanBoard from "../Kanban/Board"; @@ -19,7 +19,7 @@ import { ResourceModel } from "../Facility/models"; import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import dayjs from "dayjs"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; const resourceStatusOptions = RESOURCE_CHOICES.map((obj) => obj.text); const COMPLETED = ["COMPLETED", "REJECTED"]; diff --git a/src/Components/Resource/ResourceCreate.tsx b/src/components/Resource/ResourceCreate.tsx similarity index 95% rename from src/Components/Resource/ResourceCreate.tsx rename to src/components/Resource/ResourceCreate.tsx index ec41e6c9175..d7e9dcd7e45 100644 --- a/src/Components/Resource/ResourceCreate.tsx +++ b/src/components/Resource/ResourceCreate.tsx @@ -1,19 +1,19 @@ import { useReducer, useState } from "react"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import * as Notification from "../../Utils/Notifications.js"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; import { OptionsType, RESOURCE_CATEGORY_CHOICES, RESOURCE_SUBCATEGORIES, -} from "../../Common/constants"; +} from "@/common/constants"; import { parsePhoneNumber } from "../../Utils/utils"; -import { phonePreg } from "../../Common/validation"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { phonePreg } from "@/common/validation"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import useAppHistory from "@/common/hooks/useAppHistory"; import { useTranslation } from "react-i18next"; import TextFormField from "../Form/FormFields/TextFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; @@ -21,13 +21,13 @@ import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import RadioFormField from "../Form/FormFields/RadioFormField"; import { FieldLabel } from "../Form/FormFields/FormField"; import Card from "../../CAREUI/display/Card"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import { PhoneNumberValidator } from "../Form/FieldValidators"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface resourceProps { facilityId: number; } diff --git a/src/Components/Resource/ResourceDetails.tsx b/src/components/Resource/ResourceDetails.tsx similarity index 98% rename from src/Components/Resource/ResourceDetails.tsx rename to src/components/Resource/ResourceDetails.tsx index 50e572f5680..667762e5d22 100644 --- a/src/Components/Resource/ResourceDetails.tsx +++ b/src/components/Resource/ResourceDetails.tsx @@ -1,16 +1,16 @@ import { useState } from "react"; import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import { navigate } from "raviger"; -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import CommentSection from "./CommentSection"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import Page from "@/components/Common/components/Page"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function ResourceDetails(props: { id: string }) { const [isPrintMode, setIsPrintMode] = useState(false); const [openDeleteResourceDialog, setOpenDeleteResourceDialog] = diff --git a/src/Components/Resource/ResourceDetailsUpdate.tsx b/src/components/Resource/ResourceDetailsUpdate.tsx similarity index 92% rename from src/Components/Resource/ResourceDetailsUpdate.tsx rename to src/components/Resource/ResourceDetailsUpdate.tsx index 7aac3031274..b281826db7b 100644 --- a/src/Components/Resource/ResourceDetailsUpdate.tsx +++ b/src/components/Resource/ResourceDetailsUpdate.tsx @@ -1,26 +1,26 @@ -import * as Notification from "../../Utils/Notifications.js"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { useReducer, useState } from "react"; import { navigate, useQueryParams } from "raviger"; import Card from "../../CAREUI/display/Card"; -import CircularProgress from "../Common/components/CircularProgress"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { FieldLabel } from "../Form/FormFields/FormField"; -import Page from "../Common/components/Page"; -import { RESOURCE_CHOICES } from "../../Common/constants"; +import Page from "@/components/Common/components/Page"; +import { RESOURCE_CHOICES } from "@/common/constants"; import RadioFormField from "../Form/FormFields/RadioFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -import UserAutocomplete from "../Common/UserAutocompleteFormField"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import { UserModel } from "../Users/models.js"; -import request from "../../Utils/request/request.js"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; +import useAppHistory from "@/common/hooks/useAppHistory"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import { UserModel } from "../Users/models"; +import request from "../../Utils/request/request"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface resourceProps { id: string; } diff --git a/src/Components/Resource/models.ts b/src/components/Resource/models.ts similarity index 100% rename from src/Components/Resource/models.ts rename to src/components/Resource/models.ts diff --git a/src/Components/Scribe/Scribe.tsx b/src/components/Scribe/Scribe.tsx similarity index 99% rename from src/Components/Scribe/Scribe.tsx rename to src/components/Scribe/Scribe.tsx index 384bf519a04..6d9bbe7c812 100644 --- a/src/Components/Scribe/Scribe.tsx +++ b/src/components/Scribe/Scribe.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef } from "react"; import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CareIcon from "../../CAREUI/icons/CareIcon"; import routes from "../../Redux/api"; import * as Notify from "../../Utils/Notifications"; diff --git a/src/Components/Scribe/formDetails.ts b/src/components/Scribe/formDetails.ts similarity index 99% rename from src/Components/Scribe/formDetails.ts rename to src/components/Scribe/formDetails.ts index c889dcf2558..ca56ff1b176 100644 --- a/src/Components/Scribe/formDetails.ts +++ b/src/components/Scribe/formDetails.ts @@ -4,8 +4,8 @@ import { REVIEW_AT_CHOICES, RHYTHM_CHOICES, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; -import { loadInvestigations } from "../Common/prescription-builder/InvestigationBuilder"; +} from "@/common/constants"; +import { loadInvestigations } from "@/components/Common/prescription-builder/InvestigationBuilder"; import { SYMPTOM_CHOICES } from "../Symptoms/types"; import { Field, ScribeForm } from "./Scribe"; diff --git a/src/Components/Shifting/BadgesList.tsx b/src/components/Shifting/BadgesList.tsx similarity index 97% rename from src/Components/Shifting/BadgesList.tsx rename to src/components/Shifting/BadgesList.tsx index 1615a7ece05..a06788781c6 100644 --- a/src/Components/Shifting/BadgesList.tsx +++ b/src/components/Shifting/BadgesList.tsx @@ -1,4 +1,4 @@ -import { SHIFTING_FILTER_ORDER } from "../../Common/constants"; +import { SHIFTING_FILTER_ORDER } from "@/common/constants"; import { useFacilityQuery } from "../Resource/BadgesList"; import { useTranslation } from "react-i18next"; import useQuery from "../../Utils/request/useQuery"; diff --git a/src/Components/Shifting/BoardView.tsx b/src/components/Shifting/BoardView.tsx similarity index 96% rename from src/Components/Shifting/BoardView.tsx rename to src/components/Shifting/BoardView.tsx index c071cc4d934..d05fcab2a9e 100644 --- a/src/Components/Shifting/BoardView.tsx +++ b/src/components/Shifting/BoardView.tsx @@ -1,32 +1,32 @@ import { SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, -} from "../../Common/constants"; +} from "@/common/constants"; import BadgesList from "./BadgesList"; -import { ExportButton } from "../Common/Export"; +import { ExportButton } from "@/components/Common/Export"; import ListFilter from "./ListFilter"; import SearchInput from "../Form/SearchInput"; import { formatFilter } from "./Commons"; import { Link, navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; +import useFilters from "@/common/hooks/useFilters"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import Tabs from "../Common/components/Tabs"; +import Tabs from "@/components/Common/components/Tabs"; import careConfig from "@careConfig"; import KanbanBoard from "../Kanban/Board"; import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import dayjs from "dayjs"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { ShiftingModel } from "../Facility/models"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; -import PageTitle from "@/Components/Common/PageTitle"; +import PageTitle from "@/components/Common/PageTitle"; export default function BoardView() { const { qParams, updateQuery, FilterBadges, advancedFilter } = useFilters({ diff --git a/src/Components/Shifting/CommentsSection.tsx b/src/components/Shifting/CommentsSection.tsx similarity index 94% rename from src/Components/Shifting/CommentsSection.tsx rename to src/components/Shifting/CommentsSection.tsx index 1a83f91d3f4..5d6aefb98fb 100644 --- a/src/Components/Shifting/CommentsSection.tsx +++ b/src/components/Shifting/CommentsSection.tsx @@ -1,9 +1,9 @@ import { useState } from "react"; -import CircularProgress from "../Common/components/CircularProgress"; -import * as Notification from "../../Utils/Notifications.js"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import * as Notification from "../../Utils/Notifications"; import { formatDateTime, formatName } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import routes from "../../Redux/api"; import { IComment } from "../Resource/models"; import PaginatedList from "../../CAREUI/misc/PaginatedList"; diff --git a/src/Components/Shifting/Commons.tsx b/src/components/Shifting/Commons.tsx similarity index 100% rename from src/Components/Shifting/Commons.tsx rename to src/components/Shifting/Commons.tsx diff --git a/src/Components/Shifting/ListFilter.tsx b/src/components/Shifting/ListFilter.tsx similarity index 96% rename from src/Components/Shifting/ListFilter.tsx rename to src/components/Shifting/ListFilter.tsx index 17692ac8f35..8d447acddca 100644 --- a/src/Components/Shifting/ListFilter.tsx +++ b/src/components/Shifting/ListFilter.tsx @@ -1,16 +1,16 @@ import { BREATHLESSNESS_LEVEL, SHIFTING_FILTER_ORDER, -} from "../../Common/constants"; -import { DateRange } from "../Common/DateRangeInputV2"; +} from "@/common/constants"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; import { SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, -} from "../../Common/constants"; +} from "@/common/constants"; -import CircularProgress from "../Common/components/CircularProgress"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { FieldLabel } from "../Form/FormFields/FormField"; import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; @@ -18,9 +18,9 @@ import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import useMergeState from "../../Common/hooks/useMergeState"; +import useMergeState from "@/common/hooks/useMergeState"; import { useTranslation } from "react-i18next"; -import UserAutocomplete from "../Common/UserAutocompleteFormField"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; import { dateQueryString, parsePhoneNumber } from "../../Utils/utils"; import dayjs from "dayjs"; import useQuery from "../../Utils/request/useQuery"; diff --git a/src/Components/Shifting/ListView.tsx b/src/components/Shifting/ListView.tsx similarity index 96% rename from src/Components/Shifting/ListView.tsx rename to src/components/Shifting/ListView.tsx index 1c1d63991f6..e74f80107b0 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/components/Shifting/ListView.tsx @@ -1,25 +1,25 @@ import { useState } from "react"; import BadgesList from "./BadgesList"; -import ButtonV2 from "../Common/components/ButtonV2"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { ExportButton } from "../Common/Export"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import { ExportButton } from "@/components/Common/Export"; import ListFilter from "./ListFilter"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import SearchInput from "../Form/SearchInput"; import { formatDateTime } from "../../Utils/utils"; import { formatFilter } from "./Commons"; import { navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; +import useFilters from "@/common/hooks/useFilters"; import { useTranslation } from "react-i18next"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import CareIcon from "../../CAREUI/icons/CareIcon"; import dayjs from "../../Utils/dayjs"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; import useQuery from "../../Utils/request/useQuery"; import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; import { IShift } from "./models"; export default function ListView() { diff --git a/src/Components/Shifting/ShiftDetails.tsx b/src/components/Shifting/ShiftDetails.tsx similarity index 97% rename from src/Components/Shifting/ShiftDetails.tsx rename to src/components/Shifting/ShiftDetails.tsx index cc39e048e89..6698b37beb9 100644 --- a/src/Components/Shifting/ShiftDetails.tsx +++ b/src/components/Shifting/ShiftDetails.tsx @@ -1,17 +1,17 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { GENDER_TYPES, SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, -} from "../../Common/constants"; +} from "@/common/constants"; import { Link, navigate } from "raviger"; import { useState } from "react"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import CommentSection from "./CommentsSection"; -import ConfirmDialog from "../Common/ConfirmDialog.js"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { CopyToClipboard } from "react-copy-to-clipboard"; -import Page from "../Common/components/Page"; +import Page from "@/components/Common/components/Page"; import QRCode from "qrcode.react"; import RecordMeta from "../../CAREUI/display/RecordMeta"; import { @@ -21,15 +21,15 @@ import { } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; -import { ConsultationModel } from "../Facility/models.js"; -import CareIcon from "../../CAREUI/icons/CareIcon.js"; -import { PatientModel } from "../Patient/models.js"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import request from "../../Utils/request/request"; +import { ConsultationModel } from "../Facility/models"; +import CareIcon from "../../CAREUI/icons/CareIcon"; +import { PatientModel } from "../Patient/models"; import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function ShiftDetails(props: { id: string }) { const [isPrintMode, setIsPrintMode] = useState(false); const [isCopied, setIsCopied] = useState(false); diff --git a/src/Components/Shifting/ShiftDetailsUpdate.tsx b/src/components/Shifting/ShiftDetailsUpdate.tsx similarity index 93% rename from src/Components/Shifting/ShiftDetailsUpdate.tsx rename to src/components/Shifting/ShiftDetailsUpdate.tsx index 64a7d1af110..4f30e3b345d 100644 --- a/src/Components/Shifting/ShiftDetailsUpdate.tsx +++ b/src/components/Shifting/ShiftDetailsUpdate.tsx @@ -1,4 +1,4 @@ -import * as Notification from "../../Utils/Notifications.js"; +import * as Notification from "../../Utils/Notifications"; import { BREATHLESSNESS_LEVEL, @@ -9,38 +9,38 @@ import { SHIFTING_CHOICES_WARTIME, SHIFTING_VEHICLE_CHOICES, USER_TYPES, -} from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +} from "@/common/constants"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { navigate, useQueryParams } from "raviger"; import { useReducer, useState } from "react"; -import { ConsultationModel } from "../Facility/models.js"; -import DischargeModal from "../Facility/DischargeModal.js"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FieldChangeEvent } from "../Form/FormFields/Utils.js"; +import { ConsultationModel } from "../Facility/models"; +import DischargeModal from "../Facility/DischargeModal"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { FieldLabel } from "../Form/FormFields/FormField"; import PatientCategorySelect from "../Patient/PatientCategorySelect"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField.js"; +import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -import { parsePhoneNumber } from "../../Utils/utils.js"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +import { parsePhoneNumber } from "../../Utils/utils"; +import useAppHistory from "@/common/hooks/useAppHistory"; import { useTranslation } from "react-i18next"; -import CircularProgress from "../Common/components/CircularProgress.js"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import Card from "../../CAREUI/display/Card"; -import RadioFormField from "../Form/FormFields/RadioFormField.js"; -import Page from "../Common/components/Page.js"; -import { LinkedFacilityUsers } from "../Common/UserAutocompleteFormField.js"; -import { UserBareMinimum } from "../Users/models.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import { IShift } from "./models.js"; -import request from "../../Utils/request/request.js"; -import { PatientModel } from "../Patient/models.js"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; +import RadioFormField from "../Form/FormFields/RadioFormField"; +import Page from "@/components/Common/components/Page"; +import { LinkedFacilityUsers } from "@/components/Common/UserAutocompleteFormField"; +import { UserBareMinimum } from "../Users/models"; +import useQuery from "../../Utils/request/useQuery"; +import routes from "../../Redux/api"; +import { IShift } from "./models"; +import request from "../../Utils/request/request"; +import { PatientModel } from "../Patient/models"; +import useAuthUser from "@/common/hooks/useAuthUser"; import careConfig from "@careConfig"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface patientShiftProps { id: string; } diff --git a/src/Components/Shifting/models.ts b/src/components/Shifting/models.ts similarity index 100% rename from src/Components/Shifting/models.ts rename to src/components/Shifting/models.ts diff --git a/src/Components/Symptoms/SymptomsBuilder.tsx b/src/components/Symptoms/SymptomsBuilder.tsx similarity index 99% rename from src/Components/Symptoms/SymptomsBuilder.tsx rename to src/components/Symptoms/SymptomsBuilder.tsx index adc890775aa..1be74797278 100644 --- a/src/Components/Symptoms/SymptomsBuilder.tsx +++ b/src/components/Symptoms/SymptomsBuilder.tsx @@ -7,12 +7,12 @@ import { } from "./types"; import AutocompleteMultiSelectFormField from "../Form/FormFields/AutocompleteMultiselect"; import DateFormField from "../Form/FormFields/DateFormField"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import { classNames, dateQueryString } from "../../Utils/utils"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import useQuery from "../../Utils/request/useQuery"; import SymptomsApi from "./api"; import request from "../../Utils/request/request"; diff --git a/src/Components/Symptoms/SymptomsCard.tsx b/src/components/Symptoms/SymptomsCard.tsx similarity index 98% rename from src/Components/Symptoms/SymptomsCard.tsx rename to src/components/Symptoms/SymptomsCard.tsx index 04c33d4440c..bbce57dfbbf 100644 --- a/src/Components/Symptoms/SymptomsCard.tsx +++ b/src/components/Symptoms/SymptomsCard.tsx @@ -1,5 +1,5 @@ import RecordMeta from "../../CAREUI/display/RecordMeta"; -import useSlug from "../../Common/hooks/useSlug"; +import useSlug from "@/common/hooks/useSlug"; import useQuery from "../../Utils/request/useQuery"; import { SymptomText } from "./SymptomsBuilder"; import SymptomsApi from "./api"; diff --git a/src/Components/Symptoms/api.ts b/src/components/Symptoms/api.ts similarity index 100% rename from src/Components/Symptoms/api.ts rename to src/components/Symptoms/api.ts diff --git a/src/Components/Symptoms/types.ts b/src/components/Symptoms/types.ts similarity index 100% rename from src/Components/Symptoms/types.ts rename to src/components/Symptoms/types.ts diff --git a/src/Components/Symptoms/utils.ts b/src/components/Symptoms/utils.ts similarity index 100% rename from src/Components/Symptoms/utils.ts rename to src/components/Symptoms/utils.ts diff --git a/src/Components/TeleIcu/Icons/DoctorIcon.tsx b/src/components/TeleIcu/Icons/DoctorIcon.tsx similarity index 100% rename from src/Components/TeleIcu/Icons/DoctorIcon.tsx rename to src/components/TeleIcu/Icons/DoctorIcon.tsx diff --git a/src/Components/TeleIcu/Icons/PatientIcon.tsx b/src/components/TeleIcu/Icons/PatientIcon.tsx similarity index 100% rename from src/Components/TeleIcu/Icons/PatientIcon.tsx rename to src/components/TeleIcu/Icons/PatientIcon.tsx diff --git a/src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx b/src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx similarity index 94% rename from src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx rename to src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx index 56c046be4f8..d31c281fb4e 100644 --- a/src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx +++ b/src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { previousFacilityName: string; diff --git a/src/Components/Users/LinkFacilityDialog.tsx b/src/components/Users/LinkFacilityDialog.tsx similarity index 89% rename from src/Components/Users/LinkFacilityDialog.tsx rename to src/components/Users/LinkFacilityDialog.tsx index 6d33627ba89..73cce761e12 100644 --- a/src/Components/Users/LinkFacilityDialog.tsx +++ b/src/components/Users/LinkFacilityDialog.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FacilityModel } from "../Facility/models"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface Props { username: string; diff --git a/src/Components/Users/ManageUsers.tsx b/src/components/Users/ManageUsers.tsx similarity index 97% rename from src/Components/Users/ManageUsers.tsx rename to src/components/Users/ManageUsers.tsx index 801ffae03af..7dc3eb8b5fe 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/components/Users/ManageUsers.tsx @@ -6,29 +6,29 @@ import CountBlock from "../../CAREUI/display/Count"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; import SlideOverCustom from "../../CAREUI/interactive/SlideOver"; -import { USER_TYPES } from "../../Common/constants"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; -import useFilters from "../../Common/hooks/useFilters"; -import useWindowDimensions from "../../Common/hooks/useWindowDimensions"; -import routes from "../../Redux/api.js"; -import * as Notification from "../../Utils/Notifications.js"; -import request from "../../Utils/request/request.js"; -import useQuery from "../../Utils/request/useQuery.js"; +import { USER_TYPES } from "@/common/constants"; +import useAuthUser from "@/common/hooks/useAuthUser"; +import useFilters from "@/common/hooks/useFilters"; +import useWindowDimensions from "@/common/hooks/useWindowDimensions"; +import routes from "../../Redux/api"; +import * as Notification from "../../Utils/Notifications"; +import request from "../../Utils/request/request"; +import useQuery from "../../Utils/request/useQuery"; import { classNames, formatName, isUserOnline, relativeTime, } from "../../Utils/utils"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import Pagination from "../Common/Pagination"; -import UserDetails from "../Common/UserDetails"; -import UserDetailComponent from "../Common/UserDetailsComponet.js"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; -import CircularProgress from "../Common/components/CircularProgress.js"; -import Page from "../Common/components/Page.js"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import Pagination from "@/components/Common/Pagination"; +import UserDetails from "@/components/Common/UserDetails"; +import UserDetailComponent from "@/components/Common/UserDetailsComponet"; +import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; +import CircularProgress from "@/components/Common/components/CircularProgress"; +import Page from "@/components/Common/components/Page"; import { FacilityModel } from "../Facility/models"; -import TextFormField from "../Form/FormFields/TextFormField.js"; +import TextFormField from "../Form/FormFields/TextFormField"; import SearchInput from "../Form/SearchInput"; import ConfirmHomeFacilityUpdateDialog from "./ConfirmHomeFacilityUpdateDialog"; import SkillsSlideOver from "./SkillsSlideOver"; @@ -37,7 +37,7 @@ import UserDeleteDialog from "./UserDeleteDialog"; import UserFilter from "./UserFilter"; import { showUserDelete } from "../../Utils/permissions"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; export default function ManageUsers() { const { t } = useTranslation(); const { width } = useWindowDimensions(); diff --git a/src/Components/Users/ProfileComponents.tsx b/src/components/Users/ProfileComponents.tsx similarity index 100% rename from src/Components/Users/ProfileComponents.tsx rename to src/components/Users/ProfileComponents.tsx diff --git a/src/Components/Users/SkillsSlideOver.tsx b/src/components/Users/SkillsSlideOver.tsx similarity index 92% rename from src/Components/Users/SkillsSlideOver.tsx rename to src/components/Users/SkillsSlideOver.tsx index 1be0e891312..40f9a29e905 100644 --- a/src/Components/Users/SkillsSlideOver.tsx +++ b/src/components/Users/SkillsSlideOver.tsx @@ -1,15 +1,15 @@ import { useCallback, useState } from "react"; import SlideOverCustom from "../../CAREUI/interactive/SlideOver"; -import { SkillModel, SkillObjectModel } from "../Users/models"; -import { SkillSelect } from "../Common/SkillSelect"; +import { SkillModel, SkillObjectModel } from "./models"; +import { SkillSelect } from "@/components/Common/SkillSelect"; import UnlinkSkillDialog from "./UnlinkSkillDialog"; -import * as Notification from "../../Utils/Notifications.js"; -import ButtonV2 from "../Common/components/ButtonV2"; +import * as Notification from "../../Utils/Notifications"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import AuthorizeFor from "../../Utils/AuthorizeFor"; -import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized"; +import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; import { AddSkillsPlaceholder, SkillsArray } from "./SkillsSlideOverComponents"; import { useTranslation } from "react-i18next"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import useQuery from "../../Utils/request/useQuery"; import request from "../../Utils/request/request"; import routes from "../../Redux/api"; diff --git a/src/Components/Users/SkillsSlideOverComponents.tsx b/src/components/Users/SkillsSlideOverComponents.tsx similarity index 96% rename from src/Components/Users/SkillsSlideOverComponents.tsx rename to src/components/Users/SkillsSlideOverComponents.tsx index 6b16a26196a..0593718588e 100644 --- a/src/Components/Users/SkillsSlideOverComponents.tsx +++ b/src/components/Users/SkillsSlideOverComponents.tsx @@ -1,7 +1,7 @@ import { useTranslation } from "react-i18next"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { classNames } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; +import ButtonV2 from "@/components/Common/components/ButtonV2"; import { SkillModel } from "./models"; import { Fragment } from "react"; diff --git a/src/Components/Users/UnlinkFacilityDialog.tsx b/src/components/Users/UnlinkFacilityDialog.tsx similarity index 95% rename from src/Components/Users/UnlinkFacilityDialog.tsx rename to src/components/Users/UnlinkFacilityDialog.tsx index 0af300ed942..d496870e567 100644 --- a/src/Components/Users/UnlinkFacilityDialog.tsx +++ b/src/components/Users/UnlinkFacilityDialog.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { facilityName: string; diff --git a/src/Components/Users/UnlinkSkillDialog.tsx b/src/components/Users/UnlinkSkillDialog.tsx similarity index 93% rename from src/Components/Users/UnlinkSkillDialog.tsx rename to src/components/Users/UnlinkSkillDialog.tsx index fcae6de22a3..f93e3d45045 100644 --- a/src/Components/Users/UnlinkSkillDialog.tsx +++ b/src/components/Users/UnlinkSkillDialog.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface Props { skillName: string; diff --git a/src/Components/Users/UserAdd.tsx b/src/components/Users/UserAdd.tsx similarity index 98% rename from src/Components/Users/UserAdd.tsx rename to src/components/Users/UserAdd.tsx index 6a87e64425c..3c59d9eeab2 100644 --- a/src/Components/Users/UserAdd.tsx +++ b/src/components/Users/UserAdd.tsx @@ -4,16 +4,16 @@ import { GENDER_TYPES, USER_TYPES, USER_TYPE_OPTIONS, -} from "../../Common/constants"; -import { useAbortableEffect } from "../../Common/utils"; +} from "@/common/constants"; +import { useAbortableEffect } from "@/common/utils"; import { validateEmailAddress, validateName, validatePassword, validateUsername, -} from "../../Common/validation"; -import * as Notification from "../../Utils/Notifications.js"; -import { FacilitySelect } from "../Common/FacilitySelect"; +} from "@/common/validation"; +import * as Notification from "../../Utils/Notifications"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FacilityModel } from "../Facility/models"; import { classNames, @@ -21,20 +21,20 @@ import { parsePhoneNumber, scrollTo, } from "../../Utils/utils"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import TextFormField from "../Form/FormFields/TextFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import DateFormField from "../Form/FormFields/DateFormField"; import { FieldLabel } from "../Form/FormFields/FormField"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import Page from "../Common/components/Page"; +import useAppHistory from "@/common/hooks/useAppHistory"; +import Page from "@/components/Common/components/Page"; import Card from "../../CAREUI/display/Card"; -import CircularProgress from "../Common/components/CircularProgress"; +import CircularProgress from "@/components/Common/components/CircularProgress"; import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; import dayjs from "../../Utils/dayjs"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import { PhoneNumberValidator } from "../Form/FieldValidators"; import routes from "../../Redux/api"; import request from "../../Utils/request/request"; @@ -43,7 +43,7 @@ import CareIcon from "../../CAREUI/icons/CareIcon"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { useTranslation } from "react-i18next"; -import Loading from "@/Components/Common/Loading"; +import Loading from "@/components/Common/Loading"; interface UserProps { userId?: number; } diff --git a/src/Components/Users/UserDeleteDialog.tsx b/src/components/Users/UserDeleteDialog.tsx similarity index 89% rename from src/Components/Users/UserDeleteDialog.tsx rename to src/components/Users/UserDeleteDialog.tsx index 6d8b71c26b7..665b2ef0b4a 100644 --- a/src/Components/Users/UserDeleteDialog.tsx +++ b/src/components/Users/UserDeleteDialog.tsx @@ -1,4 +1,4 @@ -import ConfirmDialog from "../Common/ConfirmDialog"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { name: string; diff --git a/src/Components/Users/UserFilter.tsx b/src/components/Users/UserFilter.tsx similarity index 94% rename from src/Components/Users/UserFilter.tsx rename to src/components/Users/UserFilter.tsx index ff2a81723cd..b6a0cae6bf9 100644 --- a/src/Components/Users/UserFilter.tsx +++ b/src/components/Users/UserFilter.tsx @@ -5,15 +5,15 @@ import { FieldLabel } from "../Form/FormFields/FormField"; import { USER_LAST_ACTIVE_OPTIONS, USER_TYPE_OPTIONS, -} from "../../Common/constants"; -import useMergeState from "../../Common/hooks/useMergeState"; +} from "@/common/constants"; +import useMergeState from "@/common/hooks/useMergeState"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import DistrictAutocompleteFormField from "../Common/DistrictAutocompleteFormField"; -import StateAutocompleteFormField from "../Common/StateAutocompleteFormField"; +import DistrictAutocompleteFormField from "@/components/Common/DistrictAutocompleteFormField"; +import StateAutocompleteFormField from "@/components/Common/StateAutocompleteFormField"; import { useTranslation } from "react-i18next"; import * as Notify from "../../Utils/Notifications"; -import { FacilitySelect } from "../Common/FacilitySelect"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { FacilityModel } from "../Facility/models"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; diff --git a/src/Components/Users/UserProfile.tsx b/src/components/Users/UserProfile.tsx similarity index 97% rename from src/Components/Users/UserProfile.tsx rename to src/components/Users/UserProfile.tsx index 23511d31cae..92d7f34aaa6 100644 --- a/src/Components/Users/UserProfile.tsx +++ b/src/components/Users/UserProfile.tsx @@ -1,10 +1,10 @@ import { useState, useReducer, FormEvent } from "react"; -import { GENDER_TYPES, LocalStorageKeys } from "../../Common/constants"; -import { validateEmailAddress } from "../../Common/validation"; -import * as Notification from "../../Utils/Notifications.js"; -import LanguageSelector from "../../Components/Common/LanguageSelector"; +import { GENDER_TYPES, LocalStorageKeys } from "@/common/constants"; +import { validateEmailAddress } from "@/common/validation"; +import * as Notification from "../../Utils/Notifications"; +import LanguageSelector from "@/components/Common/LanguageSelector"; import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; +import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; import { classNames, dateQueryString, @@ -18,10 +18,10 @@ import CareIcon from "../../CAREUI/icons/CareIcon"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { GenderType, SkillModel, UpdatePasswordForm } from "../Users/models"; -import UpdatableApp, { checkForUpdate } from "../Common/UpdatableApp"; +import { GenderType, SkillModel, UpdatePasswordForm } from "./models"; +import UpdatableApp, { checkForUpdate } from "@/components/Common/UpdatableApp"; import dayjs from "../../Utils/dayjs"; -import useAuthUser, { useAuthContext } from "../../Common/hooks/useAuthUser"; +import useAuthUser, { useAuthContext } from "@/common/hooks/useAuthUser"; import { PhoneNumberValidator } from "../Form/FieldValidators"; import useQuery from "../../Utils/request/useQuery"; import routes from "../../Redux/api"; @@ -29,10 +29,10 @@ import request from "../../Utils/request/request"; import DateFormField from "../Form/FormFields/DateFormField"; import { validateRule } from "./UserAdd"; import { useTranslation } from "react-i18next"; -import AvatarEditable from "@/Components/Common/AvatarEditable"; -import Page from "@/Components/Common/components/Page"; -import Loading from "@/Components/Common/Loading"; -import AvatarEditModal from "@/Components/Common/AvatarEditModal"; +import AvatarEditable from "@/components/Common/AvatarEditable"; +import Page from "@/components/Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import AvatarEditModal from "@/components/Common/AvatarEditModal"; import uploadFile from "@/Utils/request/uploadFile"; import careConfig from "@careConfig"; diff --git a/src/Components/Users/models.tsx b/src/components/Users/models.tsx similarity index 97% rename from src/Components/Users/models.tsx rename to src/components/Users/models.tsx index cb41779c7ed..0b30a5ed6df 100644 --- a/src/Components/Users/models.tsx +++ b/src/components/Users/models.tsx @@ -1,4 +1,4 @@ -import { GENDER_TYPES, UserRole } from "../../Common/constants"; +import { GENDER_TYPES, UserRole } from "@/common/constants"; import { FeatureFlag } from "../../Utils/featureFlags"; import { DistrictModel, LocalBodyModel, StateModel } from "../Facility/models"; diff --git a/src/Components/VitalsMonitor/HL7DeviceClient.ts b/src/components/VitalsMonitor/HL7DeviceClient.ts similarity index 100% rename from src/Components/VitalsMonitor/HL7DeviceClient.ts rename to src/components/VitalsMonitor/HL7DeviceClient.ts diff --git a/src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx b/src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx similarity index 99% rename from src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx rename to src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx index 5c8d3e521f5..3acf8f5d81d 100644 --- a/src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx +++ b/src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx @@ -5,7 +5,7 @@ import WaveformLabels from "./WaveformLabels"; import { classNames } from "../../Utils/utils"; import { IVitalsComponentProps, VitalsValueBase } from "./types"; import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import useAuthUser from "@/common/hooks/useAuthUser"; import dayjs from "dayjs"; import VitalsMonitorHeader from "./VitalsMonitorHeader"; import VitalsMonitorFooter from "./VitalsMonitorFooter"; diff --git a/src/Components/VitalsMonitor/HL7VitalsRenderer.ts b/src/components/VitalsMonitor/HL7VitalsRenderer.ts similarity index 100% rename from src/Components/VitalsMonitor/HL7VitalsRenderer.ts rename to src/components/VitalsMonitor/HL7VitalsRenderer.ts diff --git a/src/Components/VitalsMonitor/VentilatorDeviceClient.ts b/src/components/VitalsMonitor/VentilatorDeviceClient.ts similarity index 100% rename from src/Components/VitalsMonitor/VentilatorDeviceClient.ts rename to src/components/VitalsMonitor/VentilatorDeviceClient.ts diff --git a/src/Components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx b/src/components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx similarity index 100% rename from src/Components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx rename to src/components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx diff --git a/src/Components/VitalsMonitor/VentilatorWaveformsRenderer.ts b/src/components/VitalsMonitor/VentilatorWaveformsRenderer.ts similarity index 100% rename from src/Components/VitalsMonitor/VentilatorWaveformsRenderer.ts rename to src/components/VitalsMonitor/VentilatorWaveformsRenderer.ts diff --git a/src/Components/VitalsMonitor/VitalsMonitorFooter.tsx b/src/components/VitalsMonitor/VitalsMonitorFooter.tsx similarity index 89% rename from src/Components/VitalsMonitor/VitalsMonitorFooter.tsx rename to src/components/VitalsMonitor/VitalsMonitorFooter.tsx index 1a45b2cd000..29bfe7999d5 100644 --- a/src/Components/VitalsMonitor/VitalsMonitorFooter.tsx +++ b/src/components/VitalsMonitor/VitalsMonitorFooter.tsx @@ -1,5 +1,5 @@ import { AssetData } from "../Assets/AssetTypes"; -import AssetInfoPopover from "../Common/AssetInfoPopover"; +import AssetInfoPopover from "@/components/Common/AssetInfoPopover"; interface IVitalsMonitorFooterProps { asset?: AssetData; diff --git a/src/Components/VitalsMonitor/VitalsMonitorHeader.tsx b/src/components/VitalsMonitor/VitalsMonitorHeader.tsx similarity index 97% rename from src/Components/VitalsMonitor/VitalsMonitorHeader.tsx rename to src/components/VitalsMonitor/VitalsMonitorHeader.tsx index 7f839da04d7..4e6e3172036 100644 --- a/src/Components/VitalsMonitor/VitalsMonitorHeader.tsx +++ b/src/components/VitalsMonitor/VitalsMonitorHeader.tsx @@ -1,7 +1,7 @@ import { PatientAssetBed } from "../Assets/AssetTypes"; import { Link } from "raviger"; import CareIcon from "../../CAREUI/icons/CareIcon"; -import { GENDER_TYPES } from "../../Common/constants"; +import { GENDER_TYPES } from "@/common/constants"; import { formatPatientAge } from "../../Utils/utils"; interface VitalsMonitorHeaderProps { diff --git a/src/Components/VitalsMonitor/WaveformLabels.tsx b/src/components/VitalsMonitor/WaveformLabels.tsx similarity index 100% rename from src/Components/VitalsMonitor/WaveformLabels.tsx rename to src/components/VitalsMonitor/WaveformLabels.tsx diff --git a/src/Components/VitalsMonitor/types.ts b/src/components/VitalsMonitor/types.ts similarity index 100% rename from src/Components/VitalsMonitor/types.ts rename to src/components/VitalsMonitor/types.ts diff --git a/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts b/src/components/VitalsMonitor/useHL7VitalsMonitor.ts similarity index 98% rename from src/Components/VitalsMonitor/useHL7VitalsMonitor.ts rename to src/components/VitalsMonitor/useHL7VitalsMonitor.ts index 839605d1cc3..20f9b9a9a59 100644 --- a/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts +++ b/src/components/VitalsMonitor/useHL7VitalsMonitor.ts @@ -4,7 +4,7 @@ import HL7DeviceClient, { HL7VitalsWaveformData, } from "./HL7DeviceClient"; import HL7VitalsRenderer from "./HL7VitalsRenderer"; -import useCanvas from "../../Common/hooks/useCanvas"; +import useCanvas from "@/common/hooks/useCanvas"; import { ChannelOptions, IVitalsComponentProps, diff --git a/src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts b/src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts similarity index 98% rename from src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts rename to src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts index 737f06d07fe..6f24ae50bf7 100644 --- a/src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts +++ b/src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts @@ -1,5 +1,5 @@ import { useCallback, useRef, useState } from "react"; -import useCanvas from "../../Common/hooks/useCanvas"; +import useCanvas from "@/common/hooks/useCanvas"; import { ChannelOptions, IVitalsComponentProps, diff --git a/src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts b/src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts similarity index 85% rename from src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts rename to src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts index 90d363e8306..6de68c6abbc 100644 --- a/src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts +++ b/src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts @@ -1,4 +1,4 @@ -import useBreakpoints from "../../Common/hooks/useBreakpoints"; +import useBreakpoints from "@/common/hooks/useBreakpoints"; import { getVitalsCanvasSizeAndDuration } from "./utils"; export default function useVitalsAspectRatioConfig( diff --git a/src/Components/VitalsMonitor/utils.ts b/src/components/VitalsMonitor/utils.ts similarity index 100% rename from src/Components/VitalsMonitor/utils.ts rename to src/components/VitalsMonitor/utils.ts diff --git a/src/Components/ui/alert.tsx b/src/components/ui/alert.tsx similarity index 100% rename from src/Components/ui/alert.tsx rename to src/components/ui/alert.tsx diff --git a/src/Components/ui/button.tsx b/src/components/ui/button.tsx similarity index 100% rename from src/Components/ui/button.tsx rename to src/components/ui/button.tsx diff --git a/src/Components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx similarity index 100% rename from src/Components/ui/dropdown-menu.tsx rename to src/components/ui/dropdown-menu.tsx diff --git a/src/Components/ui/toast.tsx b/src/components/ui/toast.tsx similarity index 100% rename from src/Components/ui/toast.tsx rename to src/components/ui/toast.tsx diff --git a/src/Components/ui/toaster.tsx b/src/components/ui/toaster.tsx similarity index 95% rename from src/Components/ui/toaster.tsx rename to src/components/ui/toaster.tsx index f3ec0c08f30..5887f0804da 100644 --- a/src/Components/ui/toaster.tsx +++ b/src/components/ui/toaster.tsx @@ -6,7 +6,7 @@ import { ToastProvider, ToastTitle, ToastViewport, -} from "@/Components/ui/toast"; +} from "@/components/ui/toast"; export function Toaster() { const { toasts } = useToast(); diff --git a/src/Components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx similarity index 100% rename from src/Components/ui/tooltip.tsx rename to src/components/ui/tooltip.tsx diff --git a/src/hooks/use-toast.ts b/src/hooks/use-toast.ts index 2d8ff897040..01f0976bade 100644 --- a/src/hooks/use-toast.ts +++ b/src/hooks/use-toast.ts @@ -1,6 +1,6 @@ import * as React from "react"; -import type { ToastActionElement, ToastProps } from "@/Components/ui/toast"; +import type { ToastActionElement, ToastProps } from "@/components/ui/toast"; const TOAST_LIMIT = 1; const TOAST_REMOVE_DELAY = 1000000; diff --git a/src/pluginTypes.ts b/src/pluginTypes.ts index 26a07e4f141..06f75eacb6b 100644 --- a/src/pluginTypes.ts +++ b/src/pluginTypes.ts @@ -1,7 +1,7 @@ import { LazyExoticComponent } from "react"; -import { UserAssignedModel } from "./Components/Users/models"; +import { UserAssignedModel } from "@/components/Users/models"; import { AppRoutes } from "./Routers/AppRouter"; -import { INavItem } from "./Components/Common/Sidebar/Sidebar"; +import { INavItem } from "@/components/Common/Sidebar/Sidebar"; import { pluginMap } from "./pluginMap"; // Define the available plugins