From e3c4c40b05ca9681837401e51b816a912ad2372b Mon Sep 17 00:00:00 2001 From: khavinshankar Date: Tue, 7 Nov 2023 18:17:49 +0530 Subject: [PATCH] Refactor import paths to use absolute paths --- src/App.tsx | 11 +- src/CAREUI/display/Chip.tsx | 6 +- src/CAREUI/display/Count.tsx | 4 +- src/CAREUI/display/RecordMeta.tsx | 7 +- src/CAREUI/display/SubHeading.tsx | 5 +- src/CAREUI/display/Timeline.tsx | 9 +- src/CAREUI/icons/CareIcon.tsx | 4 +- src/CAREUI/icons/icon.js | 4 +- src/CAREUI/interactive/FiltersSlideover.tsx | 11 +- src/CAREUI/interactive/LegendInput.tsx | 5 +- src/CAREUI/interactive/ScrollOverlay.tsx | 4 +- src/CAREUI/interactive/SlideOver.tsx | 5 +- src/CAREUI/interactive/Switch.tsx | 2 +- src/CAREUI/misc/AuthorizedChild.tsx | 4 +- src/CAREUI/misc/PaginatedList.tsx | 13 +-- src/Common/constants.tsx | 12 +-- src/Common/hooks/useAppHistory.ts | 3 +- src/Common/hooks/useAuthUser.ts | 3 +- src/Common/hooks/useBreakpoints.ts | 2 +- src/Common/hooks/useExport.tsx | 3 +- src/Common/hooks/useFeedPTZ.ts | 2 +- src/Common/hooks/useFilters.tsx | 9 +- src/Common/hooks/useHLSPlayer.ts | 3 +- src/Common/hooks/useIsAuthorized.ts | 4 +- src/Common/hooks/useMSEplayer.ts | 2 +- src/Common/utils.tsx | 3 +- src/Components/ABDM/ABHAProfileModal.tsx | 16 +-- .../ABDM/ConfigureHealthFacility.tsx | 19 ++-- src/Components/ABDM/LinkABHANumberModal.tsx | 25 +++-- src/Components/ABDM/LinkCareContextModal.tsx | 19 ++-- src/Components/Assets/AssetConfigure.tsx | 12 +-- src/Components/Assets/AssetFilter.tsx | 31 +++--- src/Components/Assets/AssetImportModal.tsx | 31 +++--- src/Components/Assets/AssetManage.tsx | 52 ++++----- .../Assets/AssetServiceEditModal.tsx | 30 ++++-- .../Assets/AssetType/HL7Monitor.tsx | 31 +++--- .../Assets/AssetType/ONVIFCamera.tsx | 32 +++--- src/Components/Assets/AssetTypes.tsx | 6 +- src/Components/Assets/AssetWarrantyCard.tsx | 9 +- src/Components/Assets/AssetsList.tsx | 49 ++++----- .../Assets/configure/CameraConfigure.tsx | 17 +-- .../Assets/configure/MonitorConfigure.tsx | 19 ++-- src/Components/Auth/Login.tsx | 23 ++-- src/Components/Auth/ResetPassword.tsx | 20 ++-- src/Components/Common/AssetSelect.tsx | 5 +- src/Components/Common/BedSelect.tsx | 9 +- .../Common/BloodPressureFormField.tsx | 6 +- src/Components/Common/Breadcrumbs.tsx | 5 +- src/Components/Common/ConfirmDialog.tsx | 8 +- src/Components/Common/DateInputV2.tsx | 8 +- src/Components/Common/DateRangeInputV2.tsx | 3 +- .../Common/DiagnosisSelectFormField.tsx | 12 +-- src/Components/Common/Dialog.tsx | 3 +- .../Common/DistrictAutocompleteFormField.tsx | 13 +-- src/Components/Common/Export.tsx | 9 +- src/Components/Common/FacilitySelect.tsx | 7 +- src/Components/Common/FilePreviewDialog.tsx | 9 +- src/Components/Common/GLocationPicker.tsx | 11 +- src/Components/Common/LanguageSelector.tsx | 7 +- .../Common/LanguageSelectorLogin.tsx | 5 +- .../Common/LocalBodyAutocompleteFormField.tsx | 13 +-- src/Components/Common/LocationSelect.tsx | 7 +- .../PMJAYProcedurePackageAutocomplete.tsx | 10 +- src/Components/Common/PageTitle.tsx | 9 +- src/Components/Common/Pagination.tsx | 7 +- .../Common/PatientCategoryBadge.tsx | 4 +- src/Components/Common/QRScanner.tsx | 13 +-- .../Common/RelativeDateUserMention.tsx | 6 +- src/Components/Common/Sidebar/Sidebar.tsx | 22 ++-- src/Components/Common/Sidebar/SidebarItem.tsx | 5 +- .../Common/Sidebar/SidebarUserCard.tsx | 7 +- src/Components/Common/SkillSelect.tsx | 7 +- src/Components/Common/SortDropdown.tsx | 7 +- .../Common/StateAutocompleteFormField.tsx | 9 +- src/Components/Common/Steps.tsx | 2 +- src/Components/Common/SymptomsSelect.tsx | 10 +- .../Common/TemperatureFormField.tsx | 11 +- src/Components/Common/TopBar.tsx | 4 +- src/Components/Common/Transition.tsx | 2 +- src/Components/Common/UpdatableApp.tsx | 7 +- src/Components/Common/Uptime.tsx | 13 +-- .../Common/UserAutocompleteFormField.tsx | 16 +-- .../Common/WardAutocompleteFormField.tsx | 13 +-- .../Common/components/AccordionV2.tsx | 3 +- src/Components/Common/components/ButtonV2.tsx | 9 +- .../Common/components/ContactLink.tsx | 2 +- src/Components/Common/components/Menu.tsx | 14 +-- src/Components/Common/components/Page.tsx | 5 +- .../Common/components/SelectMenu.tsx | 5 +- src/Components/Common/components/Switch.tsx | 5 +- .../InvestigationBuilder.tsx | 12 +-- .../PrescriptionDropdown.tsx | 3 +- .../PrescriptionMultiselect.tsx | 3 +- .../prescription-builder/ProcedureBuilder.tsx | 5 +- src/Components/Common/utils/Tooltip.tsx | 3 +- .../CriticalCare__API.tsx | 2 +- src/Components/DeathReport/DeathReport.tsx | 27 ++--- src/Components/ErrorPages/404.tsx | 3 +- src/Components/ErrorPages/InvalidReset.tsx | 5 +- src/Components/ErrorPages/SessionExpired.tsx | 7 +- .../ExternalResult/ExternalResultUpload.tsx | 18 ++-- .../FacilitiesSelectDialogue.tsx | 9 +- src/Components/ExternalResult/ListFilter.tsx | 25 ++--- src/Components/ExternalResult/ResultItem.tsx | 15 +-- src/Components/ExternalResult/ResultList.tsx | 34 +++--- .../ExternalResult/ResultUpdate.tsx | 26 ++--- src/Components/Facility/AddBedForm.tsx | 25 ++--- src/Components/Facility/AddInventoryForm.tsx | 23 ++-- src/Components/Facility/AddLocationForm.tsx | 15 +-- src/Components/Facility/AssetCreate.tsx | 60 ++++++----- src/Components/Facility/BedCapacity.tsx | 25 ++--- src/Components/Facility/BedDeleteDialog.tsx | 3 +- src/Components/Facility/BedManagement.tsx | 28 ++--- src/Components/Facility/BedTypeCard.tsx | 23 ++-- .../Facility/CentralNursingStation.tsx | 46 ++++---- src/Components/Facility/ConsultationCard.tsx | 15 +-- .../Facility/ConsultationClaims.tsx | 17 +-- .../ConsultationABGTab.tsx | 5 +- .../ConsultationDialysisTab.tsx | 5 +- .../ConsultationFeedTab.tsx | 5 +- .../ConsultationFilesTab.tsx | 4 +- .../ConsultationInvestigationsTab.tsx | 15 +-- .../ConsultationMedicinesTab.tsx | 6 +- .../ConsultationNeurologicalMonitoringTab.tsx | 5 +- .../ConsultationNursingTab.tsx | 5 +- .../ConsultationNutritionTab.tsx | 5 +- .../ConsultationPressureSoreTab.tsx | 5 +- .../ConsultationSummaryTab.tsx | 5 +- .../ConsultationUpdatesTab.tsx | 31 +++--- .../ConsultationVentilatorTab.tsx | 5 +- src/Components/Facility/ConsultationForm.tsx | 100 ++++++++++-------- .../Facility/Consultations/ABGPlots.tsx | 13 +-- .../Facility/Consultations/Beds.tsx | 43 ++++---- .../DailyRounds/DefaultLogUpdateCard.tsx | 11 +- .../DailyRounds/LogUpdateCardAttribute.tsx | 4 +- .../VirtualNursingAssistantLogUpdateCard.tsx | 9 +- .../Consultations/DailyRoundsList.tsx | 17 +-- .../Facility/Consultations/DialysisPlots.tsx | 13 +-- .../Facility/Consultations/Feed.tsx | 44 ++++---- .../Facility/Consultations/FeedButton.tsx | 6 +- .../Facility/Consultations/LiveFeed.tsx | 34 +++--- .../Consultations/NeurologicalTables.tsx | 11 +- .../Facility/Consultations/NursingPlot.tsx | 14 ++- .../Facility/Consultations/NutritionPlots.tsx | 17 +-- .../Consultations/PrimaryParametersPlot.tsx | 23 ++-- .../Facility/Consultations/VentilatorPlot.tsx | 15 +-- .../components/BinaryChronologicalChart.tsx | 4 +- .../Consultations/components/LinePlot.tsx | 3 +- .../components/StackedLinePlot.tsx | 3 +- .../Facility/CoverImageEditModal.tsx | 28 ++--- src/Components/Facility/DischargeModal.tsx | 49 ++++----- .../Facility/DischargeSummaryModal.tsx | 25 ++--- src/Components/Facility/DoctorCapacity.tsx | 24 +++-- .../Facility/DoctorVideoSlideover.tsx | 12 +-- src/Components/Facility/DoctorsCountCard.tsx | 21 ++-- .../Facility/DuplicatePatientDialog.tsx | 7 +- src/Components/Facility/FacilityCard.tsx | 28 ++--- src/Components/Facility/FacilityConfigure.tsx | 21 ++-- src/Components/Facility/FacilityCreate.tsx | 80 +++++++------- .../FacilityFilter/DistrictSelect.tsx | 5 +- .../Facility/FacilityFilter/index.tsx | 19 ++-- src/Components/Facility/FacilityHome.tsx | 71 +++++++------ src/Components/Facility/FacilityUsers.tsx | 33 +++--- src/Components/Facility/HospitalList.tsx | 36 +++---- src/Components/Facility/InventoryList.tsx | 18 ++-- src/Components/Facility/InventoryLog.tsx | 20 ++-- .../InvestigationSuggestions.tsx | 13 +-- .../Investigations/InvestigationTable.tsx | 11 +- .../Investigations/Reports/ReportTable.tsx | 14 ++- .../Facility/Investigations/Reports/index.tsx | 30 +++--- .../Facility/Investigations/Reports/utils.tsx | 3 +- .../Investigations/ShowInvestigation.tsx | 16 +-- .../Facility/Investigations/Table.tsx | 7 +- .../Investigations/ViewInvestigations.tsx | 8 +- .../Facility/Investigations/index.tsx | 20 ++-- .../Investigations/investigationsTab.tsx | 16 ++- src/Components/Facility/LegacyFacilityCNS.tsx | 32 +++--- src/Components/Facility/LegacyMonitorCard.tsx | 13 +-- .../Facility/LocationManagement.tsx | 15 +-- src/Components/Facility/MinQuantityList.tsx | 15 +-- .../Facility/MinQuantityRequiredModal.tsx | 13 +-- src/Components/Facility/SetInventoryForm.tsx | 22 ++-- .../Facility/TransferPatientDialog.tsx | 25 +++-- src/Components/Facility/TreatmentSummary.tsx | 16 ++- src/Components/Facility/TriageForm.tsx | 33 +++--- src/Components/Facility/models.tsx | 13 ++- src/Components/Form/AutoCompleteAsync.tsx | 11 +- src/Components/Form/Form.tsx | 25 +++-- src/Components/Form/FormContext.ts | 5 +- .../Form/FormFields/Autocomplete.tsx | 18 ++-- .../FormFields/AutocompleteMultiselect.tsx | 20 ++-- .../Form/FormFields/CheckBoxFormField.tsx | 10 +- .../Form/FormFields/DateFormField.tsx | 14 ++- .../Form/FormFields/DateRangeFormField.tsx | 13 ++- src/Components/Form/FormFields/FormField.tsx | 6 +- src/Components/Form/FormFields/Month.tsx | 12 ++- .../FormFields/NumericWithUnitsFormField.tsx | 9 +- .../Form/FormFields/OtpFormField.tsx | 5 +- .../Form/FormFields/PhoneNumberFormField.tsx | 24 +++-- .../Form/FormFields/RadioFormField.tsx | 7 +- .../FormFields/RangeAutocompleteFormField.tsx | 9 +- .../Form/FormFields/SelectFormField.tsx | 11 +- .../Form/FormFields/TextAreaFormField.tsx | 7 +- .../Form/FormFields/TextFormField.tsx | 11 +- src/Components/Form/FormFields/Utils.ts | 7 +- src/Components/Form/MultiSelectMenuV2.tsx | 7 +- src/Components/Form/SearchInput.tsx | 9 +- src/Components/Form/SelectMenuV2.tsx | 9 +- src/Components/Form/Utils.ts | 2 +- src/Components/HCX/ClaimCreatedModal.tsx | 15 +-- src/Components/HCX/ClaimDetailCard.tsx | 4 +- src/Components/HCX/ClaimsItemsBuilder.tsx | 18 ++-- src/Components/HCX/CreateClaimCard.tsx | 31 +++--- .../HCX/InsuranceDetailsBuilder.tsx | 23 ++-- src/Components/HCX/InsurerAutocomplete.tsx | 10 +- .../HCX/PatientInsuranceDetailsEditor.tsx | 18 ++-- src/Components/HCX/PolicyEligibilityCheck.tsx | 15 +-- src/Components/HCX/models.ts | 6 +- src/Components/HCX/validators.ts | 4 +- .../Medicine/AdministerMedicine.tsx | 27 ++--- .../Medicine/CreatePrescriptionForm.tsx | 32 +++--- .../Medicine/DiscontinuePrescription.tsx | 17 +-- .../Medicine/EditPrescriptionForm.tsx | 27 ++--- .../Medicine/ManagePrescriptions.tsx | 11 +- .../MedibaseAutocompleteFormField.tsx | 15 +-- .../Medicine/MedicineAdministration.tsx | 30 +++--- .../AdministrationEventCell.tsx | 18 ++-- .../AdministrationEventSeperator.tsx | 2 +- .../AdministrationTable.tsx | 13 +-- .../AdministrationTableRow.tsx | 34 +++--- .../BulkAdminister.tsx | 13 +-- .../MedicineAdministrationSheet/index.tsx | 29 ++--- .../MedicineAdministrationSheet/utils.ts | 2 +- .../Medicine/PrescriptionBuilder.tsx | 27 +++-- .../Medicine/PrescriptionDetailCard.tsx | 13 +-- .../Medicine/PrescriptionsTable.tsx | 34 +++--- .../Medicine/PrescrpitionTimeline.tsx | 30 +++--- .../Medicine/ResponsiveMedicineTables.tsx | 5 +- src/Components/Medicine/models.ts | 2 +- src/Components/Medicine/routes.ts | 9 +- src/Components/Medicine/validators.ts | 9 +- src/Components/Notifications/NoticeBoard.tsx | 13 +-- .../Notifications/NotificationsList.tsx | 35 +++--- .../Notifications/ShowPushNotification.tsx | 7 +- .../Patient/DailyRoundListDetails.tsx | 15 +-- src/Components/Patient/DailyRounds.tsx | 47 ++++---- src/Components/Patient/FileUpload.tsx | 54 +++++----- .../Patient/LegacyPatientVitalsCard.tsx | 13 +-- src/Components/Patient/ManagePatients.tsx | 70 ++++++------ .../Patient/PatientCategorySelect.tsx | 8 +- src/Components/Patient/PatientFilter.tsx | 49 ++++----- src/Components/Patient/PatientHome.tsx | 47 ++++---- src/Components/Patient/PatientInfoCard.tsx | 49 +++++---- src/Components/Patient/PatientNotes.tsx | 27 +++-- src/Components/Patient/PatientRegister.tsx | 91 ++++++++-------- src/Components/Patient/SampleDetails.tsx | 25 +++-- src/Components/Patient/SampleFilters.tsx | 25 ++--- src/Components/Patient/SamplePreview.tsx | 15 ++- src/Components/Patient/SampleTest.tsx | 31 +++--- src/Components/Patient/SampleTestCard.tsx | 21 ++-- src/Components/Patient/SampleViewAdmin.tsx | 32 +++--- src/Components/Patient/ShiftCreate.tsx | 50 ++++----- src/Components/Patient/UpdateStatusDialog.tsx | 34 +++--- src/Components/Patient/Waveform.tsx | 3 +- src/Components/Patient/models.tsx | 7 +- src/Components/Resource/BadgesList.tsx | 6 +- src/Components/Resource/CommentSection.tsx | 21 ++-- src/Components/Resource/ListFilter.tsx | 30 +++--- src/Components/Resource/ListView.tsx | 29 ++--- src/Components/Resource/ResourceBoard.tsx | 16 +-- src/Components/Resource/ResourceBoardView.tsx | 27 ++--- src/Components/Resource/ResourceCreate.tsx | 44 ++++---- src/Components/Resource/ResourceDetails.tsx | 21 ++-- .../Resource/ResourceDetailsUpdate.tsx | 42 ++++---- src/Components/Resource/models.ts | 2 +- src/Components/Shifting/BadgesList.tsx | 8 +- src/Components/Shifting/BoardView.tsx | 39 ++++--- src/Components/Shifting/CommentsSection.tsx | 15 +-- src/Components/Shifting/ListFilter.tsx | 47 ++++---- src/Components/Shifting/ListView.tsx | 42 ++++---- src/Components/Shifting/ShiftDetails.tsx | 36 +++---- .../Shifting/ShiftDetailsUpdate.tsx | 57 +++++----- src/Components/Shifting/ShiftingBoard.tsx | 26 ++--- .../Users/ConfirmHomeFacilityUpdateDialog.tsx | 3 +- src/Components/Users/LinkFacilityDialog.tsx | 7 +- src/Components/Users/ManageUsers.tsx | 60 ++++++----- src/Components/Users/SkillsSlideOver.tsx | 30 +++--- .../Users/SkillsSlideOverComponents.tsx | 11 +- src/Components/Users/UnlinkFacilityDialog.tsx | 3 +- src/Components/Users/UnlinkSkillDialog.tsx | 3 +- src/Components/Users/UserAdd.tsx | 53 +++++----- src/Components/Users/UserDeleteDialog.tsx | 2 +- src/Components/Users/UserFilter.tsx | 23 ++-- src/Components/Users/UserProfile.tsx | 37 +++---- src/Components/Users/models.tsx | 8 +- .../VitalsMonitor/HL7DeviceClient.ts | 7 +- .../VitalsMonitor/HL7PatientVitalsMonitor.tsx | 24 +++-- .../VitalsMonitor/HL7VitalsRenderer.ts | 4 +- .../VitalsMonitor/VentilatorDeviceClient.ts | 7 +- .../VentilatorPatientVitalsMonitor.tsx | 20 ++-- .../VentilatorWaveformsRenderer.ts | 4 +- .../VitalsMonitor/WaveformLabels.tsx | 2 +- src/Components/VitalsMonitor/types.ts | 4 +- .../VitalsMonitor/useHL7VitalsMonitor.ts | 14 ++- .../useVentilatorVitalsMonitor.ts | 14 ++- .../useVitalsAspectRatioConfig.ts | 4 +- src/Components/VitalsMonitor/utils.ts | 5 +- src/Integrations/Plausible.tsx | 5 +- src/Integrations/Sentry.tsx | 3 +- src/Integrations/index.tsx | 4 +- src/Locale/en/index.js | 32 +++--- src/Locale/kn/index.js | 8 +- src/Locale/ml/index.js | 8 +- src/Locale/mr/index.js | 8 +- src/Locale/ta/index.js | 8 +- src/Providers/AppConfigProvider.tsx | 8 +- src/Providers/AuthUserProvider.tsx | 15 +-- src/Providers/index.tsx | 6 +- src/Redux/Reducer.tsx | 4 +- src/Redux/actions.tsx | 6 +- src/Redux/api.tsx | 28 ++--- src/Redux/fireRequest.tsx | 9 +- src/Routers/AppRouter.tsx | 39 ++++--- src/Routers/SessionRouter.tsx | 9 +- src/Routers/index.tsx | 4 +- src/Routers/routes/AssetRoutes.tsx | 8 +- src/Routers/routes/ExternalResultRoutes.tsx | 10 +- .../routes/FacilityInventoryRoutes.tsx | 9 +- src/Routers/routes/FacilityLocationRoutes.tsx | 10 +- src/Routers/routes/FacilityRoutes.tsx | 20 ++-- src/Routers/routes/HCXRoutes.tsx | 2 +- src/Routers/routes/PatientRoutes.tsx | 16 +-- src/Routers/routes/ResourceRoutes.tsx | 13 +-- src/Routers/routes/SampleRoutes.tsx | 10 +- src/Routers/routes/ShiftingRoutes.tsx | 13 +-- src/Routers/routes/UserRoutes.tsx | 6 +- src/Utils/AuthorizeFor.tsx | 2 +- src/Utils/AutoSave.tsx | 7 +- src/Utils/VoiceRecorder.tsx | 10 +- src/Utils/dayjs.ts | 4 +- src/Utils/request/handleResponse.ts | 5 +- src/Utils/request/request.ts | 6 +- src/Utils/request/useQuery.ts | 11 +- src/Utils/request/utils.ts | 6 +- src/Utils/transformUtils.ts | 2 +- src/Utils/useRecorder.js | 3 +- src/Utils/utils.ts | 7 +- src/i18n.ts | 13 +-- src/index.tsx | 10 +- src/service-worker.ts | 4 +- src/stories/Care UI/ButtonV2.stories.tsx | 3 +- .../Form Fields/DateFormField.stories.tsx | 3 +- .../DateRangeFormField.stories.tsx | 5 +- .../MultiSelectFormField.stories.tsx | 3 +- .../Form Fields/SelectFormField.stories.tsx | 3 +- src/stories/Care UI/Slideover.stories.tsx | 5 +- src/stories/Introduction.mdx | 17 +-- 357 files changed, 2985 insertions(+), 2626 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index f89dfd11e74..540565eace1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,14 @@ import { Suspense } from "react"; -import Routers from "./Routers"; + +import ThemedFavicon from "@/CAREUI/misc/ThemedFavicon"; +import Loading from "@/Components/Common/Loading"; +import Intergrations from "@/Integrations"; import { AppConfigProvider, AuthUserProvider, HistoryAPIProvider, -} from "./Providers"; -import ThemedFavicon from "./CAREUI/misc/ThemedFavicon"; -import Intergrations from "./Integrations"; -import Loading from "./Components/Common/Loading"; +} from "@/Providers"; +import Routers from "@/Routers"; const App = () => { return ( diff --git a/src/CAREUI/display/Chip.tsx b/src/CAREUI/display/Chip.tsx index 7bcbd6078e4..566f0f643c2 100644 --- a/src/CAREUI/display/Chip.tsx +++ b/src/CAREUI/display/Chip.tsx @@ -1,6 +1,6 @@ -import CareIcon, { IconName } from "../icons/CareIcon"; -import { ButtonVariant } from "../../Components/Common/components/ButtonV2"; -import { classNames } from "../../Utils/utils"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import { ButtonVariant } from "@/Components/Common/components/ButtonV2"; +import { classNames } from "@/Utils/utils"; interface Props { size?: "small" | "medium" | "large"; diff --git a/src/CAREUI/display/Count.tsx b/src/CAREUI/display/Count.tsx index 3b889b10e9b..55bced4a451 100644 --- a/src/CAREUI/display/Count.tsx +++ b/src/CAREUI/display/Count.tsx @@ -1,5 +1,5 @@ -import { classNames } from "../../Utils/utils"; -import CareIcon, { IconName } from "../icons/CareIcon"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import { classNames } from "@/Utils/utils"; interface Props { count: number; diff --git a/src/CAREUI/display/RecordMeta.tsx b/src/CAREUI/display/RecordMeta.tsx index 944ddf27c8f..eeb69df2a62 100644 --- a/src/CAREUI/display/RecordMeta.tsx +++ b/src/CAREUI/display/RecordMeta.tsx @@ -1,11 +1,12 @@ -import CareIcon from "../icons/CareIcon"; +import { ReactNode } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; import { formatDateTime, formatName, isUserOnline, relativeTime, -} from "../../Utils/utils"; -import { ReactNode } from "react"; +} from "@/Utils/utils"; interface Props { time?: string; diff --git a/src/CAREUI/display/SubHeading.tsx b/src/CAREUI/display/SubHeading.tsx index 75d8710fdef..90e04799d99 100644 --- a/src/CAREUI/display/SubHeading.tsx +++ b/src/CAREUI/display/SubHeading.tsx @@ -1,6 +1,7 @@ import { ReactNode } from "react"; -import CareIcon from "../icons/CareIcon"; -import RecordMeta from "./RecordMeta"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; interface Props { title: ReactNode; diff --git a/src/CAREUI/display/Timeline.tsx b/src/CAREUI/display/Timeline.tsx index 7549fbfd69f..d9eb975edbc 100644 --- a/src/CAREUI/display/Timeline.tsx +++ b/src/CAREUI/display/Timeline.tsx @@ -1,8 +1,9 @@ import { createContext, useContext } from "react"; -import { PerformedByModel } from "../../Components/HCX/misc"; -import { classNames, formatName } from "../../Utils/utils"; -import CareIcon, { IconName } from "../icons/CareIcon"; -import RecordMeta from "./RecordMeta"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import { PerformedByModel } from "@/Components/HCX/misc"; +import { classNames, formatName } from "@/Utils/utils"; export interface TimelineEvent { type: TType; diff --git a/src/CAREUI/icons/CareIcon.tsx b/src/CAREUI/icons/CareIcon.tsx index 0c70fbfe298..8dd2f7208a7 100644 --- a/src/CAREUI/icons/CareIcon.tsx +++ b/src/CAREUI/icons/CareIcon.tsx @@ -1,7 +1,7 @@ -import { transformIcons } from "./icon"; import { useEffect } from "react"; -import iconData from "./UniconPaths.json"; +import { transformIcons } from "@/CAREUI/icons/icon"; +import iconData from "@/CAREUI/icons/UniconPaths.json"; export type IconName = keyof typeof iconData; diff --git a/src/CAREUI/icons/icon.js b/src/CAREUI/icons/icon.js index 0707d350f27..fae194febeb 100644 --- a/src/CAREUI/icons/icon.js +++ b/src/CAREUI/icons/icon.js @@ -1,5 +1,5 @@ -import "./icon.css"; -import iconData from "./UniconPaths.json"; +import "@/CAREUI/icons/icon.css"; +import iconData from "@/CAREUI/icons/UniconPaths.json"; const xmlns = "http://www.w3.org/2000/svg"; diff --git a/src/CAREUI/interactive/FiltersSlideover.tsx b/src/CAREUI/interactive/FiltersSlideover.tsx index 9b2e5a29c29..0da38b00f05 100644 --- a/src/CAREUI/interactive/FiltersSlideover.tsx +++ b/src/CAREUI/interactive/FiltersSlideover.tsx @@ -1,9 +1,10 @@ -import { useTranslation } from "react-i18next"; -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"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import useFilters from "@/Common/hooks/useFilters"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; type AdvancedFilter = ReturnType["advancedFilter"]; diff --git a/src/CAREUI/interactive/LegendInput.tsx b/src/CAREUI/interactive/LegendInput.tsx index eabff046353..bc1f05f315f 100644 --- a/src/CAREUI/interactive/LegendInput.tsx +++ b/src/CAREUI/interactive/LegendInput.tsx @@ -1,7 +1,8 @@ -import CareIcon from "../icons/CareIcon"; -import { classNames } from "../../Utils/utils"; import { RefObject, useRef, useState, useEffect } from "react"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { classNames } from "@/Utils/utils"; + type InputProps = { id?: string; name: string; diff --git a/src/CAREUI/interactive/ScrollOverlay.tsx b/src/CAREUI/interactive/ScrollOverlay.tsx index c49f7223149..657ab06941a 100644 --- a/src/CAREUI/interactive/ScrollOverlay.tsx +++ b/src/CAREUI/interactive/ScrollOverlay.tsx @@ -1,5 +1,5 @@ -import useVisibility from "../../Utils/useVisibility"; -import { classNames } from "../../Utils/utils"; +import useVisibility from "@/Utils/useVisibility"; +import { classNames } from "@/Utils/utils"; interface Props { className?: string; diff --git a/src/CAREUI/interactive/SlideOver.tsx b/src/CAREUI/interactive/SlideOver.tsx index 9fae2588fca..46ea7d77a2f 100644 --- a/src/CAREUI/interactive/SlideOver.tsx +++ b/src/CAREUI/interactive/SlideOver.tsx @@ -1,7 +1,8 @@ import { Dialog, Transition } from "@headlessui/react"; import { Fragment } from "react"; -import { classNames } from "../../Utils/utils"; -import CareIcon from "../icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { classNames } from "@/Utils/utils"; export type SlideFromEdges = "left" | "top" | "right" | "bottom"; diff --git a/src/CAREUI/interactive/Switch.tsx b/src/CAREUI/interactive/Switch.tsx index 3e18795b034..bac238dcb27 100644 --- a/src/CAREUI/interactive/Switch.tsx +++ b/src/CAREUI/interactive/Switch.tsx @@ -1,4 +1,4 @@ -import { classNames } from "../../Utils/utils"; +import { classNames } from "@/Utils/utils"; interface Props { tabs: Record; diff --git a/src/CAREUI/misc/AuthorizedChild.tsx b/src/CAREUI/misc/AuthorizedChild.tsx index ce9ec69d546..ce2fef081c7 100644 --- a/src/CAREUI/misc/AuthorizedChild.tsx +++ b/src/CAREUI/misc/AuthorizedChild.tsx @@ -1,5 +1,5 @@ -import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized"; -import { AuthorizedForCB } from "../../Utils/AuthorizeFor"; +import { useIsAuthorized } from "@/Common/hooks/useIsAuthorized"; +import { AuthorizedForCB } from "@/Utils/AuthorizeFor"; interface Props { children: (value: { isAuthorized: boolean }) => JSX.Element; diff --git a/src/CAREUI/misc/PaginatedList.tsx b/src/CAREUI/misc/PaginatedList.tsx index 3521807154e..42f6903b92f 100644 --- a/src/CAREUI/misc/PaginatedList.tsx +++ b/src/CAREUI/misc/PaginatedList.tsx @@ -1,12 +1,13 @@ import { createContext, useContext, useState } from "react"; -import { PaginatedResponse, QueryRoute } from "../../Utils/request/types"; -import useQuery, { QueryOptions } from "../../Utils/request/useQuery"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; import ButtonV2, { CommonButtonProps, -} from "../../Components/Common/components/ButtonV2"; -import CareIcon from "../icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import Pagination from "../../Components/Common/Pagination"; +} from "@/Components/Common/components/ButtonV2"; +import Pagination from "@/Components/Common/Pagination"; +import { PaginatedResponse, QueryRoute } from "@/Utils/request/types"; +import useQuery, { QueryOptions } from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; const DEFAULT_PER_PAGE_LIMIT = 14; diff --git a/src/Common/constants.tsx b/src/Common/constants.tsx index 0b08b4b9a42..645d9333b86 100644 --- a/src/Common/constants.tsx +++ b/src/Common/constants.tsx @@ -1,9 +1,9 @@ -import { IConfig } from "./hooks/useConfig"; -import { PatientCategory } 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 { IconName } from "@/CAREUI/icons/CareIcon"; +import { IConfig } from "@/Common/hooks/useConfig"; +import { SortOption } from "@/Components/Common/SortDropdown"; +import { PatientCategory } from "@/Components/Facility/models"; +import { PhoneNumberValidator } from "@/Components/Form/FieldValidators"; +import { dateQueryString } from "@/Utils/utils"; export const RESULTS_PER_PAGE_LIMIT = 14; export const PAGINATION_LIMIT = 36; diff --git a/src/Common/hooks/useAppHistory.ts b/src/Common/hooks/useAppHistory.ts index a4605db082b..a17598e8a36 100644 --- a/src/Common/hooks/useAppHistory.ts +++ b/src/Common/hooks/useAppHistory.ts @@ -1,9 +1,10 @@ import { navigate } from "raviger"; import { useContext } from "react"; + import { HistoryContext, ResetHistoryContext, -} from "../../Providers/HistoryAPIProvider"; +} from "@/Providers/HistoryAPIProvider"; export default function useAppHistory() { const history = useContext(HistoryContext); diff --git a/src/Common/hooks/useAuthUser.ts b/src/Common/hooks/useAuthUser.ts index e46bbb4f0b2..a07ea5e7edd 100644 --- a/src/Common/hooks/useAuthUser.ts +++ b/src/Common/hooks/useAuthUser.ts @@ -1,5 +1,6 @@ import { createContext, useContext } from "react"; -import { UserModel } from "../../Components/Users/models"; + +import { UserModel } from "@/Components/Users/models"; export const AuthUserContext = createContext(null); diff --git a/src/Common/hooks/useBreakpoints.ts b/src/Common/hooks/useBreakpoints.ts index 5428a8d1b93..2248e2dbdcd 100644 --- a/src/Common/hooks/useBreakpoints.ts +++ b/src/Common/hooks/useBreakpoints.ts @@ -1,4 +1,4 @@ -import useWindowDimensions from "./useWindowDimensions"; +import useWindowDimensions from "@/Common/hooks/useWindowDimensions"; type Breakpoints = "vs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"; diff --git a/src/Common/hooks/useExport.tsx b/src/Common/hooks/useExport.tsx index f2ce1c57bf6..5c54484f9a5 100644 --- a/src/Common/hooks/useExport.tsx +++ b/src/Common/hooks/useExport.tsx @@ -1,7 +1,8 @@ -import dayjs from "../../Utils/dayjs"; import { useState } from "react"; import { useDispatch } from "react-redux"; +import dayjs from "@/Utils/dayjs"; + export default function useExport() { const dispatch: any = useDispatch(); const [isExporting, setIsExporting] = useState(false); diff --git a/src/Common/hooks/useFeedPTZ.ts b/src/Common/hooks/useFeedPTZ.ts index 32cc5e6bc25..e28edcda50d 100644 --- a/src/Common/hooks/useFeedPTZ.ts +++ b/src/Common/hooks/useFeedPTZ.ts @@ -1,4 +1,4 @@ -import { operateAsset } from "../../Redux/actions"; +import { operateAsset } from "@/Redux/actions"; export interface IAsset { id: string; diff --git a/src/Common/hooks/useFilters.tsx b/src/Common/hooks/useFilters.tsx index 129a696041b..82030e77729 100644 --- a/src/Common/hooks/useFilters.tsx +++ b/src/Common/hooks/useFilters.tsx @@ -1,10 +1,11 @@ import { useQueryParams } from "raviger"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import GenericFilterBadge from "../../CAREUI/display/FilterBadge"; -import PaginationComponent from "../../Components/Common/Pagination"; -import useConfig from "./useConfig"; -import { classNames } from "../../Utils/utils"; + +import GenericFilterBadge from "@/CAREUI/display/FilterBadge"; +import useConfig from "@/Common/hooks/useConfig"; +import PaginationComponent from "@/Components/Common/Pagination"; +import { classNames } from "@/Utils/utils"; export type FilterState = Record; export type FilterParamKeys = string | string[]; diff --git a/src/Common/hooks/useHLSPlayer.ts b/src/Common/hooks/useHLSPlayer.ts index 32a52043fe7..f49bca0f69d 100644 --- a/src/Common/hooks/useHLSPlayer.ts +++ b/src/Common/hooks/useHLSPlayer.ts @@ -1,5 +1,6 @@ import ReactPlayer from "react-player"; -import { IOptions } from "./useMSEplayer"; + +import { IOptions } from "@/Common/hooks/useMSEplayer"; export const useHLSPLayer = (ref: ReactPlayer | null) => { const startStream = ({ onSuccess, onError }: IOptions = {}) => { diff --git a/src/Common/hooks/useIsAuthorized.ts b/src/Common/hooks/useIsAuthorized.ts index 922a17b7498..dbad05ddfde 100644 --- a/src/Common/hooks/useIsAuthorized.ts +++ b/src/Common/hooks/useIsAuthorized.ts @@ -1,5 +1,5 @@ -import { AuthorizedForCB } from "../../Utils/AuthorizeFor"; -import useAuthUser from "./useAuthUser"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { AuthorizedForCB } from "@/Utils/AuthorizeFor"; export const useIsAuthorized = (authorizeFor: AuthorizedForCB) => { const authUser = useAuthUser(); diff --git a/src/Common/hooks/useMSEplayer.ts b/src/Common/hooks/useMSEplayer.ts index 4d1bb36b9ac..8690b4a1836 100644 --- a/src/Common/hooks/useMSEplayer.ts +++ b/src/Common/hooks/useMSEplayer.ts @@ -1,5 +1,5 @@ -import { useEffect, useRef } from "react"; import axios from "axios"; +import { useEffect, useRef } from "react"; export interface IAsset { middlewareHostname: string; diff --git a/src/Common/utils.tsx b/src/Common/utils.tsx index 270e2f5efe6..13bdb5ac3ae 100644 --- a/src/Common/utils.tsx +++ b/src/Common/utils.tsx @@ -1,6 +1,7 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { useEffect } from "react"; -import { OptionsType } from "./constants"; + +import { OptionsType } from "@/Common/constants"; export interface statusType { aborted?: boolean; diff --git a/src/Components/ABDM/ABHAProfileModal.tsx b/src/Components/ABDM/ABHAProfileModal.tsx index cc16fd45b8d..b07223a2dec 100644 --- a/src/Components/ABDM/ABHAProfileModal.tsx +++ b/src/Components/ABDM/ABHAProfileModal.tsx @@ -1,13 +1,13 @@ -import * as Notify from "../../Utils/Notifications"; - -import { AbhaObject } from "../Patient/models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "../Common/Dialog"; import QRCode from "qrcode.react"; -import { formatDateTime } from "../../Utils/utils"; import { useRef } from "react"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import DialogModal from "@/Components/Common/Dialog"; +import { AbhaObject } from "@/Components/Patient/models"; +import routes from "@/Redux/api"; +import * as Notify from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; interface IProps { patientId?: string; diff --git a/src/Components/ABDM/ConfigureHealthFacility.tsx b/src/Components/ABDM/ConfigureHealthFacility.tsx index 16e6bf90ea4..941e2969f68 100644 --- a/src/Components/ABDM/ConfigureHealthFacility.tsx +++ b/src/Components/ABDM/ConfigureHealthFacility.tsx @@ -1,13 +1,14 @@ -import { lazy, useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; -import { Cancel, Submit } from "../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 { lazy, useReducer, useState } from "react"; + +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils.js"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); const initForm = { diff --git a/src/Components/ABDM/LinkABHANumberModal.tsx b/src/Components/ABDM/LinkABHANumberModal.tsx index 367c9815db1..3bc3fb044a8 100644 --- a/src/Components/ABDM/LinkABHANumberModal.tsx +++ b/src/Components/ABDM/LinkABHANumberModal.tsx @@ -1,18 +1,17 @@ -import * as Notify from "../../Utils/Notifications"; - -import Dropdown, { DropdownItem } from "../Common/components/Menu"; import { useEffect, useState } from "react"; -import ButtonV2 from "../Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CircularProgress from "../Common/components/CircularProgress"; -import DialogModal from "../Common/Dialog"; -import OtpFormField from "../Form/FormFields/OtpFormField"; -import QRScanner from "../Common/QRScanner"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { classNames } from "../../Utils/utils"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import Dropdown, { DropdownItem } from "@/Components/Common/components/Menu"; +import DialogModal from "@/Components/Common/Dialog"; +import QRScanner from "@/Components/Common/QRScanner"; +import OtpFormField from "@/Components/Form/FormFields/OtpFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import routes from "@/Redux/api"; +import * as Notify from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; +import { classNames } from "@/Utils/utils"; export const validateRule = ( condition: boolean, diff --git a/src/Components/ABDM/LinkCareContextModal.tsx b/src/Components/ABDM/LinkCareContextModal.tsx index 36749ff3d23..c605dea4210 100644 --- a/src/Components/ABDM/LinkCareContextModal.tsx +++ b/src/Components/ABDM/LinkCareContextModal.tsx @@ -1,13 +1,14 @@ -import * as Notification from "../../Utils/Notifications.js"; - -import ButtonV2 from "../Common/components/ButtonV2"; -import DateFormField from "../Form/FormFields/DateFormField"; -import DialogModal from "../Common/Dialog"; -import { PatientModel } from "../Patient/models"; -import TextFormField from "../Form/FormFields/TextFormField"; import { useState } from "react"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; + +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { PatientModel } from "@/Components/Patient/models"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request.js"; + +import routes from "@/Redux/api.js"; interface IProps { consultationId: string; diff --git a/src/Components/Assets/AssetConfigure.tsx b/src/Components/Assets/AssetConfigure.tsx index fd431ae35ea..78e9d129c72 100644 --- a/src/Components/Assets/AssetConfigure.tsx +++ b/src/Components/Assets/AssetConfigure.tsx @@ -1,9 +1,9 @@ -import Loading from "../Common/Loading"; -import HL7Monitor from "./AssetType/HL7Monitor"; -import ONVIFCamera from "./AssetType/ONVIFCamera"; -import Page from "../Common/components/Page"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import HL7Monitor from "@/Components/Assets/AssetType/HL7Monitor"; +import ONVIFCamera from "@/Components/Assets/AssetType/ONVIFCamera"; +import Page from "@/Components/Common/components/Page"; +import Loading from "@/Components/Common/Loading"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; interface AssetConfigureProps { assetId: string; diff --git a/src/Components/Assets/AssetFilter.tsx b/src/Components/Assets/AssetFilter.tsx index 98f7f52e1e1..4954107fff5 100644 --- a/src/Components/Assets/AssetFilter.tsx +++ b/src/Components/Assets/AssetFilter.tsx @@ -1,19 +1,20 @@ -import { useState, useEffect, useCallback } from "react"; -import { navigate, useQueryParams } from "raviger"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import { LocationSelect } from "../Common/LocationSelect"; -import { AssetClass } from "./AssetTypes"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import routes from "../../Redux/api"; -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 { dateQueryString } from "../../Utils/utils"; +import { navigate, useQueryParams } from "raviger"; +import { useState, useEffect, useCallback } from "react"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; +import { AssetClass } from "@/Components/Assets/AssetTypes"; +import { DateRange } from "@/Components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { LocationSelect } from "@/Components/Common/LocationSelect"; +import { FacilityModel } from "@/Components/Facility/models"; +import DateRangeFormField from "@/Components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString } from "@/Utils/utils"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); diff --git a/src/Components/Assets/AssetImportModal.tsx b/src/Components/Assets/AssetImportModal.tsx index 02fe1d90265..e79b88cc4bf 100644 --- a/src/Components/Assets/AssetImportModal.tsx +++ b/src/Components/Assets/AssetImportModal.tsx @@ -1,22 +1,19 @@ -import { ChangeEventHandler, useEffect, useState } from "react"; -import useDragAndDrop from "../../Utils/useDragAndDrop"; -import { sleep } from "../../Utils/utils"; -import { FacilityModel } from "../Facility/models"; -import { AssetData } from "./AssetTypes"; -import * as Notification from "../../Utils/Notifications.js"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; import { Link } from "raviger"; +import { ChangeEventHandler, useEffect, useState } from "react"; import readXlsxFile from "read-excel-file"; -import { - LocalStorageKeys, - XLSXAssetImportSchema, -} from "../../Common/constants"; -import { parseCsvFile } from "../../Utils/utils"; -import useConfig from "../../Common/hooks/useConfig"; -import DialogModal from "../Common/Dialog"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; + +import { LocalStorageKeys, XLSXAssetImportSchema } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import { AssetData } from "@/Components/Assets/AssetTypes"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { FacilityModel } from "@/Components/Facility/models"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import useQuery from "@/Utils/request/useQuery"; +import useDragAndDrop from "@/Utils/useDragAndDrop"; +import { parseCsvFile, sleep } from "@/Utils/utils"; interface Props { open: boolean; diff --git a/src/Components/Assets/AssetManage.tsx b/src/Components/Assets/AssetManage.tsx index 4f65bc6a569..259262b3c4d 100644 --- a/src/Components/Assets/AssetManage.tsx +++ b/src/Components/Assets/AssetManage.tsx @@ -1,36 +1,40 @@ +import QRCode from "qrcode.react"; import { useState, useEffect, ReactElement, lazy } from "react"; +import { useTranslation } from "react-i18next"; + +import Chip from "@/CAREUI/display/Chip"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { UserRole, USER_TYPES } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { AssetServiceEditModal } from "@/Components/Assets/AssetServiceEditModal"; +import { warrantyAmcValidityChip } from "@/Components/Assets/AssetsList"; import { AssetClass, assetClassProps, AssetData, AssetService, AssetTransaction, -} from "./AssetTypes"; -import Pagination from "../Common/Pagination"; -import { navigate } from "raviger"; -import QRCode from "qrcode.react"; -import AssetWarrantyCard from "./AssetWarrantyCard"; -import { formatDate, formatDateTime } 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 RecordMeta from "../../CAREUI/display/RecordMeta"; -import { useTranslation } from "react-i18next"; +} from "@/Components/Assets/AssetTypes"; +import AssetWarrantyCard from "@/Components/Assets/AssetWarrantyCard"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import Pagination from "@/Components/Common/Pagination"; +import { formatDate, formatDateTime } from "@/Utils/utils"; + const Loading = lazy(() => import("../Common/Loading")); -import * as Notification from "../../Utils/Notifications.js"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Uptime from "../Common/Uptime"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +import * as Notification from "@/Utils/Notifications.js"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import Uptime from "@/Components/Common/Uptime"; + import dayjs from "dayjs"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; -import { AssetServiceEditModal } from "./AssetServiceEditModal"; -import { warrantyAmcValidityChip } from "./AssetsList"; -import Page from "../Common/components/Page"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; +import { navigate } from "raviger"; + +import RelativeDateUserMention from "@/Components/Common/RelativeDateUserMention"; +import request from "@/Utils/request/request"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; +import Page from "@/Components/Common/components/Page"; interface AssetManageProps { assetId: string; diff --git a/src/Components/Assets/AssetServiceEditModal.tsx b/src/Components/Assets/AssetServiceEditModal.tsx index 3964dfe0770..1054a4eea33 100644 --- a/src/Components/Assets/AssetServiceEditModal.tsx +++ b/src/Components/Assets/AssetServiceEditModal.tsx @@ -1,16 +1,24 @@ -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 { AssetData, AssetService, AssetServiceEdit } from "./AssetTypes"; import dayjs from "dayjs"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { formatDate, formatDateTime } from "../../Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import DateFormField from "../Form/FormFields/DateFormField"; import { t } from "i18next"; +import { useEffect, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { + AssetData, + AssetService, + AssetServiceEdit, +} from "@/Components/Assets/AssetTypes"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import { formatDate, formatDateTime } from "@/Utils/utils"; export const AssetServiceEditModal = (props: { asset?: AssetData; diff --git a/src/Components/Assets/AssetType/HL7Monitor.tsx b/src/Components/Assets/AssetType/HL7Monitor.tsx index b4fefbc90b2..65766e4edc1 100644 --- a/src/Components/Assets/AssetType/HL7Monitor.tsx +++ b/src/Components/Assets/AssetType/HL7Monitor.tsx @@ -1,19 +1,20 @@ import { SyntheticEvent, useEffect, useState } from "react"; -import { AssetData } from "../AssetTypes"; -import * as Notification from "../../../Utils/Notifications.js"; -import MonitorConfigure from "../configure/MonitorConfigure"; -import Loading from "../../Common/Loading"; -import { checkIfValidIP } from "../../../Common/validation"; -import Card from "../../../CAREUI/display/Card"; -import { Submit } from "../../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 request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import useQuery from "../../../Utils/request/useQuery"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { checkIfValidIP } from "@/Common/validation"; +import { AssetData } from "@/Components/Assets/AssetTypes"; +import MonitorConfigure from "@/Components/Assets/configure/MonitorConfigure"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import Loading from "@/Components/Common/Loading"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import HL7PatientVitalsMonitor from "@/Components/VitalsMonitor/HL7PatientVitalsMonitor"; +import VentilatorPatientVitalsMonitor from "@/Components/VitalsMonitor/VentilatorPatientVitalsMonitor"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface HL7MonitorProps { assetId: string; diff --git a/src/Components/Assets/AssetType/ONVIFCamera.tsx b/src/Components/Assets/AssetType/ONVIFCamera.tsx index 44d4d372d73..adc23c693ef 100644 --- a/src/Components/Assets/AssetType/ONVIFCamera.tsx +++ b/src/Components/Assets/AssetType/ONVIFCamera.tsx @@ -1,22 +1,20 @@ -import { useEffect, useState } from "react"; -import { AssetData } from "../AssetTypes"; -import * as Notification from "../../../Utils/Notifications.js"; -import { BedModel } from "../../Facility/models"; import axios from "axios"; -import { getCameraConfig } from "../../../Utils/transformUtils"; -import CameraConfigure from "../configure/CameraConfigure"; -import Loading from "../../Common/Loading"; -import { checkIfValidIP } from "../../../Common/validation"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import { Submit } from "../../Common/components/ButtonV2"; -import { SyntheticEvent } from "react"; -import useAuthUser from "../../../Common/hooks/useAuthUser"; +import { useEffect, useState, SyntheticEvent } from "react"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import useQuery from "../../../Utils/request/useQuery"; - -import CareIcon from "../../../CAREUI/icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { checkIfValidIP } from "@/Common/validation"; +import { AssetData } from "@/Components/Assets/AssetTypes"; +import CameraConfigure from "@/Components/Assets/configure/CameraConfigure"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import Loading from "@/Components/Common/Loading"; +import { BedModel } from "@/Components/Facility/models"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { getCameraConfig } from "@/Utils/transformUtils"; interface Props { assetId: string; diff --git a/src/Components/Assets/AssetTypes.tsx b/src/Components/Assets/AssetTypes.tsx index 328f127e0c3..f7cae3d1624 100644 --- a/src/Components/Assets/AssetTypes.tsx +++ b/src/Components/Assets/AssetTypes.tsx @@ -1,6 +1,6 @@ -import { BedModel } from "../Facility/models"; -import { PerformedByModel } from "../HCX/misc"; -import { PatientModel } from "../Patient/models"; +import { BedModel } from "@/Components/Facility/models"; +import { PerformedByModel } from "@/Components/HCX/misc"; +import { PatientModel } from "@/Components/Patient/models"; export interface AssetLocationObject { id: string; diff --git a/src/Components/Assets/AssetWarrantyCard.tsx b/src/Components/Assets/AssetWarrantyCard.tsx index 2e5fa74b9c6..94e07c709a9 100644 --- a/src/Components/Assets/AssetWarrantyCard.tsx +++ b/src/Components/Assets/AssetWarrantyCard.tsx @@ -1,9 +1,10 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { AssetData } from "./AssetTypes"; -import { classNames, formatDate } from "../../Utils/utils"; -import CopyToClipboard from "react-copy-to-clipboard"; import { t } from "i18next"; import { useEffect, useState } from "react"; +import CopyToClipboard from "react-copy-to-clipboard"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AssetData } from "@/Components/Assets/AssetTypes"; +import { classNames, formatDate } from "@/Utils/utils"; export default function AssetWarrantyCard(props: { asset: AssetData }) { const { asset } = props; diff --git a/src/Components/Assets/AssetsList.tsx b/src/Components/Assets/AssetsList.tsx index 8c19928fbee..cc43e4658b2 100644 --- a/src/Components/Assets/AssetsList.tsx +++ b/src/Components/Assets/AssetsList.tsx @@ -1,29 +1,30 @@ -import QrReader from "react-qr-reader"; -import * as Notification from "../../Utils/Notifications.js"; -import { listAssets } from "../../Redux/actions"; -import { assetClassProps, AssetData } from "./AssetTypes"; -import { useState, useEffect, lazy } from "react"; import { Link, navigate } from "raviger"; -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 { FacilityModel } from "../Facility/models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized"; -import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import ButtonV2 from "../Common/components/ButtonV2"; -import FacilitiesSelectDialogue from "../ExternalResult/FacilitiesSelectDialogue"; -import ExportMenu from "../Common/Export"; -import CountBlock from "../../CAREUI/display/Count"; -import AssetImportModal from "./AssetImportModal"; -import Page from "../Common/components/Page"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; +import { useState, useEffect, lazy } from "react"; import { useTranslation } from "react-i18next"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; +import QrReader from "react-qr-reader"; + +import Chip from "@/CAREUI/display/Chip"; +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import useFilters from "@/Common/hooks/useFilters"; +import { useIsAuthorized } from "@/Common/hooks/useIsAuthorized"; +import AssetFilter from "@/Components/Assets/AssetFilter"; +import AssetImportModal from "@/Components/Assets/AssetImportModal"; +import { assetClassProps, AssetData } from "@/Components/Assets/AssetTypes"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import ExportMenu from "@/Components/Common/Export"; +import FacilitiesSelectDialogue from "@/Components/ExternalResult/FacilitiesSelectDialogue"; +import { FacilityModel } from "@/Components/Facility/models"; +import SearchInput from "@/Components/Form/SearchInput"; +import { listAssets } from "@/Redux/actions"; +import routes from "@/Redux/api"; +import AuthorizeFor, { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications.js"; +import { parseQueryParams } from "@/Utils/primitives"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Assets/configure/CameraConfigure.tsx b/src/Components/Assets/configure/CameraConfigure.tsx index c3ba434ef3f..81a394cf9b4 100644 --- a/src/Components/Assets/configure/CameraConfigure.tsx +++ b/src/Components/Assets/configure/CameraConfigure.tsx @@ -1,12 +1,13 @@ import { SyntheticEvent } from "react"; -import { AssetData } from "../AssetTypes"; -import LiveFeed from "../../Facility/Consultations/LiveFeed"; -import { BedSelect } from "../../Common/BedSelect"; -import { BedModel } from "../../Facility/models"; -import { getCameraConfig } from "../../../Utils/transformUtils"; -import { Submit } from "../../Common/components/ButtonV2"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import Card from "../../../CAREUI/display/Card"; + +import Card from "@/CAREUI/display/Card"; +import { AssetData } from "@/Components/Assets/AssetTypes"; +import { BedSelect } from "@/Components/Common/BedSelect"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import LiveFeed from "@/Components/Facility/Consultations/LiveFeed"; +import { BedModel } from "@/Components/Facility/models"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { getCameraConfig } from "@/Utils/transformUtils"; interface CameraConfigureProps { asset: AssetData; diff --git a/src/Components/Assets/configure/MonitorConfigure.tsx b/src/Components/Assets/configure/MonitorConfigure.tsx index d1b24b24959..bfd458f913d 100644 --- a/src/Components/Assets/configure/MonitorConfigure.tsx +++ b/src/Components/Assets/configure/MonitorConfigure.tsx @@ -1,13 +1,14 @@ import { useState } from "react"; -import { BedSelect } from "../../Common/BedSelect"; -import { BedModel } from "../../Facility/models"; -import { AssetData } from "../AssetTypes"; -import * as Notification from "../../../Utils/Notifications.js"; -import { Submit } from "../../Common/components/ButtonV2"; -import { FieldLabel } from "../../Form/FormFields/FormField"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import useQuery from "../../../Utils/request/useQuery"; + +import { AssetData } from "@/Components/Assets/AssetTypes"; +import { BedSelect } from "@/Components/Common/BedSelect"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import { BedModel } from "@/Components/Facility/models"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; const saveLink = async (assetId: string, bedId: string) => { await request(routes.createAssetBed, { diff --git a/src/Components/Auth/Login.tsx b/src/Components/Auth/Login.tsx index 58472c4ff25..d6edfeea811 100644 --- a/src/Components/Auth/Login.tsx +++ b/src/Components/Auth/Login.tsx @@ -1,18 +1,19 @@ import { useEffect, useState } from "react"; -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 LegendInput from "../../CAREUI/interactive/LegendInput"; -import LanguageSelectorLogin from "../Common/LanguageSelectorLogin"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useConfig from "../../Common/hooks/useConfig"; -import CircularProgress from "../Common/components/CircularProgress"; -import { LocalStorageKeys } from "../../Common/constants"; +import { useTranslation } from "react-i18next"; import ReactMarkdown from "react-markdown"; import rehypeRaw from "rehype-raw"; -import { handleRedirection } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import LegendInput from "@/CAREUI/interactive/LegendInput"; +import { LocalStorageKeys } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import LanguageSelectorLogin from "@/Components/Common/LanguageSelectorLogin"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import { handleRedirection } from "@/Utils/utils"; export const Login = (props: { forgot?: boolean }) => { const { diff --git a/src/Components/Auth/ResetPassword.tsx b/src/Components/Auth/ResetPassword.tsx index 47d120e1a97..bb4b3e94ddc 100644 --- a/src/Components/Auth/ResetPassword.tsx +++ b/src/Components/Auth/ResetPassword.tsx @@ -1,14 +1,16 @@ -import { useEffect, useState } from "react"; -import request from "../../Utils/request/request.js"; -import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { LocalStorageKeys } from "../../Common/constants"; -import { Cancel, Submit } from "../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 { LocalStorageKeys } from "@/Common/constants"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { validateRule } from "@/Components/Users/UserAdd"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request.js"; + +import { validatePassword } from "@/Common/validation.js"; +import routes from "@/Redux/api.js"; export const ResetPassword = (props: any) => { const initForm: any = { diff --git a/src/Components/Common/AssetSelect.tsx b/src/Components/Common/AssetSelect.tsx index 0e47c7cfbfd..02e81c620b1 100644 --- a/src/Components/Common/AssetSelect.tsx +++ b/src/Components/Common/AssetSelect.tsx @@ -1,7 +1,8 @@ import { useCallback } from "react"; import { useDispatch } from "react-redux"; -import { listAssets } from "../../Redux/actions"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; + +import AutoCompleteAsync from "@/Components/Form/AutoCompleteAsync"; +import { listAssets } from "@/Redux/actions"; interface AssetSelectProps { name: string; diff --git a/src/Components/Common/BedSelect.tsx b/src/Components/Common/BedSelect.tsx index d903d3b62e0..12c83496310 100644 --- a/src/Components/Common/BedSelect.tsx +++ b/src/Components/Common/BedSelect.tsx @@ -1,9 +1,10 @@ import { useCallback } from "react"; -import { useDispatch } from "react-redux"; -import { listFacilityBeds } from "../../Redux/actions"; -import { BedModel } from "../Facility/models"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import { BedModel } from "@/Components/Facility/models"; +import AutoCompleteAsync from "@/Components/Form/AutoCompleteAsync"; +import { listFacilityBeds } from "@/Redux/actions"; interface BedSelectProps { name: string; diff --git a/src/Components/Common/BloodPressureFormField.tsx b/src/Components/Common/BloodPressureFormField.tsx index ed0557ae8e3..c9c60afecef 100644 --- a/src/Components/Common/BloodPressureFormField.tsx +++ b/src/Components/Common/BloodPressureFormField.tsx @@ -1,10 +1,10 @@ -import FormField from "../Form/FormFields/FormField"; -import RangeAutocompleteFormField from "../Form/FormFields/RangeAutocompleteFormField"; +import FormField from "@/Components/Form/FormFields/FormField"; +import RangeAutocompleteFormField from "@/Components/Form/FormFields/RangeAutocompleteFormField"; import { FieldChangeEvent, FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/Components/Form/FormFields/Utils"; export interface BloodPressure { systolic: number; diff --git a/src/Components/Common/Breadcrumbs.tsx b/src/Components/Common/Breadcrumbs.tsx index 4ea85b0d759..4b02eeb1efe 100644 --- a/src/Components/Common/Breadcrumbs.tsx +++ b/src/Components/Common/Breadcrumbs.tsx @@ -1,7 +1,8 @@ import { usePath, Link } from "raviger"; import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { classNames } from "@/Utils/utils"; const MENU_TAGS: { [key: string]: string } = { facility: "Facilities", diff --git a/src/Components/Common/ConfirmDialog.tsx b/src/Components/Common/ConfirmDialog.tsx index a6bc14e8d4f..25dbdbe068d 100644 --- a/src/Components/Common/ConfirmDialog.tsx +++ b/src/Components/Common/ConfirmDialog.tsx @@ -1,5 +1,9 @@ -import DialogModal from "./Dialog"; -import { ButtonVariant, Cancel, Submit } from "./components/ButtonV2"; +import { + ButtonVariant, + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; type ConfirmDialogProps = { className?: string; diff --git a/src/Components/Common/DateInputV2.tsx b/src/Components/Common/DateInputV2.tsx index 95652e68638..c83b428ecf6 100644 --- a/src/Components/Common/DateInputV2.tsx +++ b/src/Components/Common/DateInputV2.tsx @@ -1,9 +1,9 @@ +import { Popover } from "@headlessui/react"; import { MutableRefObject, useEffect, useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { Popover } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; -import dayjs from "../../Utils/dayjs"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import dayjs from "@/Utils/dayjs"; +import { classNames } from "@/Utils/utils"; type DatePickerType = "date" | "month" | "year"; export type DatePickerPosition = "LEFT" | "RIGHT" | "CENTER"; diff --git a/src/Components/Common/DateRangeInputV2.tsx b/src/Components/Common/DateRangeInputV2.tsx index 0c3a7559ff9..901bdbdf358 100644 --- a/src/Components/Common/DateRangeInputV2.tsx +++ b/src/Components/Common/DateRangeInputV2.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; -import DateInputV2 from "./DateInputV2"; + +import DateInputV2 from "@/Components/Common/DateInputV2"; export type DateRange = { start: Date | undefined; diff --git a/src/Components/Common/DiagnosisSelectFormField.tsx b/src/Components/Common/DiagnosisSelectFormField.tsx index 4086664d4ba..c723ce0355d 100644 --- a/src/Components/Common/DiagnosisSelectFormField.tsx +++ b/src/Components/Common/DiagnosisSelectFormField.tsx @@ -1,12 +1,12 @@ -import { useAsyncOptions } from "../../Common/hooks/useAsyncOptions"; -import { listICD11Diagnosis } from "../../Redux/actions"; -import { ICD11DiagnosisModel } from "../Facility/models"; -import { AutocompleteMutliSelect } from "../Form/FormFields/AutocompleteMultiselect"; -import FormField from "../Form/FormFields/FormField"; +import { useAsyncOptions } from "@/Common/hooks/useAsyncOptions"; +import { ICD11DiagnosisModel } from "@/Components/Facility/models"; +import { AutocompleteMutliSelect } from "@/Components/Form/FormFields/AutocompleteMultiselect"; +import FormField from "@/Components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/Components/Form/FormFields/Utils"; +import { listICD11Diagnosis } from "@/Redux/actions"; type Props = // | ({ multiple?: false | undefined } & FormFieldBaseProps) // uncomment when single select form field is required and implemented. diff --git a/src/Components/Common/Dialog.tsx b/src/Components/Common/Dialog.tsx index c1dcf5afb70..0c587d7cb48 100644 --- a/src/Components/Common/Dialog.tsx +++ b/src/Components/Common/Dialog.tsx @@ -1,7 +1,8 @@ import { Dialog, Transition } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; import { Fragment } from "react"; +import { classNames } from "@/Utils/utils"; + type DialogProps = { title: React.ReactNode; description?: React.ReactNode; diff --git a/src/Components/Common/DistrictAutocompleteFormField.tsx b/src/Components/Common/DistrictAutocompleteFormField.tsx index 122b576a2fc..f79dcbbca6b 100644 --- a/src/Components/Common/DistrictAutocompleteFormField.tsx +++ b/src/Components/Common/DistrictAutocompleteFormField.tsx @@ -1,10 +1,11 @@ -import { useDispatch } from "react-redux"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import { IState } from "./StateAutocompleteFormField"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { statusType, useAbortableEffect } from "../../Common/utils"; import { useCallback, useState } from "react"; -import { getDistrictByState } from "../../Redux/actions"; +import { useDispatch } from "react-redux"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { IState } from "@/Components/Common/StateAutocompleteFormField"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { getDistrictByState } from "@/Redux/actions"; export type IDistrict = { id: number; diff --git a/src/Components/Common/Export.tsx b/src/Components/Common/Export.tsx index f991c476aac..01141261715 100644 --- a/src/Components/Common/Export.tsx +++ b/src/Components/Common/Export.tsx @@ -1,11 +1,10 @@ +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useExport from "@/Common/hooks/useExport"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; import DropdownMenu, { DropdownItem, DropdownItemProps, -} from "../../Components/Common/components/Menu"; - -import ButtonV2 from "../../Components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useExport from "../../Common/hooks/useExport"; +} from "@/Components/Common/components/Menu"; interface ExportItem { options?: DropdownItemProps; diff --git a/src/Components/Common/FacilitySelect.tsx b/src/Components/Common/FacilitySelect.tsx index 19494081aa3..6c5bdddf58c 100644 --- a/src/Components/Common/FacilitySelect.tsx +++ b/src/Components/Common/FacilitySelect.tsx @@ -1,8 +1,9 @@ import { useCallback } from "react"; import { useDispatch } from "react-redux"; -import { getAllFacilities, getPermittedFacilities } from "../../Redux/actions"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; -import { FacilityModel } from "../Facility/models"; + +import { FacilityModel } from "@/Components/Facility/models"; +import AutoCompleteAsync from "@/Components/Form/AutoCompleteAsync"; +import { getAllFacilities, getPermittedFacilities } from "@/Redux/actions"; interface FacilitySelectProps { name: string; diff --git a/src/Components/Common/FilePreviewDialog.tsx b/src/Components/Common/FilePreviewDialog.tsx index b7eda93930e..fb5a16e70d0 100644 --- a/src/Components/Common/FilePreviewDialog.tsx +++ b/src/Components/Common/FilePreviewDialog.tsx @@ -1,9 +1,10 @@ import { Dialog, Transition } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; -import CircularProgress from "./components/CircularProgress"; -import { useTranslation } from "react-i18next"; -import { StateInterface } from "../Patient/FileUpload"; import { Dispatch, Fragment, ReactNode, SetStateAction } from "react"; +import { useTranslation } from "react-i18next"; + +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { StateInterface } from "@/Components/Patient/FileUpload"; +import { classNames } from "@/Utils/utils"; export const zoom_values = [ "h-1/6 w-1/6 my-40", diff --git a/src/Components/Common/GLocationPicker.tsx b/src/Components/Common/GLocationPicker.tsx index fc121b8519f..86caa90b022 100644 --- a/src/Components/Common/GLocationPicker.tsx +++ b/src/Components/Common/GLocationPicker.tsx @@ -1,11 +1,12 @@ -import React from "react"; import { Wrapper, Status } from "@googlemaps/react-wrapper"; -import { deepEqual } from "../../Common/utils"; import { isLatLngLiteral } from "@googlemaps/typescript-guards"; -import Spinner from "./Spinner"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useConfig from "../../Common/hooks/useConfig"; import { Popover } from "@headlessui/react"; +import React from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useConfig from "@/Common/hooks/useConfig"; +import { deepEqual } from "@/Common/utils"; +import Spinner from "@/Components/Common/Spinner"; interface GLocationPickerProps { lat: number; diff --git a/src/Components/Common/LanguageSelector.tsx b/src/Components/Common/LanguageSelector.tsx index 4a4f67b993e..e4d332c33b3 100644 --- a/src/Components/Common/LanguageSelector.tsx +++ b/src/Components/Common/LanguageSelector.tsx @@ -1,8 +1,9 @@ import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { LANGUAGE_NAMES } from "../../Locale/config"; -import { classNames } from "../../Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { LANGUAGE_NAMES } from "@/Locale/config"; +import { classNames } from "@/Utils/utils"; export const LanguageSelector = (props: any) => { const { i18n } = useTranslation(); diff --git a/src/Components/Common/LanguageSelectorLogin.tsx b/src/Components/Common/LanguageSelectorLogin.tsx index b6fd1ffb57e..6c27fd546cf 100644 --- a/src/Components/Common/LanguageSelectorLogin.tsx +++ b/src/Components/Common/LanguageSelectorLogin.tsx @@ -1,7 +1,8 @@ import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { LANGUAGE_NAMES } from "../../Locale/config"; -import { classNames } from "../../Utils/utils"; + +import { LANGUAGE_NAMES } from "@/Locale/config"; +import { classNames } from "@/Utils/utils"; export const LanguageSelectorLogin = () => { const { i18n } = useTranslation(); diff --git a/src/Components/Common/LocalBodyAutocompleteFormField.tsx b/src/Components/Common/LocalBodyAutocompleteFormField.tsx index eacfbc35b89..6101e77c9cd 100644 --- a/src/Components/Common/LocalBodyAutocompleteFormField.tsx +++ b/src/Components/Common/LocalBodyAutocompleteFormField.tsx @@ -1,10 +1,11 @@ -import { useDispatch } from "react-redux"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { statusType, useAbortableEffect } from "../../Common/utils"; import { useCallback, useState } from "react"; -import { getLocalbodyByDistrict } from "../../Redux/actions"; -import { IDistrict } from "./DistrictAutocompleteFormField"; +import { useDispatch } from "react-redux"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { IDistrict } from "@/Components/Common/DistrictAutocompleteFormField"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { getLocalbodyByDistrict } from "@/Redux/actions"; export type ILocalBody = { id: number; diff --git a/src/Components/Common/LocationSelect.tsx b/src/Components/Common/LocationSelect.tsx index ef7280f1907..6fce9093508 100644 --- a/src/Components/Common/LocationSelect.tsx +++ b/src/Components/Common/LocationSelect.tsx @@ -1,8 +1,9 @@ import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import { listFacilityAssetLocation } from "../../Redux/actions"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import AutocompleteMultiSelectFormField from "../Form/FormFields/AutocompleteMultiselect"; + +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import AutocompleteMultiSelectFormField from "@/Components/Form/FormFields/AutocompleteMultiselect"; +import { listFacilityAssetLocation } from "@/Redux/actions"; interface LocationSelectProps { name: string; disabled?: boolean; diff --git a/src/Components/Common/PMJAYProcedurePackageAutocomplete.tsx b/src/Components/Common/PMJAYProcedurePackageAutocomplete.tsx index f99e07ab5db..c3e314224ee 100644 --- a/src/Components/Common/PMJAYProcedurePackageAutocomplete.tsx +++ b/src/Components/Common/PMJAYProcedurePackageAutocomplete.tsx @@ -1,11 +1,11 @@ -import { useAsyncOptions } from "../../Common/hooks/useAsyncOptions"; -import { listPMJYPackages } from "../../Redux/actions"; -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; +import { useAsyncOptions } from "@/Common/hooks/useAsyncOptions"; +import { Autocomplete } from "@/Components/Form/FormFields/Autocomplete"; +import FormField from "@/Components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/Components/Form/FormFields/Utils"; +import { listPMJYPackages } from "@/Redux/actions"; type PMJAYPackageItem = { name?: string; diff --git a/src/Components/Common/PageTitle.tsx b/src/Components/Common/PageTitle.tsx index 65091b9f315..5200cd35bad 100644 --- a/src/Components/Common/PageTitle.tsx +++ b/src/Components/Common/PageTitle.tsx @@ -1,8 +1,9 @@ import { ReactNode, useEffect, useRef } from "react"; -import Breadcrumbs from "./Breadcrumbs"; -import PageHeadTitle from "./PageHeadTitle"; -import { classNames } from "../../Utils/utils"; -import useAppHistory from "../../Common/hooks/useAppHistory"; + +import useAppHistory from "@/Common/hooks/useAppHistory"; +import Breadcrumbs from "@/Components/Common/Breadcrumbs"; +import PageHeadTitle from "@/Components/Common/PageHeadTitle"; +import { classNames } from "@/Utils/utils"; export interface PageTitleProps { title: string; diff --git a/src/Components/Common/Pagination.tsx b/src/Components/Common/Pagination.tsx index e86c9b7a491..b720ae11793 100644 --- a/src/Components/Common/Pagination.tsx +++ b/src/Components/Common/Pagination.tsx @@ -1,7 +1,8 @@ import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useAbortableEffect, statusType } from "../../Common/utils"; -import ButtonV2 from "./components/ButtonV2"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { useAbortableEffect, statusType } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; interface PaginationProps { data: { totalCount: number }; diff --git a/src/Components/Common/PatientCategoryBadge.tsx b/src/Components/Common/PatientCategoryBadge.tsx index 57875b86211..6c00cba8dfb 100644 --- a/src/Components/Common/PatientCategoryBadge.tsx +++ b/src/Components/Common/PatientCategoryBadge.tsx @@ -1,5 +1,5 @@ -import { PATIENT_CATEGORIES } from "../../Common/constants"; -import { PatientCategory } from "../Facility/models"; +import { PATIENT_CATEGORIES } from "@/Common/constants"; +import { PatientCategory } from "@/Components/Facility/models"; const PatientCategoryBadge = ({ category }: { category?: PatientCategory }) => { const categoryClass = category diff --git a/src/Components/Common/QRScanner.tsx b/src/Components/Common/QRScanner.tsx index b4d618ec7dc..90a663495da 100644 --- a/src/Components/Common/QRScanner.tsx +++ b/src/Components/Common/QRScanner.tsx @@ -1,10 +1,11 @@ -import * as Notification from "../../Utils/Notifications.js"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "./Dialog"; -import QrReader from "react-qr-reader"; -import TextFormField from "../Form/FormFields/TextFormField.js"; import { useState } from "react"; +import QrReader from "react-qr-reader"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import DialogModal from "@/Components/Common/Dialog"; +import * as Notification from "@/Utils/Notifications.js"; + +import TextFormField from "@/Components/Form/FormFields/TextFormField.js"; interface IQRScannerModalProps { show: boolean; diff --git a/src/Components/Common/RelativeDateUserMention.tsx b/src/Components/Common/RelativeDateUserMention.tsx index 55c7a81518b..a7824f6b7ff 100644 --- a/src/Components/Common/RelativeDateUserMention.tsx +++ b/src/Components/Common/RelativeDateUserMention.tsx @@ -1,6 +1,6 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { formatDateTime, relativeDate } from "../../Utils/utils"; -import { PerformedByModel } from "../HCX/misc"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { PerformedByModel } from "@/Components/HCX/misc"; +import { formatDateTime, relativeDate } from "@/Utils/utils"; function RelativeDateUserMention(props: { actionDate?: string; diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/Components/Common/Sidebar/Sidebar.tsx index b4f5155e676..c91eafd2923 100644 --- a/src/Components/Common/Sidebar/Sidebar.tsx +++ b/src/Components/Common/Sidebar/Sidebar.tsx @@ -1,13 +1,17 @@ -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 CareIcon from "../../../CAREUI/icons/CareIcon"; -import useConfig from "../../../Common/hooks/useConfig"; -import SlideOver from "../../../CAREUI/interactive/SlideOver"; -import { classNames } from "../../../Utils/utils"; import { Link } from "raviger"; +import { createContext, useContext, useEffect, useRef, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import useActiveLink from "@/Common/hooks/useActiveLink"; +import useConfig from "@/Common/hooks/useConfig"; +import { + SidebarItem, + ShrinkedSidebarItem, +} from "@/Components/Common/Sidebar/SidebarItem"; +import SidebarUserCard from "@/Components/Common/Sidebar/SidebarUserCard"; +import NotificationItem from "@/Components/Notifications/NotificationsList"; +import { classNames } from "@/Utils/utils"; export const SIDEBAR_SHRINK_PREFERENCE_KEY = "sidebarShrinkPreference"; diff --git a/src/Components/Common/Sidebar/SidebarItem.tsx b/src/Components/Common/Sidebar/SidebarItem.tsx index e13a1452125..2addca7de0c 100644 --- a/src/Components/Common/Sidebar/SidebarItem.tsx +++ b/src/Components/Common/Sidebar/SidebarItem.tsx @@ -1,7 +1,8 @@ import { Link } from "raviger"; import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useAppHistory from "../../../Common/hooks/useAppHistory"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAppHistory from "@/Common/hooks/useAppHistory"; export type SidebarIcon = React.ReactNode; diff --git a/src/Components/Common/Sidebar/SidebarUserCard.tsx b/src/Components/Common/Sidebar/SidebarUserCard.tsx index 59970e8a73c..1f8837e6d15 100644 --- a/src/Components/Common/Sidebar/SidebarUserCard.tsx +++ b/src/Components/Common/Sidebar/SidebarUserCard.tsx @@ -1,8 +1,9 @@ import { Link } from "raviger"; import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { handleSignOut } from "../../../Utils/utils"; -import useAuthUser from "../../../Common/hooks/useAuthUser"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { handleSignOut } from "@/Utils/utils"; const SidebarUserCard = ({ shrinked }: { shrinked: boolean }) => { const { t } = useTranslation(); diff --git a/src/Components/Common/SkillSelect.tsx b/src/Components/Common/SkillSelect.tsx index 5ec97974879..0aed368abc5 100644 --- a/src/Components/Common/SkillSelect.tsx +++ b/src/Components/Common/SkillSelect.tsx @@ -1,8 +1,9 @@ import { useCallback } from "react"; import { useDispatch } from "react-redux"; -import { getAllSkills, getUserListSkills } from "../../Redux/actions"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; -import { SkillObjectModel } from "../Users/models"; + +import AutoCompleteAsync from "@/Components/Form/AutoCompleteAsync"; +import { SkillObjectModel } from "@/Components/Users/models"; +import { getAllSkills, getUserListSkills } from "@/Redux/actions"; interface SkillSelectProps { name: string; diff --git a/src/Components/Common/SortDropdown.tsx b/src/Components/Common/SortDropdown.tsx index e979d89375e..f3a0a79e59d 100644 --- a/src/Components/Common/SortDropdown.tsx +++ b/src/Components/Common/SortDropdown.tsx @@ -1,6 +1,9 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DropdownMenu, { DropdownItem } from "./components/Menu"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import DropdownMenu, { + DropdownItem, +} from "@/Components/Common/components/Menu"; export interface SortOption { isAscending: boolean; diff --git a/src/Components/Common/StateAutocompleteFormField.tsx b/src/Components/Common/StateAutocompleteFormField.tsx index 384f46c3a7c..645536a9df3 100644 --- a/src/Components/Common/StateAutocompleteFormField.tsx +++ b/src/Components/Common/StateAutocompleteFormField.tsx @@ -1,9 +1,10 @@ import { useCallback, useState } from "react"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import { statusType, useAbortableEffect } from "../../Common/utils"; import { useDispatch } from "react-redux"; -import { getStates } from "../../Redux/actions"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { getStates } from "@/Redux/actions"; export type IState = { id: number; diff --git a/src/Components/Common/Steps.tsx b/src/Components/Common/Steps.tsx index 497682c3bf8..3b06538daf2 100644 --- a/src/Components/Common/Steps.tsx +++ b/src/Components/Common/Steps.tsx @@ -1,4 +1,4 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; export interface Step { id: number; diff --git a/src/Components/Common/SymptomsSelect.tsx b/src/Components/Common/SymptomsSelect.tsx index e96c8070e3a..18046032945 100644 --- a/src/Components/Common/SymptomsSelect.tsx +++ b/src/Components/Common/SymptomsSelect.tsx @@ -1,11 +1,11 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { SYMPTOM_CHOICES } from "../../Common/constants"; -import FormField from "../Form/FormFields/FormField"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { SYMPTOM_CHOICES } from "@/Common/constants"; +import FormField from "@/Components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import MultiSelectMenuV2 from "../Form/MultiSelectMenuV2"; +} from "@/Components/Form/FormFields/Utils"; +import MultiSelectMenuV2 from "@/Components/Form/MultiSelectMenuV2"; const ASYMPTOMATIC_ID = 1; diff --git a/src/Components/Common/TemperatureFormField.tsx b/src/Components/Common/TemperatureFormField.tsx index 4a40781a141..49962f0779c 100644 --- a/src/Components/Common/TemperatureFormField.tsx +++ b/src/Components/Common/TemperatureFormField.tsx @@ -1,9 +1,10 @@ import { useState } from "react"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import RangeAutocompleteFormField from "../Form/FormFields/RangeAutocompleteFormField"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "./components/ButtonV2"; -import { classNames } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import RangeAutocompleteFormField from "@/Components/Form/FormFields/RangeAutocompleteFormField"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; type TemperatureUnit = "celsius" | "fahrenheit"; diff --git a/src/Components/Common/TopBar.tsx b/src/Components/Common/TopBar.tsx index 2dd9c55609d..474c19979e2 100644 --- a/src/Components/Common/TopBar.tsx +++ b/src/Components/Common/TopBar.tsx @@ -1,5 +1,5 @@ -import useConfig from "../../Common/hooks/useConfig"; -import LanguageSelector from "./LanguageSelector"; +import useConfig from "@/Common/hooks/useConfig"; +import LanguageSelector from "@/Components/Common/LanguageSelector"; const TopBar = () => { const { main_logo } = useConfig(); diff --git a/src/Components/Common/Transition.tsx b/src/Components/Common/Transition.tsx index 7f5830d47db..5b621190430 100644 --- a/src/Components/Common/Transition.tsx +++ b/src/Components/Common/Transition.tsx @@ -1,5 +1,5 @@ -import { CSSTransition as ReactCSSTransition } from "react-transition-group"; import { createContext, useContext, useEffect, useRef } from "react"; +import { CSSTransition as ReactCSSTransition } from "react-transition-group"; type TransitionContextProps = { parent: { diff --git a/src/Components/Common/UpdatableApp.tsx b/src/Components/Common/UpdatableApp.tsx index 8b200d5da0e..531c867c9c6 100644 --- a/src/Components/Common/UpdatableApp.tsx +++ b/src/Components/Common/UpdatableApp.tsx @@ -1,8 +1,9 @@ import { Popover, Transition } from "@headlessui/react"; import { Fragment, ReactNode, useEffect, useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import ButtonV2 from "./components/ButtonV2"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { classNames } from "@/Utils/utils"; const META_URL = "/build-meta.json"; const APP_VERSION_KEY = "app-version"; diff --git a/src/Components/Common/Uptime.tsx b/src/Components/Common/Uptime.tsx index 6f6966b9053..8375933ce8b 100644 --- a/src/Components/Common/Uptime.tsx +++ b/src/Components/Common/Uptime.tsx @@ -1,12 +1,13 @@ import { Popover } from "@headlessui/react"; +import { reverse } from "lodash-es"; import { useCallback, useEffect, useRef, useState } from "react"; -import { listAssetAvailability } from "../../Redux/actions"; import { useDispatch } from "react-redux"; -import * as Notification from "../../Utils/Notifications.js"; -import { AssetStatus, AssetUptimeRecord } from "../Assets/AssetTypes"; -import { reverse } from "lodash-es"; -import { classNames } from "../../Utils/utils"; -import dayjs from "../../Utils/dayjs"; + +import { AssetStatus, AssetUptimeRecord } from "@/Components/Assets/AssetTypes"; +import { listAssetAvailability } from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import { classNames } from "@/Utils/utils"; const STATUS_COLORS = { Operational: "bg-green-500", diff --git a/src/Components/Common/UserAutocompleteFormField.tsx b/src/Components/Common/UserAutocompleteFormField.tsx index ebe6d96bbc5..d72e7ed8473 100644 --- a/src/Components/Common/UserAutocompleteFormField.tsx +++ b/src/Components/Common/UserAutocompleteFormField.tsx @@ -1,14 +1,14 @@ -import { useAsyncOptions } from "../../Common/hooks/useAsyncOptions"; -import { getFacilityUsers, getUserList } from "../../Redux/actions"; -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; +import { UserRole } from "@/Common/constants"; +import { useAsyncOptions } from "@/Common/hooks/useAsyncOptions"; +import { Autocomplete } from "@/Components/Form/FormFields/Autocomplete"; +import FormField from "@/Components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import { UserModel } from "../Users/models"; -import { isUserOnline } from "../../Utils/utils"; -import { UserRole } from "../../Common/constants"; +} from "@/Components/Form/FormFields/Utils"; +import { UserModel } from "@/Components/Users/models"; +import { getFacilityUsers, getUserList } from "@/Redux/actions"; +import { isUserOnline } from "@/Utils/utils"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/Components/Common/WardAutocompleteFormField.tsx b/src/Components/Common/WardAutocompleteFormField.tsx index 47298dd27b2..a8aba9b2181 100644 --- a/src/Components/Common/WardAutocompleteFormField.tsx +++ b/src/Components/Common/WardAutocompleteFormField.tsx @@ -1,10 +1,11 @@ -import { useDispatch } from "react-redux"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { statusType, useAbortableEffect } from "../../Common/utils"; import { useCallback, useState } from "react"; -import { getWardByLocalBody } from "../../Redux/actions"; -import { ILocalBody } from "./LocalBodyAutocompleteFormField"; +import { useDispatch } from "react-redux"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { ILocalBody } from "@/Components/Common/LocalBodyAutocompleteFormField"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { getWardByLocalBody } from "@/Redux/actions"; export type IWard = { id: number; diff --git a/src/Components/Common/components/AccordionV2.tsx b/src/Components/Common/components/AccordionV2.tsx index ef4948d8ae3..a56e6c6e479 100644 --- a/src/Components/Common/components/AccordionV2.tsx +++ b/src/Components/Common/components/AccordionV2.tsx @@ -1,5 +1,6 @@ import { useRef, useState } from "react"; -import { classNames } from "../../../Utils/utils"; + +import { classNames } from "@/Utils/utils"; export default function AccordionV2(props: { children: JSX.Element | JSX.Element[]; diff --git a/src/Components/Common/components/ButtonV2.tsx b/src/Components/Common/components/ButtonV2.tsx index 2f3d3002451..73cf1cba066 100644 --- a/src/Components/Common/components/ButtonV2.tsx +++ b/src/Components/Common/components/ButtonV2.tsx @@ -1,10 +1,11 @@ -import AuthorizedChild from "../../../CAREUI/misc/AuthorizedChild"; -import { AuthorizedElementProps } from "../../../Utils/AuthorizeFor"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; import { Link } from "raviger"; -import { classNames } from "../../../Utils/utils"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; +import { AuthorizedElementProps } from "@/Utils/AuthorizeFor"; +import { classNames } from "@/Utils/utils"; + export type ButtonSize = "small" | "default" | "large"; export type ButtonShape = "square" | "circle"; export type ButtonVariant = diff --git a/src/Components/Common/components/ContactLink.tsx b/src/Components/Common/components/ContactLink.tsx index f78b32863c4..6f6f044c84a 100644 --- a/src/Components/Common/components/ContactLink.tsx +++ b/src/Components/Common/components/ContactLink.tsx @@ -1,4 +1,4 @@ -import CareIcon from "../../../CAREUI/icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; type ContactLinkProps = | { mailto: string; tel?: undefined } diff --git a/src/Components/Common/components/Menu.tsx b/src/Components/Common/components/Menu.tsx index 49ee02b393e..afedd7645ce 100644 --- a/src/Components/Common/components/Menu.tsx +++ b/src/Components/Common/components/Menu.tsx @@ -1,12 +1,12 @@ -import { Anyone, AuthorizedElementProps } from "../../../Utils/AuthorizeFor"; - -import { ButtonVariant } from "./ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "./HelperComponents"; import { Menu } from "@headlessui/react"; import { DetailedHTMLProps, HTMLAttributes, ReactNode } from "react"; -import { classNames } from "../../../Utils/utils"; -import { useIsAuthorized } from "../../../Common/hooks/useIsAuthorized"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { useIsAuthorized } from "@/Common/hooks/useIsAuthorized"; +import { ButtonVariant } from "@/Components/Common/components/ButtonV2"; +import { DropdownTransition } from "@/Components/Common/components/HelperComponents"; +import { Anyone, AuthorizedElementProps } from "@/Utils/AuthorizeFor"; +import { classNames } from "@/Utils/utils"; interface DropdownMenuProps { id?: string; diff --git a/src/Components/Common/components/Page.tsx b/src/Components/Common/components/Page.tsx index d3ca7e5e009..6598d710ab8 100644 --- a/src/Components/Common/components/Page.tsx +++ b/src/Components/Common/components/Page.tsx @@ -1,6 +1,7 @@ import { RefObject } from "react"; -import PageTitle, { PageTitleProps } from "../PageTitle"; -import { classNames } from "../../../Utils/utils"; + +import PageTitle, { PageTitleProps } from "@/Components/Common/PageTitle"; +import { classNames } from "@/Utils/utils"; interface PageProps extends PageTitleProps { children: any; diff --git a/src/Components/Common/components/SelectMenu.tsx b/src/Components/Common/components/SelectMenu.tsx index 658c23cda25..c453362b6bc 100644 --- a/src/Components/Common/components/SelectMenu.tsx +++ b/src/Components/Common/components/SelectMenu.tsx @@ -1,6 +1,7 @@ -import { Fragment } from "react"; import { Listbox, Transition } from "@headlessui/react"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; +import { Fragment } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; type Props = { options: { diff --git a/src/Components/Common/components/Switch.tsx b/src/Components/Common/components/Switch.tsx index 2253e95d155..469d543a9c7 100644 --- a/src/Components/Common/components/Switch.tsx +++ b/src/Components/Common/components/Switch.tsx @@ -1,4 +1,7 @@ -import { FieldErrorText, FieldLabel } from "../../Form/FormFields/FormField"; +import { + FieldErrorText, + FieldLabel, +} from "@/Components/Form/FormFields/FormField"; type SwitchProps = { name?: string; diff --git a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx index 67ac412c2e0..5c7dba615b6 100644 --- a/src/Components/Common/prescription-builder/InvestigationBuilder.tsx +++ b/src/Components/Common/prescription-builder/InvestigationBuilder.tsx @@ -1,12 +1,10 @@ import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import { - listInvestigationGroups, - listInvestigations, -} from "../../../Redux/actions"; -import { PrescriptionDropdown } from "./PrescriptionDropdown"; -import { PrescriptionMultiDropdown } from "./PrescriptionMultiselect"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { PrescriptionDropdown } from "@/Components/Common/prescription-builder/PrescriptionDropdown"; +import { PrescriptionMultiDropdown } from "@/Components/Common/prescription-builder/PrescriptionMultiselect"; +import { listInvestigationGroups, listInvestigations } from "@/Redux/actions"; export type InvestigationType = { type?: string[]; repetitive?: boolean; diff --git a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx b/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx index 38df147c0bd..6320ba44997 100644 --- a/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx +++ b/src/Components/Common/prescription-builder/PrescriptionDropdown.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef, useState } from "react"; -import { classNames } from "../../../Utils/utils"; + +import { classNames } from "@/Utils/utils"; export function PrescriptionDropdown(props: { options: string[] | number[]; diff --git a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx b/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx index 6eae36a1233..0b0d7563ff6 100644 --- a/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx +++ b/src/Components/Common/prescription-builder/PrescriptionMultiselect.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef, useState } from "react"; -import { classNames } from "../../../Utils/utils"; + +import { classNames } from "@/Utils/utils"; export function PrescriptionMultiDropdown(props: { options: string[]; diff --git a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx b/src/Components/Common/prescription-builder/ProcedureBuilder.tsx index f64eb840685..8509e1388a0 100644 --- a/src/Components/Common/prescription-builder/ProcedureBuilder.tsx +++ b/src/Components/Common/prescription-builder/ProcedureBuilder.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; -import { PrescriptionDropdown } from "./PrescriptionDropdown"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { PrescriptionDropdown } from "@/Components/Common/prescription-builder/PrescriptionDropdown"; export type ProcedureType = { procedure?: string; diff --git a/src/Components/Common/utils/Tooltip.tsx b/src/Components/Common/utils/Tooltip.tsx index 28d68a8111c..eb7cbf9186b 100644 --- a/src/Components/Common/utils/Tooltip.tsx +++ b/src/Components/Common/utils/Tooltip.tsx @@ -1,5 +1,6 @@ import { ReactNode, useState } from "react"; -import { classNames } from "../../../Utils/utils"; + +import { classNames } from "@/Utils/utils"; interface TooltipProps { children: ReactNode; diff --git a/src/Components/CriticalCareRecording/CriticalCare__API.tsx b/src/Components/CriticalCareRecording/CriticalCare__API.tsx index 48b58faa167..0e925165cd4 100644 --- a/src/Components/CriticalCareRecording/CriticalCare__API.tsx +++ b/src/Components/CriticalCareRecording/CriticalCare__API.tsx @@ -1,4 +1,4 @@ -import { fireRequestV2 } from "../../Redux/fireRequest"; +import { fireRequestV2 } from "@/Redux/fireRequest"; export const loadDailyRound = ( consultationId: string, diff --git a/src/Components/DeathReport/DeathReport.tsx b/src/Components/DeathReport/DeathReport.tsx index 9908b4fa852..a453d1dc04d 100644 --- a/src/Components/DeathReport/DeathReport.tsx +++ b/src/Components/DeathReport/DeathReport.tsx @@ -1,19 +1,20 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ +import dayjs from "dayjs"; +import { navigate } from "raviger"; import { useEffect, useState } from "react"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { GENDER_TYPES } from "../../Common/constants"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import DateFormField from "../Form/FormFields/DateFormField"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { formatDateTime } from "../../Utils/utils"; -import Page from "../Common/components/Page"; -import Form from "../Form/Form"; import { useTranslation } from "react-i18next"; -import { navigate } from "raviger"; -import dayjs from "dayjs"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import { GENDER_TYPES } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Page from "@/Components/Common/components/Page"; +import Form from "@/Components/Form/Form"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; type DeathReport = { name?: string; diff --git a/src/Components/ErrorPages/404.tsx b/src/Components/ErrorPages/404.tsx index ebb6b5cb789..ba34a107adc 100644 --- a/src/Components/ErrorPages/404.tsx +++ b/src/Components/ErrorPages/404.tsx @@ -1,8 +1,9 @@ import { Link } from "raviger"; -import * as Notification from "../../Utils/Notifications"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; +import * as Notification from "@/Utils/Notifications"; + export default function Error404() { const { t } = useTranslation(); useEffect(() => { diff --git a/src/Components/ErrorPages/InvalidReset.tsx b/src/Components/ErrorPages/InvalidReset.tsx index a64894bab3c..7755e56f4bd 100644 --- a/src/Components/ErrorPages/InvalidReset.tsx +++ b/src/Components/ErrorPages/InvalidReset.tsx @@ -1,8 +1,9 @@ -import * as Notification from "../../Utils/Notifications"; -import { useEffect } from "react"; import { Link } from "raviger"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; +import * as Notification from "@/Utils/Notifications"; + export default function InvalidReset() { const { t } = useTranslation(); useEffect(() => { diff --git a/src/Components/ErrorPages/SessionExpired.tsx b/src/Components/ErrorPages/SessionExpired.tsx index 25b57e789c9..53e38a08186 100644 --- a/src/Components/ErrorPages/SessionExpired.tsx +++ b/src/Components/ErrorPages/SessionExpired.tsx @@ -1,9 +1,10 @@ -import * as Notification from "../../Utils/Notifications"; import { useNavigate } from "raviger"; import { useContext, useEffect } from "react"; -import { handleSignOut } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import { AuthUserContext } from "../../Common/hooks/useAuthUser"; + +import { AuthUserContext } from "@/Common/hooks/useAuthUser"; +import * as Notification from "@/Utils/Notifications"; +import { handleSignOut } from "@/Utils/utils"; export default function SessionExpired() { const isAuthenticated = !!useContext(AuthUserContext); diff --git a/src/Components/ExternalResult/ExternalResultUpload.tsx b/src/Components/ExternalResult/ExternalResultUpload.tsx index 8f6648c3133..af591d50a32 100644 --- a/src/Components/ExternalResult/ExternalResultUpload.tsx +++ b/src/Components/ExternalResult/ExternalResultUpload.tsx @@ -2,15 +2,17 @@ import { startCase, camelCase } from "lodash-es"; import { navigate } from "raviger"; import { lazy, useState } from "react"; import CSVReader from "react-csv-reader"; -import useConfig from "../../Common/hooks/useConfig"; -import * as Notification from "../../Utils/Notifications.js"; -const PageTitle = lazy(() => import("../Common/PageTitle")); import { useTranslation } from "react-i18next"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { IExternalResult } from "./models"; + +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useConfig from "@/Common/hooks/useConfig"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { IExternalResult } from "@/Components/ExternalResult/models"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; + +const PageTitle = lazy(() => import("../Common/PageTitle")); export default function ExternalResultUpload() { const { sample_format_external_result_import } = useConfig(); diff --git a/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx b/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx index 7239e0b912d..4fd2c3ad990 100644 --- a/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx +++ b/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx @@ -1,9 +1,10 @@ -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; import { useTranslation } from "react-i18next"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { FacilityModel } from "@/Components/Facility/models"; + interface Props { show: boolean; handleOk: () => void; diff --git a/src/Components/ExternalResult/ListFilter.tsx b/src/Components/ExternalResult/ListFilter.tsx index 75358196ffd..8a2468a1937 100644 --- a/src/Components/ExternalResult/ListFilter.tsx +++ b/src/Components/ExternalResult/ListFilter.tsx @@ -1,17 +1,18 @@ -import { useState } from "react"; -import useMergeState from "../../Common/hooks/useMergeState"; +import dayjs from "dayjs"; import { navigate } from "raviger"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { MultiSelectFormField } from "../Form/FormFields/SelectFormField"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import dayjs from "dayjs"; -import { dateQueryString } from "../../Utils/utils"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import Loading from "../Common/Loading"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import useMergeState from "@/Common/hooks/useMergeState"; +import Loading from "@/Components/Common/Loading"; +import DateRangeFormField from "@/Components/Form/FormFields/DateRangeFormField"; +import { MultiSelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString } from "@/Utils/utils"; const clearFilterState = { created_date_before: "", diff --git a/src/Components/ExternalResult/ResultItem.tsx b/src/Components/ExternalResult/ResultItem.tsx index 47363e02ce1..21a632f1d79 100644 --- a/src/Components/ExternalResult/ResultItem.tsx +++ b/src/Components/ExternalResult/ResultItem.tsx @@ -1,12 +1,13 @@ -import { useState, lazy } from "react"; -import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; +import { useState, lazy } from "react"; import { useTranslation } from "react-i18next"; -import Page from "../Common/components/Page"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; + +import Page from "@/Components/Common/components/Page"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/ExternalResult/ResultList.tsx b/src/Components/ExternalResult/ResultList.tsx index d148b26e3f5..137ec47c99d 100644 --- a/src/Components/ExternalResult/ResultList.tsx +++ b/src/Components/ExternalResult/ResultList.tsx @@ -1,21 +1,23 @@ -import ButtonV2 from "../Common/components/ButtonV2"; import { navigate } from "raviger"; import { lazy, useState } from "react"; -import { externalResultList } from "../../Redux/actions"; -import ListFilter from "./ListFilter"; -import FacilitiesSelectDialogue from "./FacilitiesSelectDialogue"; -import { FacilityModel } from "../Facility/models"; -import SearchInput from "../Form/SearchInput"; -import useFilters from "../../Common/hooks/useFilters"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ExportMenu from "../Common/Export"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import CountBlock from "../../CAREUI/display/Count"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import Page from "../Common/components/Page"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { parsePhoneNumber } from "../../Utils/utils"; + +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import useFilters from "@/Common/hooks/useFilters"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import ExportMenu from "@/Components/Common/Export"; +import FacilitiesSelectDialogue from "@/Components/ExternalResult/FacilitiesSelectDialogue"; +import ListFilter from "@/Components/ExternalResult/ListFilter"; +import { FacilityModel } from "@/Components/Facility/models"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import SearchInput from "@/Components/Form/SearchInput"; +import { externalResultList } from "@/Redux/actions"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; +import { parsePhoneNumber } from "@/Utils/utils"; + const Loading = lazy(() => import("../Common/Loading")); export default function ResultList() { diff --git a/src/Components/ExternalResult/ResultUpdate.tsx b/src/Components/ExternalResult/ResultUpdate.tsx index 92d4d63b427..f6f4285423c 100644 --- a/src/Components/ExternalResult/ResultUpdate.tsx +++ b/src/Components/ExternalResult/ResultUpdate.tsx @@ -1,16 +1,18 @@ -import { useCallback, useState, useReducer, lazy } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField.js"; -import CircularProgress from "../Common/components/CircularProgress.js"; -import { SelectFormField } from "../Form/FormFields/SelectFormField.js"; -import RadioFormField from "../Form/FormFields/RadioFormField.js"; import { navigate } from "raviger"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import Page from "../Common/components/Page.js"; -import useQuery from "../../Utils/request/useQuery.js"; -import routes from "../../Redux/api.js"; -import request from "../../Utils/request/request.js"; +import { useCallback, useState, useReducer, lazy } from "react"; + +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request.js"; +import useQuery from "@/Utils/request/useQuery.js"; + +import CircularProgress from "@/Components/Common/components/CircularProgress.js"; +import Page from "@/Components/Common/components/Page.js"; +import RadioFormField from "@/Components/Form/FormFields/RadioFormField.js"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField.js"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField.js"; +import routes from "@/Redux/api.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/AddBedForm.tsx b/src/Components/Facility/AddBedForm.tsx index 3bb49733141..0cc01f07cdf 100644 --- a/src/Components/Facility/AddBedForm.tsx +++ b/src/Components/Facility/AddBedForm.tsx @@ -1,23 +1,24 @@ -import Card from "../../CAREUI/display/Card"; - +import { navigate } from "raviger"; import { useState, useEffect, lazy, SyntheticEvent } from "react"; import { useDispatch } from "react-redux"; + +import Card from "@/CAREUI/display/Card"; +import { LOCATION_BED_TYPES } from "@/Common/constants"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { createFacilityBed, getAnyFacility, getFacilityAssetLocation, getFacilityBed, updateFacilityBed, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { LOCATION_BED_TYPES } from "../../Common/constants"; -import { navigate } from "raviger"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import Page from "../Common/components/Page"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; + const Loading = lazy(() => import("../Common/Loading")); interface BedFormProps { diff --git a/src/Components/Facility/AddInventoryForm.tsx b/src/Components/Facility/AddInventoryForm.tsx index 22be0b9fd0c..6a68451ff8c 100644 --- a/src/Components/Facility/AddInventoryForm.tsx +++ b/src/Components/Facility/AddInventoryForm.tsx @@ -1,21 +1,22 @@ import { useCallback, useReducer, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import Card from "../../CAREUI/display/Card"; -import { statusType, useAbortableEffect } from "../../Common/utils"; + +import Card from "@/CAREUI/display/Card"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { InventoryItemsModel } from "@/Components/Facility/models"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { getItems, postInventory, getAnyFacility, getInventorySummary, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import Page from "../Common/components/Page"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { InventoryItemsModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const Loading = lazy(() => import("../Common/Loading")); const initForm = { diff --git a/src/Components/Facility/AddLocationForm.tsx b/src/Components/Facility/AddLocationForm.tsx index e71b68cc95c..10edcac4739 100644 --- a/src/Components/Facility/AddLocationForm.tsx +++ b/src/Components/Facility/AddLocationForm.tsx @@ -1,17 +1,18 @@ +import { navigate } from "raviger"; import { useState, useEffect, lazy, SyntheticEvent } from "react"; import { useDispatch } from "react-redux"; + +import { Submit, Cancel } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { createFacilityAssetLocation, getAnyFacility, getFacilityAssetLocation, updateFacilityAssetLocation, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import { navigate } from "raviger"; -import { Submit, Cancel } from "../Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import Page from "../Common/components/Page"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/AssetCreate.tsx b/src/Components/Facility/AssetCreate.tsx index 84fc09188d0..f93fcf98be0 100644 --- a/src/Components/Facility/AssetCreate.tsx +++ b/src/Components/Facility/AssetCreate.tsx @@ -1,7 +1,5 @@ -import * as Notification from "../../Utils/Notifications.js"; - -import { AssetClass, AssetData, AssetType } from "../Assets/AssetTypes"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; +import { t } from "i18next"; +import { navigate } from "raviger"; import { LegacyRef, RefObject, @@ -11,34 +9,42 @@ import { useReducer, useState, } from "react"; +import QrReader from "react-qr-reader"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { validateEmailAddress } from "@/Common/validation"; +import { + AssetClass, + AssetData, + AssetType, +} from "@/Components/Assets/AssetTypes"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import SwitchV2 from "@/Components/Common/components/Switch"; +import { LocationSelect } from "@/Components/Common/LocationSelect"; +import { + FieldErrorText, + FieldLabel, +} from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { createAsset, getAsset, listFacilityAssetLocation, updateAsset, -} from "../../Redux/actions"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; -import { LocationSelect } from "../Common/LocationSelect"; -import Page from "../Common/components/Page"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import QrReader from "react-qr-reader"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import SwitchV2 from "../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 { useDispatch } from "react-redux"; -import useVisibility from "../../Utils/useVisibility"; -import { validateEmailAddress } from "../../Common/validation"; -import { dateQueryString, parsePhoneNumber } from "../../Utils/utils.js"; -import dayjs from "../../Utils/dayjs"; -import DateFormField from "../Form/FormFields/DateFormField.js"; -import { t } from "i18next"; +} from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import { parseQueryParams } from "@/Utils/primitives"; +import useVisibility from "@/Utils/useVisibility"; +import { dateQueryString, parsePhoneNumber } from "@/Utils/utils.js"; + +import DateFormField from "@/Components/Form/FormFields/DateFormField.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/BedCapacity.tsx b/src/Components/Facility/BedCapacity.tsx index dba563e5876..ba619b3cf2a 100644 --- a/src/Components/Facility/BedCapacity.tsx +++ b/src/Components/Facility/BedCapacity.tsx @@ -1,19 +1,16 @@ import { useCallback, useEffect, useReducer, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { - createCapacity, - listCapacity, - getCapacityBed, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import { CapacityModal, OptionsType } from "./models"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import useConfig from "../../Common/hooks/useConfig"; -import { getBedTypes } from "../../Common/constants"; + +import { getBedTypes } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { CapacityModal, OptionsType } from "@/Components/Facility/models"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { createCapacity, listCapacity, getCapacityBed } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; interface BedCapacityProps extends CapacityModal { facilityId: string; diff --git a/src/Components/Facility/BedDeleteDialog.tsx b/src/Components/Facility/BedDeleteDialog.tsx index a563b94e849..89b344e2bc9 100644 --- a/src/Components/Facility/BedDeleteDialog.tsx +++ b/src/Components/Facility/BedDeleteDialog.tsx @@ -1,5 +1,6 @@ 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 index 9a33f6141df..aa1c43ebb4d 100644 --- a/src/Components/Facility/BedManagement.tsx +++ b/src/Components/Facility/BedManagement.tsx @@ -1,23 +1,23 @@ -import { lazy, useCallback, useState } from "react"; - +import { lazy, useCallback, useState, ReactElement } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { LOCATION_BED_TYPES } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import Pagination from "@/Components/Common/Pagination"; +import BedDeleteDialog from "@/Components/Facility/BedDeleteDialog"; +import { BedModel } from "@/Components/Facility/models"; import { getAnyFacility, getFacilityAssetLocation, listFacilityBeds, deleteFacilityBed, -} from "../../Redux/actions"; -import Pagination from "../Common/Pagination"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { BedModel } from "./models"; -import { ReactElement } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import { LOCATION_BED_TYPES } from "../../Common/constants"; -import BedDeleteDialog from "./BedDeleteDialog"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Page from "../Common/components/Page"; +} from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications.js"; + const Loading = lazy(() => import("../Common/Loading")); interface BedManagementProps { diff --git a/src/Components/Facility/BedTypeCard.tsx b/src/Components/Facility/BedTypeCard.tsx index 59e0661169d..febcd1a4b6b 100644 --- a/src/Components/Facility/BedTypeCard.tsx +++ b/src/Components/Facility/BedTypeCard.tsx @@ -1,16 +1,17 @@ -import { useState } from "react"; -import * as Notification from "../../Utils/Notifications"; import { animated, config, useSpring } from "@react-spring/web"; -import { useDispatch } from "react-redux"; -import { deleteCapacity } from "../../Redux/actions"; -import { BedCapacity } from "./BedCapacity"; -import DialogModal from "../Common/Dialog"; -import ButtonV2 from "../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 { useState } from "react"; import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import DialogModal from "@/Components/Common/Dialog"; +import { BedCapacity } from "@/Components/Facility/BedCapacity"; +import { deleteCapacity } from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; interface BedTypeCardProps { facilityId?: string; diff --git a/src/Components/Facility/CentralNursingStation.tsx b/src/Components/Facility/CentralNursingStation.tsx index 0d510d8459e..a6efed19c01 100644 --- a/src/Components/Facility/CentralNursingStation.tsx +++ b/src/Components/Facility/CentralNursingStation.tsx @@ -1,29 +1,27 @@ -import { useDispatch } from "react-redux"; -import useFullscreen from "../../Common/hooks/useFullscreen"; -import { Fragment, useContext, useEffect, useState } from "react"; -import { - getPermittedFacility, - listPatientAssetBeds, -} from "../../Redux/actions"; -import HL7PatientVitalsMonitor from "../VitalsMonitor/HL7PatientVitalsMonitor"; -import useFilters from "../../Common/hooks/useFilters"; -import { FacilityModel } from "./models"; -import Loading from "../Common/Loading"; -import Page from "../Common/components/Page"; -import ButtonV2 from "../Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import { LocationSelect } from "../Common/LocationSelect"; -import Pagination from "../Common/Pagination"; -import { SidebarShrinkContext } from "../Common/Sidebar/Sidebar"; -import { PatientAssetBed } from "../Assets/AssetTypes"; import { Popover, Transition } from "@headlessui/react"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; +import { Fragment, useContext, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { SortOption } from "../Common/SortDropdown"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import useVitalsAspectRatioConfig from "../VitalsMonitor/useVitalsAspectRatioConfig"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useFilters from "@/Common/hooks/useFilters"; +import useFullscreen from "@/Common/hooks/useFullscreen"; +import { PatientAssetBed } from "@/Components/Assets/AssetTypes"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import Loading from "@/Components/Common/Loading"; +import { LocationSelect } from "@/Components/Common/LocationSelect"; +import Pagination from "@/Components/Common/Pagination"; +import { SidebarShrinkContext } from "@/Components/Common/Sidebar/Sidebar"; +import { SortOption } from "@/Components/Common/SortDropdown"; +import { FacilityModel } from "@/Components/Facility/models"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import HL7PatientVitalsMonitor from "@/Components/VitalsMonitor/HL7PatientVitalsMonitor"; +import useVitalsAspectRatioConfig from "@/Components/VitalsMonitor/useVitalsAspectRatioConfig"; +import { getPermittedFacility, listPatientAssetBeds } from "@/Redux/actions"; +import { classNames } from "@/Utils/utils"; const PER_PAGE_LIMIT = 6; diff --git a/src/Components/Facility/ConsultationCard.tsx b/src/Components/Facility/ConsultationCard.tsx index 4859b981e8f..c514855aad2 100644 --- a/src/Components/Facility/ConsultationCard.tsx +++ b/src/Components/Facility/ConsultationCard.tsx @@ -1,11 +1,12 @@ import { navigate } from "raviger"; -import { ConsultationModel } from "./models"; -import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; -import useConfig from "../../Common/hooks/useConfig"; -import Chip from "../../CAREUI/display/Chip"; + +import Chip from "@/CAREUI/display/Chip"; +import useConfig from "@/Common/hooks/useConfig"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import RelativeDateUserMention from "@/Components/Common/RelativeDateUserMention"; +import { ConsultationModel } from "@/Components/Facility/models"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import { formatDateTime } from "@/Utils/utils"; interface ConsultationProps { itemData: ConsultationModel; diff --git a/src/Components/Facility/ConsultationClaims.tsx b/src/Components/Facility/ConsultationClaims.tsx index 1a71347ac1c..8b52a76b0e4 100644 --- a/src/Components/Facility/ConsultationClaims.tsx +++ b/src/Components/Facility/ConsultationClaims.tsx @@ -1,13 +1,14 @@ +import { navigate } from "raviger"; import { useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import { HCXActions } from "../../Redux/actions"; -import PageTitle from "../Common/PageTitle"; -import ClaimDetailCard from "../HCX/ClaimDetailCard"; -import CreateClaimCard from "../HCX/CreateClaimCard"; -import { HCXClaimModel } from "../HCX/models"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; -import { navigate } from "raviger"; -import * as Notification from "../../Utils/Notifications"; + +import { useMessageListener } from "@/Common/hooks/useMessageListener"; +import PageTitle from "@/Components/Common/PageTitle"; +import ClaimDetailCard from "@/Components/HCX/ClaimDetailCard"; +import CreateClaimCard from "@/Components/HCX/CreateClaimCard"; +import { HCXClaimModel } from "@/Components/HCX/models"; +import { HCXActions } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications"; interface Props { facilityId: string; diff --git a/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx index cf0ce7bd6af..19728d63ef3 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationABGTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { ABGPlots } from "../Consultations/ABGPlots"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { ABGPlots } from "@/Components/Facility/Consultations/ABGPlots"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx index c3515a80953..17b619fa497 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { DialysisPlots } from "../Consultations/DialysisPlots"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { DialysisPlots } from "@/Components/Facility/Consultations/DialysisPlots"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx index f4fbc08331c..09ba662ade1 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationFeedTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { Feed } from "../Consultations/Feed"; -import { ConsultationTabProps } from "./index"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { Feed } from "@/Components/Facility/Consultations/Feed"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationFilesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationFilesTab.tsx index 754d4bf7b86..0f7854405db 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationFilesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationFilesTab.tsx @@ -1,5 +1,5 @@ -import { ConsultationTabProps } from "./index"; -import { FileUpload } from "../../Patient/FileUpload"; +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { FileUpload } from "@/Components/Patient/FileUpload"; export const ConsultationFilesTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx index 69b11a30ed5..ebbd18284af 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx @@ -1,11 +1,12 @@ -import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import { navigate } from "raviger"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import InvestigationTab from "../Investigations/investigationsTab"; import { t } from "i18next"; +import { navigate } from "raviger"; +import { lazy } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import InvestigationTab from "@/Components/Facility/Investigations/investigationsTab"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; const PageTitle = lazy(() => import("../../Common/PageTitle")); export const ConsultationInvestigationsTab = (props: ConsultationTabProps) => { diff --git a/src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx index e1e72c2f936..cb7b10d5293 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx @@ -1,6 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import PageTitle from "../../Common/PageHeadTitle"; -import MedicineAdministrationSheet from "../../Medicine/MedicineAdministrationSheet"; +import PageTitle from "@/Components/Common/PageHeadTitle"; +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import MedicineAdministrationSheet from "@/Components/Medicine/MedicineAdministrationSheet"; export const ConsultationMedicinesTab = (props: ConsultationTabProps) => { return ( diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx index 85f34f0ec63..87d71efff93 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { NeurologicalTable } from "../Consultations/NeurologicalTables"; -import { ConsultationTabProps } from "./index"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { NeurologicalTable } from "@/Components/Facility/Consultations/NeurologicalTables"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx index 721ee18d13e..180602de1ad 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationNursingTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { NursingPlot } from "../Consultations/NursingPlot"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { NursingPlot } from "@/Components/Facility/Consultations/NursingPlot"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx index 74e250f0577..e52b027f980 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { NutritionPlots } from "../Consultations/NutritionPlots"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { NutritionPlots } from "@/Components/Facility/Consultations/NutritionPlots"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx index 05327ca6870..63a5860e3ea 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { PressureSoreDiagrams } from "../Consultations/PressureSoreDiagrams"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { PressureSoreDiagrams } from "@/Components/Facility/Consultations/PressureSoreDiagrams"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx index 69d20dd64c9..f4e279f2510 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { PrimaryParametersPlot } from "../Consultations/PrimaryParametersPlot"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { PrimaryParametersPlot } from "@/Components/Facility/Consultations/PrimaryParametersPlot"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 2c9b8631077..55803d0cb28 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -1,18 +1,23 @@ import { lazy, useEffect, useState } from "react"; -import { ConsultationTabProps } from "./index"; -import { AssetBedModel, AssetClass, AssetData } from "../../Assets/AssetTypes"; import { useDispatch } from "react-redux"; -import { getPermittedFacility, listAssetBeds } from "../../../Redux/actions"; -import { BedModel, FacilityModel } from "../models"; -import HL7PatientVitalsMonitor from "../../VitalsMonitor/HL7PatientVitalsMonitor"; -import VentilatorPatientVitalsMonitor from "../../VitalsMonitor/VentilatorPatientVitalsMonitor"; -import useVitalsAspectRatioConfig from "../../VitalsMonitor/useVitalsAspectRatioConfig"; -import { DISCHARGE_REASONS, SYMPTOM_CHOICES } from "../../../Common/constants"; -import PrescriptionsTable from "../../Medicine/PrescriptionsTable"; -import Chip from "../../../CAREUI/display/Chip"; -import { formatAge, formatDate, formatDateTime } from "../../../Utils/utils"; -import ReadMore from "../../Common/components/Readmore"; -import { DailyRoundsList } from "../Consultations/DailyRoundsList"; + +import Chip from "@/CAREUI/display/Chip"; +import { DISCHARGE_REASONS, SYMPTOM_CHOICES } from "@/Common/constants"; +import { + AssetBedModel, + AssetClass, + AssetData, +} from "@/Components/Assets/AssetTypes"; +import ReadMore from "@/Components/Common/components/Readmore"; +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { DailyRoundsList } from "@/Components/Facility/Consultations/DailyRoundsList"; +import { BedModel, FacilityModel } from "@/Components/Facility/models"; +import PrescriptionsTable from "@/Components/Medicine/PrescriptionsTable"; +import HL7PatientVitalsMonitor from "@/Components/VitalsMonitor/HL7PatientVitalsMonitor"; +import useVitalsAspectRatioConfig from "@/Components/VitalsMonitor/useVitalsAspectRatioConfig"; +import VentilatorPatientVitalsMonitor from "@/Components/VitalsMonitor/VentilatorPatientVitalsMonitor"; +import { getPermittedFacility, listAssetBeds } from "@/Redux/actions"; +import { formatAge, formatDate, formatDateTime } from "@/Utils/utils"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx index d14b54cc096..fc7c68eb526 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx @@ -1,6 +1,7 @@ import { lazy } from "react"; -import { ConsultationTabProps } from "./index"; -import { VentilatorPlot } from "../Consultations/VentilatorPlot"; + +import { ConsultationTabProps } from "@/Components/Facility/ConsultationDetails/index"; +import { VentilatorPlot } from "@/Components/Facility/Consultations/VentilatorPlot"; const PageTitle = lazy(() => import("../../Common/PageTitle")); diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index 01a5f02b7b1..bca4b57006f 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -1,66 +1,72 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { navigate } from "raviger"; +import { + LegacyRef, + createRef, + lazy, + useCallback, + useEffect, + useState, +} from "react"; +import { useDispatch } from "react-redux"; -import { BedModel, FacilityModel, ICD11DiagnosisModel } from "./models"; +import CareIcon from "@/CAREUI/icons/CareIcon"; import { CONSULTATION_STATUS, CONSULTATION_SUGGESTION, PATIENT_CATEGORIES, REVIEW_AT_CHOICES, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useConfig from "@/Common/hooks/useConfig"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { BedSelect } from "@/Components/Common/BedSelect"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { DiagnosisSelectFormField } from "@/Components/Common/DiagnosisSelectFormField"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; import InvestigationBuilder, { InvestigationType, -} from "../Common/prescription-builder/InvestigationBuilder"; -import { - LegacyRef, - createRef, - lazy, - useCallback, - useEffect, - useState, -} from "react"; +} from "@/Components/Common/prescription-builder/InvestigationBuilder"; import ProcedureBuilder, { ProcedureType, -} from "../Common/prescription-builder/ProcedureBuilder"; +} from "@/Components/Common/prescription-builder/ProcedureBuilder"; +import { SymptomsSelect } from "@/Components/Common/SymptomsSelect"; +import UserAutocompleteFormField from "@/Components/Common/UserAutocompleteFormField"; +import Beds from "@/Components/Facility/Consultations/Beds"; +import { + BedModel, + FacilityModel, + ICD11DiagnosisModel, +} from "@/Components/Facility/models"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import { + FieldErrorText, + FieldLabel, +} from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { + FieldChangeEvent, + FieldChangeEventHandler, +} from "@/Components/Form/FormFields/Utils"; +import { FormAction } from "@/Components/Form/Utils"; +import PatientCategorySelect from "@/Components/Patient/PatientCategorySelect"; +import { UserModel } from "@/Components/Users/models"; import { createConsultation, getConsultation, getPatient, updateConsultation, -} from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; - -import { BedSelect } from "../Common/BedSelect"; -import Beds from "./Consultations/Beds"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import DateFormField from "../Form/FormFields/DateFormField"; -import { DiagnosisSelectFormField } from "../Common/DiagnosisSelectFormField"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { - FieldChangeEvent, - FieldChangeEventHandler, -} from "../Form/FormFields/Utils"; -import { FormAction } from "../Form/Utils"; -import PatientCategorySelect from "../Patient/PatientCategorySelect"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { SymptomsSelect } from "../Common/SymptomsSelect"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import UserAutocompleteFormField from "../Common/UserAutocompleteFormField"; -import { UserModel } from "../Users/models"; -import { dischargePatient } from "../../Redux/actions"; - -import { navigate } from "raviger"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import useVisibility from "../../Utils/useVisibility"; -import dayjs from "../../Utils/dayjs"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete.js"; + dischargePatient, +} from "@/Redux/actions"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import useVisibility from "@/Utils/useVisibility"; + +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete.js"; const Loading = lazy(() => import("../Common/Loading")); const PageTitle = lazy(() => import("../Common/PageTitle")); diff --git a/src/Components/Facility/Consultations/ABGPlots.tsx b/src/Components/Facility/Consultations/ABGPlots.tsx index 3cb4daa981c..b69197f1267 100644 --- a/src/Components/Facility/Consultations/ABGPlots.tsx +++ b/src/Components/Facility/Consultations/ABGPlots.tsx @@ -1,11 +1,12 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import { LinePlot } from "./components/LinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; -import { formatDateTime } from "../../../Utils/utils"; + +import { PAGINATION_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import { LinePlot } from "@/Components/Facility/Consultations/components/LinePlot"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; export const ABGPlots = (props: any) => { const { consultationId } = props; diff --git a/src/Components/Facility/Consultations/Beds.tsx b/src/Components/Facility/Consultations/Beds.tsx index 757c19c788a..ddf0b540cf7 100644 --- a/src/Components/Facility/Consultations/Beds.tsx +++ b/src/Components/Facility/Consultations/Beds.tsx @@ -1,32 +1,29 @@ -import * as Notification from "../../../Utils/Notifications.js"; - -import { BedModel, CurrentBed } from "../models"; +import { Link } from "raviger"; import { Dispatch, SetStateAction, useCallback, useState } from "react"; -import { - createConsultationBed, - listConsultationBeds, -} from "../../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; - -import { BedSelect } from "../../Common/BedSelect"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import CircularProgress from "../../Common/components/CircularProgress.js"; -import { FieldLabel } from "../../Form/FormFields/FormField"; -import Loading from "../../Common/Loading"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import { formatDateTime } from "../../../Utils/utils"; import { useDispatch } from "react-redux"; -import dayjs from "../../../Utils/dayjs"; -import { AssetSelect } from "../../Common/AssetSelect.js"; -import DialogModal from "../../Common/Dialog.js"; -import { Link } from "raviger"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { BedSelect } from "@/Components/Common/BedSelect"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Loading from "@/Components/Common/Loading"; +import { BedModel, CurrentBed } from "@/Components/Facility/models"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { createConsultationBed, listConsultationBeds } from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatDateTime } from "@/Utils/utils"; + +import Chip from "@/CAREUI/display/Chip.js"; import { AssetClass, AssetData, assetClassProps, -} from "../../Assets/AssetTypes.js"; -import Chip from "../../../CAREUI/display/Chip.js"; +} from "@/Components/Assets/AssetTypes.js"; +import { AssetSelect } from "@/Components/Common/AssetSelect.js"; +import CircularProgress from "@/Components/Common/components/CircularProgress.js"; +import DialogModal from "@/Components/Common/Dialog.js"; interface BedsProps { facilityId: string; diff --git a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index 63b5087cff8..751ec6661b4 100644 --- a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -1,9 +1,10 @@ import { useTranslation } from "react-i18next"; -import RecordMeta from "../../../../CAREUI/display/RecordMeta"; -import CareIcon from "../../../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../../../Common/components/ButtonV2"; -import { DailyRoundsModel } from "../../../Patient/models"; -import LogUpdateCardAttribute from "./LogUpdateCardAttribute"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import LogUpdateCardAttribute from "@/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute"; +import { DailyRoundsModel } from "@/Components/Patient/models"; interface Props { round: DailyRoundsModel; diff --git a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index a5bdd26c09c..da15a118f28 100644 --- a/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -1,5 +1,5 @@ -import PatientCategoryBadge from "../../../Common/PatientCategoryBadge"; -import { DailyRoundsModel } from "../../../Patient/models"; +import PatientCategoryBadge from "@/Components/Common/PatientCategoryBadge"; +import { DailyRoundsModel } from "@/Components/Patient/models"; interface Props { attributeKey: T; diff --git a/src/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx b/src/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx index 00f33790675..bc6b0721716 100644 --- a/src/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx @@ -1,8 +1,9 @@ import { useTranslation } from "react-i18next"; -import RecordMeta from "../../../../CAREUI/display/RecordMeta"; -import CareIcon from "../../../../CAREUI/icons/CareIcon"; -import { DailyRoundsModel } from "../../../Patient/models"; -import LogUpdateCardAttribute from "./LogUpdateCardAttribute"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import LogUpdateCardAttribute from "@/Components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute"; +import { DailyRoundsModel } from "@/Components/Patient/models"; // TODO: remove this method once events module is ready const getDeepDiff = (a: any, b?: any): Partial => { diff --git a/src/Components/Facility/Consultations/DailyRoundsList.tsx b/src/Components/Facility/Consultations/DailyRoundsList.tsx index 0ec84a0cc87..0f755a38ce9 100644 --- a/src/Components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/Components/Facility/Consultations/DailyRoundsList.tsx @@ -1,14 +1,15 @@ import { navigate } from "raviger"; import { useCallback, useState } from "react"; -import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { getDailyReport } from "../../../Redux/actions"; -import Pagination from "../../Common/Pagination"; -import { DailyRoundsModel } from "../../Patient/models"; -import VirtualNursingAssistantLogUpdateCard from "./DailyRounds/VirtualNursingAssistantLogUpdateCard"; -import DefaultLogUpdateCard from "./DailyRounds/DefaultLogUpdateCard"; import { useTranslation } from "react-i18next"; -import LoadingLogUpdateCard from "./DailyRounds/LoadingCard"; +import { useDispatch } from "react-redux"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import DefaultLogUpdateCard from "@/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard"; +import LoadingLogUpdateCard from "@/Components/Facility/Consultations/DailyRounds/LoadingCard"; +import VirtualNursingAssistantLogUpdateCard from "@/Components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard"; +import { DailyRoundsModel } from "@/Components/Patient/models"; +import { getDailyReport } from "@/Redux/actions"; export const DailyRoundsList = (props: any) => { const { t } = useTranslation(); diff --git a/src/Components/Facility/Consultations/DialysisPlots.tsx b/src/Components/Facility/Consultations/DialysisPlots.tsx index 4830af3abf0..3b078282020 100644 --- a/src/Components/Facility/Consultations/DialysisPlots.tsx +++ b/src/Components/Facility/Consultations/DialysisPlots.tsx @@ -1,11 +1,12 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import { LinePlot } from "./components/LinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; -import { formatDateTime } from "../../../Utils/utils"; + +import { PAGINATION_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import { LinePlot } from "@/Components/Facility/Consultations/components/LinePlot"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; export const DialysisPlots = (props: any) => { const { consultationId } = props; diff --git a/src/Components/Facility/Consultations/Feed.tsx b/src/Components/Facility/Consultations/Feed.tsx index ac39be325e9..874f601d182 100644 --- a/src/Components/Facility/Consultations/Feed.tsx +++ b/src/Components/Facility/Consultations/Feed.tsx @@ -1,38 +1,34 @@ -import * as Notification from "../../../Utils/Notifications.js"; +import { useCallback, useEffect, useRef, useState } from "react"; +import ReactPlayer from "react-player"; +import { useDispatch } from "react-redux"; +import useKeyboardShortcut from "use-keyboard-shortcut"; -import { - CAMERA_STATES, - CameraPTZ, - getCameraPTZ, -} from "../../../Common/constants"; +import { CAMERA_STATES, CameraPTZ, getCameraPTZ } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser.js"; +import { PTZState, useFeedPTZ } from "@/Common/hooks/useFeedPTZ"; +import useFullscreen from "@/Common/hooks/useFullscreen.js"; +import { useHLSPLayer } from "@/Common/hooks/useHLSPlayer"; import { ICameraAssetState, StreamStatus, useMSEMediaPlayer, -} from "../../../Common/hooks/useMSEplayer"; -import { PTZState, useFeedPTZ } from "../../../Common/hooks/useFeedPTZ"; -import { useCallback, useEffect, useRef, useState } from "react"; +} from "@/Common/hooks/useMSEplayer"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Loading from "@/Components/Common/Loading"; +import FeedButton from "@/Components/Facility/Consultations/FeedButton"; +import { ConsultationModel } from "@/Components/Facility/models"; import { getConsultation, getPermittedFacility, listAssetBeds, partialUpdateAssetBed, -} from "../../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { classNames } from "@/Utils/utils"; -import CareIcon from "../../../CAREUI/icons/CareIcon.js"; -import { ConsultationModel } from "../models"; -import FeedButton from "./FeedButton"; -import Loading from "../../Common/Loading"; -import ReactPlayer from "react-player"; -import { classNames } from "../../../Utils/utils"; -import { useDispatch } from "react-redux"; -import { useHLSPLayer } from "../../../Common/hooks/useHLSPlayer"; -import useKeyboardShortcut from "use-keyboard-shortcut"; -import useFullscreen from "../../../Common/hooks/useFullscreen.js"; -import { triggerGoal } from "../../../Integrations/Plausible.js"; -import useAuthUser from "../../../Common/hooks/useAuthUser.js"; -import Spinner from "../../Common/Spinner.js"; +import CareIcon from "@/CAREUI/icons/CareIcon.js"; +import Spinner from "@/Components/Common/Spinner.js"; +import { triggerGoal } from "@/Integrations/Plausible.js"; interface IFeedProps { facilityId: string; diff --git a/src/Components/Facility/Consultations/FeedButton.tsx b/src/Components/Facility/Consultations/FeedButton.tsx index 81500b89f80..0d9cdff26af 100644 --- a/src/Components/Facility/Consultations/FeedButton.tsx +++ b/src/Components/Facility/Consultations/FeedButton.tsx @@ -1,6 +1,6 @@ -import { CameraPTZ } from "../../../Common/constants"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { classNames } from "../../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { CameraPTZ } from "@/Common/constants"; +import { classNames } from "@/Utils/utils"; export default function FeedButton(props: { camProp: any; diff --git a/src/Components/Facility/Consultations/LiveFeed.tsx b/src/Components/Facility/Consultations/LiveFeed.tsx index aba473e958d..1b3e27ae738 100644 --- a/src/Components/Facility/Consultations/LiveFeed.tsx +++ b/src/Components/Facility/Consultations/LiveFeed.tsx @@ -1,28 +1,26 @@ +import { AxiosError } from "axios"; import { useEffect, useState, useRef } from "react"; import { useDispatch } from "react-redux"; import useKeyboardShortcut from "use-keyboard-shortcut"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { getCameraPTZ } from "@/Common/constants"; +import { useFeedPTZ } from "@/Common/hooks/useFeedPTZ"; +import useFullscreen from "@/Common/hooks/useFullscreen"; +import { StreamStatus, useMSEMediaPlayer } from "@/Common/hooks/useMSEplayer"; +import useWindowDimensions from "@/Common/hooks/useWindowDimensions"; +import { BedSelect } from "@/Components/Common/BedSelect"; +import Page from "@/Components/Common/components/Page"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import { FeedCameraPTZHelpButton } from "@/Components/Facility/Consultations/Feed"; +import { BedModel } from "@/Components/Facility/models"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; import { listAssetBeds, partialUpdateAssetBed, deleteAssetBed, -} from "../../../Redux/actions"; -import { getCameraPTZ } from "../../../Common/constants"; -import { - StreamStatus, - useMSEMediaPlayer, -} from "../../../Common/hooks/useMSEplayer"; -import { useFeedPTZ } from "../../../Common/hooks/useFeedPTZ"; -import * as Notification from "../../../Utils/Notifications.js"; -import { FeedCameraPTZHelpButton } from "./Feed"; -import { AxiosError } from "axios"; -import { BedSelect } from "../../Common/BedSelect"; -import { BedModel } from "../models"; -import useWindowDimensions from "../../../Common/hooks/useWindowDimensions"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import Page from "../../Common/components/Page"; -import ConfirmDialog from "../../Common/ConfirmDialog"; -import { FieldLabel } from "../../Form/FormFields/FormField"; -import useFullscreen from "../../../Common/hooks/useFullscreen"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const LiveFeed = (props: any) => { const middlewareHostname = diff --git a/src/Components/Facility/Consultations/NeurologicalTables.tsx b/src/Components/Facility/Consultations/NeurologicalTables.tsx index 36fae175480..9431bcb7bdc 100644 --- a/src/Components/Facility/Consultations/NeurologicalTables.tsx +++ b/src/Components/Facility/Consultations/NeurologicalTables.tsx @@ -1,15 +1,16 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import Pagination from "../../Common/Pagination"; + import { PAGINATION_LIMIT, EYE_OPEN_SCALE, VERBAL_RESPONSE_SCALE, MOTOR_RESPONSE_SCALE, -} from "../../../Common/constants"; -import { formatDateTime } from "../../../Utils/utils"; +} from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; const DataTable = (props: any) => { const { title, data } = props; diff --git a/src/Components/Facility/Consultations/NursingPlot.tsx b/src/Components/Facility/Consultations/NursingPlot.tsx index a5d129f68e3..9b8a29a46f9 100644 --- a/src/Components/Facility/Consultations/NursingPlot.tsx +++ b/src/Components/Facility/Consultations/NursingPlot.tsx @@ -1,13 +1,11 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { - NURSING_CARE_FIELDS, - PAGINATION_LIMIT, -} from "../../../Common/constants"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import Pagination from "../../Common/Pagination"; -import { formatDateTime } from "../../../Utils/utils"; + +import { NURSING_CARE_FIELDS, PAGINATION_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; export const NursingPlot = (props: any) => { const { consultationId } = props; diff --git a/src/Components/Facility/Consultations/NutritionPlots.tsx b/src/Components/Facility/Consultations/NutritionPlots.tsx index 07dd6422555..d9819f0b339 100644 --- a/src/Components/Facility/Consultations/NutritionPlots.tsx +++ b/src/Components/Facility/Consultations/NutritionPlots.tsx @@ -1,13 +1,14 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import { LinePlot } from "./components/LinePlot"; -import { StackedLinePlot } from "./components/StackedLinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { PAGINATION_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import { LinePlot } from "@/Components/Facility/Consultations/components/LinePlot"; +import { StackedLinePlot } from "@/Components/Facility/Consultations/components/StackedLinePlot"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; export const NutritionPlots = (props: any) => { const { consultationId } = props; diff --git a/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx b/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx index f7d74a024a1..252def1d157 100644 --- a/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx +++ b/src/Components/Facility/Consultations/PrimaryParametersPlot.tsx @@ -1,16 +1,17 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import { LinePlot } from "./components/LinePlot"; -import { StackedLinePlot } from "./components/StackedLinePlot"; -import Pagination from "../../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 "../../Common/PageTitle"; -import dayjs from "../../../Utils/dayjs"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { PAGINATION_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import PageTitle from "@/Components/Common/PageTitle"; +import Pagination from "@/Components/Common/Pagination"; +import { LinePlot } from "@/Components/Facility/Consultations/components/LinePlot"; +import { StackedLinePlot } from "@/Components/Facility/Consultations/components/StackedLinePlot"; +import { PainDiagrams } from "@/Components/Facility/Consultations/PainDiagrams"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import { formatDateTime } from "@/Utils/utils"; interface PrimaryParametersPlotProps { facilityId: string; diff --git a/src/Components/Facility/Consultations/VentilatorPlot.tsx b/src/Components/Facility/Consultations/VentilatorPlot.tsx index c1800823b66..bee02639a51 100644 --- a/src/Components/Facility/Consultations/VentilatorPlot.tsx +++ b/src/Components/Facility/Consultations/VentilatorPlot.tsx @@ -1,12 +1,13 @@ import { useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { dailyRoundsAnalyse } from "../../../Redux/actions"; -import { LinePlot } from "./components/LinePlot"; -import Pagination from "../../Common/Pagination"; -import { PAGINATION_LIMIT } from "../../../Common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import BinaryChronologicalChart from "./components/BinaryChronologicalChart"; + +import { PAGINATION_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; +import BinaryChronologicalChart from "@/Components/Facility/Consultations/components/BinaryChronologicalChart"; +import { LinePlot } from "@/Components/Facility/Consultations/components/LinePlot"; +import { dailyRoundsAnalyse } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; /* interface ModalityType { diff --git a/src/Components/Facility/Consultations/components/BinaryChronologicalChart.tsx b/src/Components/Facility/Consultations/components/BinaryChronologicalChart.tsx index e7b98b57b1e..7c9f7ac278b 100644 --- a/src/Components/Facility/Consultations/components/BinaryChronologicalChart.tsx +++ b/src/Components/Facility/Consultations/components/BinaryChronologicalChart.tsx @@ -1,5 +1,5 @@ -import CareIcon from "../../../../CAREUI/icons/CareIcon"; -import { formatDateTime } from "../../../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { formatDateTime } from "@/Utils/utils"; export default function BinaryChronologicalChart(props: { data: { diff --git a/src/Components/Facility/Consultations/components/LinePlot.tsx b/src/Components/Facility/Consultations/components/LinePlot.tsx index 92e3afcec61..8c450d4acea 100644 --- a/src/Components/Facility/Consultations/components/LinePlot.tsx +++ b/src/Components/Facility/Consultations/components/LinePlot.tsx @@ -1,4 +1,3 @@ -import ReactEchartsCore from "echarts-for-react/lib/core"; import { BarChart, LineChart } from "echarts/charts"; import { DataZoomComponent, @@ -10,9 +9,9 @@ import { VisualMapComponent, VisualMapPiecewiseComponent, } from "echarts/components"; - import * as echarts from "echarts/core"; import { CanvasRenderer } from "echarts/renderers"; +import ReactEchartsCore from "echarts-for-react/lib/core"; echarts.use([ BarChart, LineChart, diff --git a/src/Components/Facility/Consultations/components/StackedLinePlot.tsx b/src/Components/Facility/Consultations/components/StackedLinePlot.tsx index 1dedb2e38a9..d317f830bd6 100644 --- a/src/Components/Facility/Consultations/components/StackedLinePlot.tsx +++ b/src/Components/Facility/Consultations/components/StackedLinePlot.tsx @@ -1,4 +1,3 @@ -import ReactEchartsCore from "echarts-for-react/lib/core"; import { BarChart, LineChart } from "echarts/charts"; import { DataZoomComponent, @@ -10,9 +9,9 @@ import { VisualMapComponent, VisualMapPiecewiseComponent, } from "echarts/components"; - import * as echarts from "echarts/core"; import { CanvasRenderer } from "echarts/renderers"; +import ReactEchartsCore from "echarts-for-react/lib/core"; echarts.use([ BarChart, LineChart, diff --git a/src/Components/Facility/CoverImageEditModal.tsx b/src/Components/Facility/CoverImageEditModal.tsx index 988bc288f58..6c2511d8697 100644 --- a/src/Components/Facility/CoverImageEditModal.tsx +++ b/src/Components/Facility/CoverImageEditModal.tsx @@ -6,20 +6,24 @@ import { useRef, useState, } from "react"; +import { useTranslation } from "react-i18next"; import { useDispatch } from "react-redux"; -import { deleteFacilityCoverImage } from "../../Redux/actions"; -import { Success } from "../../Utils/Notifications"; -import useDragAndDrop from "../../Utils/useDragAndDrop"; -import { sleep } from "../../Utils/utils"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; import Webcam from "react-webcam"; -import { FacilityModel } from "./models"; -import useWindowDimensions from "../../Common/hooks/useWindowDimensions"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import * as Notification from "../../Utils/Notifications.js"; -import { useTranslation } from "react-i18next"; -import { LocalStorageKeys } from "../../Common/constants"; -import DialogModal from "../Common/Dialog"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { LocalStorageKeys } from "@/Common/constants"; +import useWindowDimensions from "@/Common/hooks/useWindowDimensions"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { FacilityModel } from "@/Components/Facility/models"; +import { deleteFacilityCoverImage } from "@/Redux/actions"; +import { Success } from "@/Utils/Notifications"; +import * as Notification from "@/Utils/Notifications.js"; +import useDragAndDrop from "@/Utils/useDragAndDrop"; +import { sleep } from "@/Utils/utils"; interface Props { open: boolean; onClose: (() => void) | undefined; diff --git a/src/Components/Facility/DischargeModal.tsx b/src/Components/Facility/DischargeModal.tsx index 138e74fb9b9..ff3a72a15ea 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/Components/Facility/DischargeModal.tsx @@ -1,31 +1,28 @@ -import * as Notification from "../../Utils/Notifications"; - -import { Cancel, Submit } from "../Common/components/ButtonV2"; import { useCallback, useEffect, useState } from "react"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ClaimDetailCard from "../HCX/ClaimDetailCard"; -import { ConsultationModel } from "./models"; -import CreateClaimCard from "../HCX/CreateClaimCard"; -import { DISCHARGE_REASONS } from "../../Common/constants"; -import DateFormField from "../Form/FormFields/DateFormField"; -import DialogModal from "../Common/Dialog"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { HCXActions } from "../../Redux/actions"; -import { HCXClaimModel } from "../HCX/models"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { dischargePatient } from "../../Redux/actions"; -import useConfig from "../../Common/hooks/useConfig"; import { useDispatch } from "react-redux"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; -import PrescriptionBuilder from "../Medicine/PrescriptionBuilder"; -import CircularProgress from "../Common/components/CircularProgress"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FacilityModel } from "./models"; -import dayjs from "../../Utils/dayjs"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { DISCHARGE_REASONS } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import { useMessageListener } from "@/Common/hooks/useMessageListener"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import DialogModal from "@/Components/Common/Dialog"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { ConsultationModel, FacilityModel } from "@/Components/Facility/models"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import ClaimDetailCard from "@/Components/HCX/ClaimDetailCard"; +import CreateClaimCard from "@/Components/HCX/CreateClaimCard"; +import { HCXClaimModel } from "@/Components/HCX/models"; +import PrescriptionBuilder from "@/Components/Medicine/PrescriptionBuilder"; +import { HCXActions, dischargePatient } from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications"; interface PreDischargeFormInterface { discharge_reason: string; diff --git a/src/Components/Facility/DischargeSummaryModal.tsx b/src/Components/Facility/DischargeSummaryModal.tsx index 36e2de8a591..1132e84b57a 100644 --- a/src/Components/Facility/DischargeSummaryModal.tsx +++ b/src/Components/Facility/DischargeSummaryModal.tsx @@ -1,23 +1,24 @@ import { useState } from "react"; -import DialogModal from "../Common/Dialog"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { ConsultationModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { ConsultationModel } from "@/Components/Facility/models"; import { EmailValidator, MultiValidator, RequiredFieldValidator, -} from "../Form/FieldValidators"; -import { useDispatch } from "react-redux"; +} from "@/Components/Form/FieldValidators"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { emailDischargeSummary, generateDischargeSummary, -} from "../../Redux/actions"; -import { Error, Success } from "../../Utils/Notifications"; -import { previewDischargeSummary } from "../../Redux/actions"; -import { useTranslation } from "react-i18next"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; + previewDischargeSummary, +} from "@/Redux/actions"; +import { Error, Success } from "@/Utils/Notifications"; interface Props { show: boolean; diff --git a/src/Components/Facility/DoctorCapacity.tsx b/src/Components/Facility/DoctorCapacity.tsx index 6c7baafaad8..872df5e30b5 100644 --- a/src/Components/Facility/DoctorCapacity.tsx +++ b/src/Components/Facility/DoctorCapacity.tsx @@ -1,15 +1,19 @@ import { useCallback, useEffect, useReducer, useState } from "react"; import { useDispatch } from "react-redux"; -import { DOCTOR_SPECIALIZATION } from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { createDoctor, getDoctor, listDoctor } from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import ButtonV2, { Cancel } from "../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, OptionsType } from "./models"; + +import { DOCTOR_SPECIALIZATION } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2, { Cancel } from "@/Components/Common/components/ButtonV2"; +import { DoctorModal, OptionsType } from "@/Components/Facility/models"; +import { + FieldErrorText, + FieldLabel, +} from "@/Components/Form/FormFields/FormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEventHandler } from "@/Components/Form/FormFields/Utils"; +import SelectMenuV2 from "@/Components/Form/SelectMenuV2"; +import { createDoctor, getDoctor, listDoctor } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; interface DoctorCapacityProps extends DoctorModal { facilityId: string; diff --git a/src/Components/Facility/DoctorVideoSlideover.tsx b/src/Components/Facility/DoctorVideoSlideover.tsx index 59c443cb64e..e6f73e1b7a6 100644 --- a/src/Components/Facility/DoctorVideoSlideover.tsx +++ b/src/Components/Facility/DoctorVideoSlideover.tsx @@ -1,11 +1,11 @@ import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import { getFacilityUsers } from "../../Redux/actions"; -import { UserAssignedModel } from "../Users/models"; -import { SkillObjectModel } from "../Users/models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { relativeTime } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import { UserAssignedModel, SkillObjectModel } from "@/Components/Users/models"; +import { getFacilityUsers } from "@/Redux/actions"; +import { relativeTime } from "@/Utils/utils"; export default function DoctorVideoSlideover(props: { show: boolean; diff --git a/src/Components/Facility/DoctorsCountCard.tsx b/src/Components/Facility/DoctorsCountCard.tsx index ee15d7a2c9d..afcd4d6730e 100644 --- a/src/Components/Facility/DoctorsCountCard.tsx +++ b/src/Components/Facility/DoctorsCountCard.tsx @@ -1,15 +1,16 @@ import { useState } from "react"; -import { DoctorModal } from "./models"; -import { DOCTOR_SPECIALIZATION } from "../../Common/constants"; import { useDispatch } from "react-redux"; -import { deleteDoctor } from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications"; -import { DoctorIcon } from "../TeleIcu/Icons/DoctorIcon"; -import { DoctorCapacity } from "./DoctorCapacity"; -import DialogModal from "../Common/Dialog"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; + +import { DOCTOR_SPECIALIZATION } from "@/Common/constants"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import DialogModal from "@/Components/Common/Dialog"; +import { DoctorCapacity } from "@/Components/Facility/DoctorCapacity"; +import { DoctorModal } from "@/Components/Facility/models"; +import { DoctorIcon } from "@/Components/TeleIcu/Icons/DoctorIcon"; +import { deleteDoctor } from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; interface DoctorsCountProps extends DoctorModal { facilityId: string; diff --git a/src/Components/Facility/DuplicatePatientDialog.tsx b/src/Components/Facility/DuplicatePatientDialog.tsx index 46eb4e2dd7a..c6dffeba804 100644 --- a/src/Components/Facility/DuplicatePatientDialog.tsx +++ b/src/Components/Facility/DuplicatePatientDialog.tsx @@ -1,7 +1,8 @@ import { useState } from "react"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; -import { DupPatientModel } from "./models"; + +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { DupPatientModel } from "@/Components/Facility/models"; interface Props { patientList: Array; diff --git a/src/Components/Facility/FacilityCard.tsx b/src/Components/Facility/FacilityCard.tsx index d8c8baeb802..de9936ee731 100644 --- a/src/Components/Facility/FacilityCard.tsx +++ b/src/Components/Facility/FacilityCard.tsx @@ -1,19 +1,21 @@ -import { useState } from "react"; -import { useDispatch } from "react-redux"; import { Link } from "raviger"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; -import { sendNotificationMessages } from "../../Redux/actions"; -import { FACILITY_FEATURE_TYPES } from "../../Common/constants"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import * as Notification from "../../Utils/Notifications.js"; -import Chip from "../../CAREUI/display/Chip"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { formatPhoneNumber, parsePhoneNumber } from "../../Utils/utils"; -import DialogModal from "../Common/Dialog"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import useConfig from "../../Common/hooks/useConfig"; -import { classNames } from "../../Utils/utils"; +import Chip from "@/CAREUI/display/Chip"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { FACILITY_FEATURE_TYPES } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import { sendNotificationMessages } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatPhoneNumber, parsePhoneNumber, classNames } from "@/Utils/utils"; export const FacilityCard = (props: { facility: any; userType: any }) => { const { facility, userType } = props; diff --git a/src/Components/Facility/FacilityConfigure.tsx b/src/Components/Facility/FacilityConfigure.tsx index a838e5761f7..4b29110b143 100644 --- a/src/Components/Facility/FacilityConfigure.tsx +++ b/src/Components/Facility/FacilityConfigure.tsx @@ -1,14 +1,15 @@ -import { lazy, useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; import { navigate } from "raviger"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import Page from "../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 { lazy, useReducer, useState } from "react"; + +import { ConfigureHealthFacility } from "@/Components/ABDM/ConfigureHealthFacility"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils.js"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; const Loading = lazy(() => import("../Common/Loading")); const initForm = { diff --git a/src/Components/Facility/FacilityCreate.tsx b/src/Components/Facility/FacilityCreate.tsx index e742caefb82..ca6432dc9dd 100644 --- a/src/Components/Facility/FacilityCreate.tsx +++ b/src/Components/Facility/FacilityCreate.tsx @@ -1,20 +1,45 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { Popover, Transition } from "@headlessui/react"; +import { navigate } from "raviger"; +import { Fragment, lazy, useCallback, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import { CapacityModal, DoctorModal } from "./models"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave.js"; +import CareIcon from "@/CAREUI/icons/CareIcon"; import { FACILITY_FEATURE_TYPES, FACILITY_TYPES, getBedTypes, -} from "../../Common/constants"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useConfig from "@/Common/hooks/useConfig"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { + phonePreg, + validateLatitude, + validateLongitude, + validatePincode, +} from "@/Common/validation"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import GLocationPicker from "@/Components/Common/GLocationPicker"; +import Steps, { Step } from "@/Components/Common/Steps"; +import { BedCapacity } from "@/Components/Facility/BedCapacity"; +import BedTypeCard from "@/Components/Facility/BedTypeCard"; +import { DoctorCapacity } from "@/Components/Facility/DoctorCapacity"; +import DoctorsCountCard from "@/Components/Facility/DoctorsCountCard"; +import { CapacityModal, DoctorModal } from "@/Components/Facility/models"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "@/Components/Form/FormFields/RadioFormField"; import { MultiSelectFormField, SelectFormField, -} from "../Form/FormFields/SelectFormField"; -import { Popover, Transition } from "@headlessui/react"; -import { Fragment, lazy, useCallback, useState } from "react"; -import Steps, { Step } from "../Common/Steps"; +} from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { FormAction } from "@/Components/Form/Utils.js"; import { createFacility, getDistrictByState, @@ -25,41 +50,18 @@ import { listCapacity, listDoctor, updateFacility, -} from "../../Redux/actions"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; import { getPincodeDetails, includesIgnoreCase, parsePhoneNumber, -} from "../../Utils/utils"; -import { - phonePreg, - validateLatitude, - validateLongitude, - validatePincode, -} from "../../Common/validation"; -import { statusType, useAbortableEffect } from "../../Common/utils"; - -import { BedCapacity } from "./BedCapacity"; -import BedTypeCard from "./BedTypeCard"; -import Card from "../../CAREUI/display/Card.js"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { DoctorCapacity } from "./DoctorCapacity"; -import DoctorsCountCard from "./DoctorsCountCard"; -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 PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; +} from "@/Utils/utils"; -import { navigate } from "raviger"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import { useTranslation } from "react-i18next"; -import { PhoneNumberValidator } from "../Form/FieldValidators.js"; +import Card from "@/CAREUI/display/Card.js"; +import Page from "@/Components/Common/components/Page.js"; +import { PhoneNumberValidator } from "@/Components/Form/FieldValidators.js"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/FacilityFilter/DistrictSelect.tsx b/src/Components/Facility/FacilityFilter/DistrictSelect.tsx index 088048ba6dd..47dcdcb31fb 100644 --- a/src/Components/Facility/FacilityFilter/DistrictSelect.tsx +++ b/src/Components/Facility/FacilityFilter/DistrictSelect.tsx @@ -1,7 +1,8 @@ import { useCallback } from "react"; import { useDispatch } from "react-redux"; -import { getDistrictByName } from "../../../Redux/actions"; -import AutoCompleteAsync from "../../Form/AutoCompleteAsync"; + +import AutoCompleteAsync from "@/Components/Form/AutoCompleteAsync"; +import { getDistrictByName } from "@/Redux/actions"; interface DistrictSelectProps { name: string; diff --git a/src/Components/Facility/FacilityFilter/index.tsx b/src/Components/Facility/FacilityFilter/index.tsx index ff4d3f89508..8a0aefaa916 100644 --- a/src/Components/Facility/FacilityFilter/index.tsx +++ b/src/Components/Facility/FacilityFilter/index.tsx @@ -1,14 +1,15 @@ import { navigate } from "raviger"; -import { FACILITY_TYPES } from "../../../Common/constants"; -import useMergeState from "../../../Common/hooks/useMergeState"; -import useConfig from "../../../Common/hooks/useConfig"; -import FiltersSlideover from "../../../CAREUI/interactive/FiltersSlideover"; import { useTranslation } from "react-i18next"; -import StateAutocompleteFormField from "../../Common/StateAutocompleteFormField"; -import { FieldChangeEvent } from "../../Form/FormFields/Utils"; -import DistrictAutocompleteFormField from "../../Common/DistrictAutocompleteFormField"; -import LocalBodyAutocompleteFormField from "../../Common/LocalBodyAutocompleteFormField"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; +import { FACILITY_TYPES } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import useMergeState from "@/Common/hooks/useMergeState"; +import DistrictAutocompleteFormField from "@/Components/Common/DistrictAutocompleteFormField"; +import LocalBodyAutocompleteFormField from "@/Components/Common/LocalBodyAutocompleteFormField"; +import StateAutocompleteFormField from "@/Components/Common/StateAutocompleteFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; const clearFilterState = { state: "", diff --git a/src/Components/Facility/FacilityHome.tsx b/src/Components/Facility/FacilityHome.tsx index 68990e64416..3118a8eb1f3 100644 --- a/src/Components/Facility/FacilityHome.tsx +++ b/src/Components/Facility/FacilityHome.tsx @@ -1,50 +1,51 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { navigate } from "raviger"; +import { lazy, useCallback, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; -import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import { - CapacityModal, - DoctorModal, - FacilityModel, - PatientStatsModel, -} from "./models"; +import Chip from "@/CAREUI/display/Chip"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; import { DOCTOR_SPECIALIZATION, FACILITY_FEATURE_TYPES, USER_TYPES, getBedTypes, -} from "../../Common/constants"; -import DropdownMenu, { DropdownItem } from "../Common/components/Menu"; +} from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser.js"; +import useConfig from "@/Common/hooks/useConfig"; +import { useMessageListener } from "@/Common/hooks/useMessageListener"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ContactLink from "@/Components/Common/components/ContactLink"; +import DropdownMenu, { + DropdownItem, +} from "@/Components/Common/components/Menu"; +import Page from "@/Components/Common/components/Page"; +import Table from "@/Components/Common/components/Table"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import DialogModal from "@/Components/Common/Dialog"; +import { BedCapacity } from "@/Components/Facility/BedCapacity"; +import BedTypeCard from "@/Components/Facility/BedTypeCard"; +import CoverImageEditModal from "@/Components/Facility/CoverImageEditModal"; +import { DoctorCapacity } from "@/Components/Facility/DoctorCapacity"; +import DoctorsCountCard from "@/Components/Facility/DoctorsCountCard"; +import { + CapacityModal, + DoctorModal, + FacilityModel, + PatientStatsModel, +} from "@/Components/Facility/models"; +import { DoctorIcon } from "@/Components/TeleIcu/Icons/DoctorIcon"; import { deleteFacility, getPermittedFacility, getTriageInfo, listCapacity, listDoctor, -} from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { lazy, useCallback, useState } from "react"; -import { useDispatch } from "react-redux"; -import { BedCapacity } from "./BedCapacity"; -import BedTypeCard from "./BedTypeCard"; -import ButtonV2 from "../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 CoverImageEditModal from "./CoverImageEditModal"; -import DialogModal from "../Common/Dialog"; -import { DoctorCapacity } from "./DoctorCapacity"; -import { DoctorIcon } from "../TeleIcu/Icons/DoctorIcon"; -import DoctorsCountCard from "./DoctorsCountCard"; -import Page from "../Common/components/Page"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import Table from "../Common/components/Table"; - -import { navigate } from "raviger"; -import useConfig from "../../Common/hooks/useConfig"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; -import { useTranslation } from "react-i18next"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; +} from "@/Redux/actions"; +import AuthorizeFor, { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/FacilityUsers.tsx b/src/Components/Facility/FacilityUsers.tsx index caff279ad7e..bf8fce34a80 100644 --- a/src/Components/Facility/FacilityUsers.tsx +++ b/src/Components/Facility/FacilityUsers.tsx @@ -1,6 +1,19 @@ import { lazy, useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; + +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { USER_TYPES, RESULTS_PER_PAGE_LIMIT } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import Pagination from "@/Components/Common/Pagination"; +import UserDetails from "@/Components/Common/UserDetails"; +import { FacilityModel } from "@/Components/Facility/models"; +import LinkFacilityDialog from "@/Components/Users/LinkFacilityDialog"; +import UnlinkFacilityDialog from "@/Components/Users/UnlinkFacilityDialog"; +import UserDeleteDialog from "@/Components/Users/UserDeleteDialog"; import { addUserFacility, deleteUserFacility, @@ -8,21 +21,9 @@ import { deleteUser, getFacilityUsers, getAnyFacility, -} from "../../Redux/actions"; -import Pagination from "../Common/Pagination"; -import { USER_TYPES, RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; -import { FacilityModel } from "../Facility/models"; -import LinkFacilityDialog from "../Users/LinkFacilityDialog"; -import UserDeleteDialog from "../Users/UserDeleteDialog"; -import * as Notification from "../../Utils/Notifications.js"; -import UserDetails from "../Common/UserDetails"; -import UnlinkFacilityDialog from "../Users/UnlinkFacilityDialog"; -import { classNames, isUserOnline, relativeTime } from "../../Utils/utils"; -import CountBlock from "../../CAREUI/display/Count"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { classNames, isUserOnline, relativeTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/HospitalList.tsx b/src/Components/Facility/HospitalList.tsx index ffdc1f4ed12..f413748b1b1 100644 --- a/src/Components/Facility/HospitalList.tsx +++ b/src/Components/Facility/HospitalList.tsx @@ -1,3 +1,20 @@ +import { navigate } from "raviger"; +import { lazy, useCallback, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import CountBlock from "@/CAREUI/display/Count"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import { FACILITY_TYPES } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import useFilters from "@/Common/hooks/useFilters"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Page from "@/Components/Common/components/Page"; +import ExportMenu from "@/Components/Common/Export"; +import { FacilityCard } from "@/Components/Facility/FacilityCard"; +import FacilityFilter from "@/Components/Facility/FacilityFilter"; +import { FacilityModel } from "@/Components/Facility/models"; +import SearchInput from "@/Components/Form/SearchInput"; import { downloadFacility, downloadFacilityCapacity, @@ -7,24 +24,7 @@ import { getLocalBody, getPermittedFacilities, getState, -} from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { lazy, useCallback, useState } from "react"; -import { useDispatch } from "react-redux"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CountBlock from "../../CAREUI/display/Count"; -import ExportMenu from "../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 SearchInput from "../Form/SearchInput"; - -import { navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; -import { useTranslation } from "react-i18next"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +} from "@/Redux/actions"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/InventoryList.tsx b/src/Components/Facility/InventoryList.tsx index 26f1af87191..756514a08f5 100644 --- a/src/Components/Facility/InventoryList.tsx +++ b/src/Components/Facility/InventoryList.tsx @@ -1,14 +1,14 @@ -import { useState, useCallback, useEffect, lazy } from "react"; - import { navigate } from "raviger"; +import { useState, useCallback, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { getInventorySummary, getAnyFacility } from "../../Redux/actions"; -import Pagination from "../Common/Pagination"; -import { classNames } from "../../Utils/utils"; -import Page from "../Common/components/Page"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import Pagination from "@/Components/Common/Pagination"; +import { getInventorySummary, getAnyFacility } from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import { classNames } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); export default function InventoryList(props: any) { diff --git a/src/Components/Facility/InventoryLog.tsx b/src/Components/Facility/InventoryLog.tsx index 5518b5e320f..f1772c6ac9d 100644 --- a/src/Components/Facility/InventoryLog.tsx +++ b/src/Components/Facility/InventoryLog.tsx @@ -1,19 +1,21 @@ import { useState, useCallback, useEffect, lazy } from "react"; - -import * as Notification from "../../Utils/Notifications.js"; import { useDispatch } from "react-redux"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Pagination from "@/Components/Common/Pagination"; import { getInventoryLog, flagInventoryItem, deleteLastInventoryLog, getAnyFacility, -} from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import Pagination from "../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"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatDateTime } from "@/Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon.js"; +import ButtonV2 from "@/Components/Common/components/ButtonV2.js"; +import Page from "@/Components/Common/components/Page.js"; + const Loading = lazy(() => import("../Common/Loading")); export default function InventoryLog(props: any) { diff --git a/src/Components/Facility/Investigations/InvestigationSuggestions.tsx b/src/Components/Facility/Investigations/InvestigationSuggestions.tsx index 4d614d224e6..d4f5a6167c9 100644 --- a/src/Components/Facility/Investigations/InvestigationSuggestions.tsx +++ b/src/Components/Facility/Investigations/InvestigationSuggestions.tsx @@ -1,11 +1,12 @@ import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { getConsultation } from "../../../Redux/actions"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import { InvestigationType } from "../../Common/prescription-builder/InvestigationBuilder"; -import { InvestigationResponse } from "./Reports/types"; -import dayjs from "../../../Utils/dayjs"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { InvestigationType } from "@/Components/Common/prescription-builder/InvestigationBuilder"; +import { InvestigationResponse } from "@/Components/Facility/Investigations/Reports/types"; +import { getConsultation } from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; export default function ViewInvestigationSuggestions(props: { consultationId: any; diff --git a/src/Components/Facility/Investigations/InvestigationTable.tsx b/src/Components/Facility/Investigations/InvestigationTable.tsx index 54e7e50bdc7..80cea71e288 100644 --- a/src/Components/Facility/Investigations/InvestigationTable.tsx +++ b/src/Components/Facility/Investigations/InvestigationTable.tsx @@ -1,10 +1,11 @@ -import ButtonV2 from "../../Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import { classNames } from "../../../Utils/utils"; import { useState } from "react"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { classNames } from "@/Utils/utils"; + const TestRow = ({ data, i, onChange, showForm, value, isChanged }: any) => { return ( { return ( diff --git a/src/Components/Facility/Investigations/Reports/index.tsx b/src/Components/Facility/Investigations/Reports/index.tsx index 620404b932b..1a8b0edb601 100644 --- a/src/Components/Facility/Investigations/Reports/index.tsx +++ b/src/Components/Facility/Investigations/Reports/index.tsx @@ -1,24 +1,24 @@ -import * as Notification from "../../../../Utils/Notifications"; import { chain } from "lodash-es"; -import { Group, InvestigationType } from ".."; +import { useCallback, useEffect, useReducer, useState, useRef } from "react"; +import { useDispatch } from "react-redux"; + +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import Page from "@/Components/Common/components/Page"; +import Loading from "@/Components/Common/Loading"; +import ReportTable from "@/Components/Facility/Investigations/Reports/ReportTable"; +import { InvestigationResponse } from "@/Components/Facility/Investigations/Reports/types"; +import AutocompleteMultiSelectFormField from "@/Components/Form/FormFields/AutocompleteMultiselect"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; import { getPatient, getPatientInvestigation, listInvestigationGroups, listInvestigations, -} from "../../../../Redux/actions"; -import { useCallback, useEffect, useReducer, useState } from "react"; - -import AutocompleteMultiSelectFormField from "../../../Form/FormFields/AutocompleteMultiselect"; -import ButtonV2 from "../../../Common/components/ButtonV2"; -import CircularProgress from "../../../Common/components/CircularProgress"; -import { FieldChangeEvent } from "../../../Form/FormFields/Utils"; -import { InvestigationResponse } from "./types"; -import Loading from "../../../Common/Loading"; -import Page from "../../../Common/components/Page"; -import ReportTable from "./ReportTable"; -import { useDispatch } from "react-redux"; -import { useRef } from "react"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications"; + +import { Group, InvestigationType } from ".."; const RESULT_PER_PAGE = 14; interface InitialState { diff --git a/src/Components/Facility/Investigations/Reports/utils.tsx b/src/Components/Facility/Investigations/Reports/utils.tsx index 46b95800339..0e2b6dc0ca5 100644 --- a/src/Components/Facility/Investigations/Reports/utils.tsx +++ b/src/Components/Facility/Investigations/Reports/utils.tsx @@ -1,5 +1,6 @@ import { memoize, chain, findIndex } from "lodash-es"; -import { InvestigationResponse } from "./types"; + +import { InvestigationResponse } from "@/Components/Facility/Investigations/Reports/types"; export const transformData = memoize((data: InvestigationResponse) => { const sessions = chain(data) diff --git a/src/Components/Facility/Investigations/ShowInvestigation.tsx b/src/Components/Facility/Investigations/ShowInvestigation.tsx index 242ab298e5a..14e7cf5f6c4 100644 --- a/src/Components/Facility/Investigations/ShowInvestigation.tsx +++ b/src/Components/Facility/Investigations/ShowInvestigation.tsx @@ -1,17 +1,17 @@ +import { chain, set } from "lodash-es"; +import { navigate } from "raviger"; import { useCallback, useReducer, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import PageTitle from "@/Components/Common/PageTitle"; +import InvestigationTable from "@/Components/Facility/Investigations/InvestigationTable"; import { editInvestigation, getInvestigation, getPatient, -} from "../../../Redux/actions"; -import PageTitle from "../../Common/PageTitle"; -import InvestigationTable from "./InvestigationTable"; -import { chain } from "lodash-es"; -import { set } from "lodash-es"; -import { navigate } from "raviger"; -import * as Notification from "../../../Utils/Notifications.js"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const Loading = lazy(() => import("../../Common/Loading")); diff --git a/src/Components/Facility/Investigations/Table.tsx b/src/Components/Facility/Investigations/Table.tsx index 4bd7e841543..d80b4c92804 100644 --- a/src/Components/Facility/Investigations/Table.tsx +++ b/src/Components/Facility/Investigations/Table.tsx @@ -1,9 +1,10 @@ -import { FieldChangeEvent } from "../../Form/FormFields/Utils"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; -import TextFormField from "../../Form/FormFields/TextFormField"; import { set } from "lodash-es"; import { useState } from "react"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; + const TestRow = ({ data, value, onChange, i }: any) => { return ( diff --git a/src/Components/Facility/Investigations/ViewInvestigations.tsx b/src/Components/Facility/Investigations/ViewInvestigations.tsx index a1381015963..f16df19fa9e 100644 --- a/src/Components/Facility/Investigations/ViewInvestigations.tsx +++ b/src/Components/Facility/Investigations/ViewInvestigations.tsx @@ -1,9 +1,9 @@ import { navigate } from "raviger"; -import ReportTable from "./Reports/ReportTable"; - -import { formatDateTime } from "../../../Utils/utils"; -import { InvestigationSessionType } from "./investigationsTab"; import { lazy } from "react"; + +import { InvestigationSessionType } from "@/Components/Facility/Investigations/investigationsTab"; +import ReportTable from "@/Components/Facility/Investigations/Reports/ReportTable"; +import { formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../../Common/Loading")); export default function ViewInvestigations(props: { diff --git a/src/Components/Facility/Investigations/index.tsx b/src/Components/Facility/Investigations/index.tsx index 91836b6bbec..4acc51cfaa1 100644 --- a/src/Components/Facility/Investigations/index.tsx +++ b/src/Components/Facility/Investigations/index.tsx @@ -1,20 +1,20 @@ +import { navigate, useQueryParams } from "raviger"; import { lazy, useEffect, useReducer, useState } from "react"; -import { TestTable } from "./Table"; +import { useTranslation } from "react-i18next"; import { useDispatch } from "react-redux"; + +import Card from "@/CAREUI/display/Card"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { TestTable } from "@/Components/Facility/Investigations/Table"; +import AutocompleteMultiSelectFormField from "@/Components/Form/FormFields/AutocompleteMultiselect"; import { createInvestigation, listInvestigationGroups, listInvestigations, getPatient, -} from "../../../Redux/actions"; -import * as Notification from "../../../Utils/Notifications.js"; -import { navigate, useQueryParams } from "raviger"; - -import { useTranslation } from "react-i18next"; -import Page from "../../Common/components/Page"; -import AutocompleteMultiSelectFormField from "../../Form/FormFields/AutocompleteMultiselect"; -import { Submit } from "../../Common/components/ButtonV2"; -import Card from "../../../CAREUI/display/Card"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const Loading = lazy(() => import("../../Common/Loading")); diff --git a/src/Components/Facility/Investigations/investigationsTab.tsx b/src/Components/Facility/Investigations/investigationsTab.tsx index 9821db0e98f..17c8f8756a2 100644 --- a/src/Components/Facility/Investigations/investigationsTab.tsx +++ b/src/Components/Facility/Investigations/investigationsTab.tsx @@ -1,14 +1,12 @@ import { useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../../Common/utils"; -import { - getInvestigation, - getInvestigationSessions, -} from "../../../Redux/actions"; -import { PatientModel } from "../../Patient/models"; -import ViewInvestigationSuggestions from "./InvestigationSuggestions"; -import { InvestigationResponse } from "./Reports/types"; -import ViewInvestigations from "./ViewInvestigations"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ViewInvestigationSuggestions from "@/Components/Facility/Investigations/InvestigationSuggestions"; +import { InvestigationResponse } from "@/Components/Facility/Investigations/Reports/types"; +import ViewInvestigations from "@/Components/Facility/Investigations/ViewInvestigations"; +import { PatientModel } from "@/Components/Patient/models"; +import { getInvestigation, getInvestigationSessions } from "@/Redux/actions"; export interface InvestigationSessionType { session_external_id: string; diff --git a/src/Components/Facility/LegacyFacilityCNS.tsx b/src/Components/Facility/LegacyFacilityCNS.tsx index 5b0005c9daf..5619360a1df 100644 --- a/src/Components/Facility/LegacyFacilityCNS.tsx +++ b/src/Components/Facility/LegacyFacilityCNS.tsx @@ -1,24 +1,28 @@ +import { uniqBy } from "lodash-es"; import { navigate } from "raviger"; import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import CareIcon from "../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AssetData, AssetLocationObject } from "@/Components/Assets/AssetTypes"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import DialogModal from "@/Components/Common/Dialog"; +import Loading from "@/Components/Common/Loading"; +import Pagination from "@/Components/Common/Pagination"; +import { LegacyMonitorCard } from "@/Components/Facility/LegacyMonitorCard"; +import { FacilityModel } from "@/Components/Facility/models"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import { PatientModel } from "@/Components/Patient/models"; import { getAllPatient, getPermittedFacility, listAssetBeds, -} from "../../Redux/actions"; -import { classNames } from "../../Utils/utils"; -import { AssetData, AssetLocationObject } from "../Assets/AssetTypes"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; -import Loading from "../Common/Loading"; -import Pagination from "../Common/Pagination"; -import { PatientModel } from "../Patient/models"; -import { FacilityModel } from "./models"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { uniqBy } from "lodash-es"; -import DialogModal from "../Common/Dialog"; -import { LegacyMonitorCard } from "./LegacyMonitorCard"; +} from "@/Redux/actions"; +import { classNames } from "@/Utils/utils"; interface Monitor { patient: PatientModel; diff --git a/src/Components/Facility/LegacyMonitorCard.tsx b/src/Components/Facility/LegacyMonitorCard.tsx index 61bff3d607b..3e663aae5b3 100644 --- a/src/Components/Facility/LegacyMonitorCard.tsx +++ b/src/Components/Facility/LegacyMonitorCard.tsx @@ -1,10 +1,11 @@ -import { GENDER_TYPES } from "../../Common/constants"; import { Link } from "raviger"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { PatientModel } from "../Patient/models"; -import LegacyPatientVitalsCard from "../Patient/LegacyPatientVitalsCard"; -import { AssetLocationObject } from "../Assets/AssetTypes"; -import { formatAge } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { GENDER_TYPES } from "@/Common/constants"; +import { AssetLocationObject } from "@/Components/Assets/AssetTypes"; +import LegacyPatientVitalsCard from "@/Components/Patient/LegacyPatientVitalsCard"; +import { PatientModel } from "@/Components/Patient/models"; +import { formatAge } from "@/Utils/utils"; interface MonitorCardProps { facilityId: string; diff --git a/src/Components/Facility/LocationManagement.tsx b/src/Components/Facility/LocationManagement.tsx index c018a7c222b..d03cb414862 100644 --- a/src/Components/Facility/LocationManagement.tsx +++ b/src/Components/Facility/LocationManagement.tsx @@ -1,11 +1,12 @@ import { lazy } from "react"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Page from "../Common/components/Page"; -import routes from "../../Redux/api"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import { LocationModel } from "./models"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { LocationModel } from "@/Components/Facility/models"; +import routes from "@/Redux/api"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Facility/MinQuantityList.tsx b/src/Components/Facility/MinQuantityList.tsx index 631f432a9dc..533b430febd 100644 --- a/src/Components/Facility/MinQuantityList.tsx +++ b/src/Components/Facility/MinQuantityList.tsx @@ -1,13 +1,14 @@ import { useCallback, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { getMinQuantity, getAnyFacility } from "../../Redux/actions"; -import Pagination from "../Common/Pagination"; -import { MinQuantityRequiredModal } from "./MinQuantityRequiredModal"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Page from "../Common/components/Page"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import Pagination from "@/Components/Common/Pagination"; +import { MinQuantityRequiredModal } from "@/Components/Facility/MinQuantityRequiredModal"; +import { getMinQuantity, getAnyFacility } from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; + const Loading = lazy(() => import("../Common/Loading")); export default function MinQuantityList(props: any) { diff --git a/src/Components/Facility/MinQuantityRequiredModal.tsx b/src/Components/Facility/MinQuantityRequiredModal.tsx index d076b65f076..4fcabb0e234 100644 --- a/src/Components/Facility/MinQuantityRequiredModal.tsx +++ b/src/Components/Facility/MinQuantityRequiredModal.tsx @@ -1,15 +1,16 @@ import { useCallback, useReducer, useState } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { updateMinQuantity, getAnyFacility, getMinQuantityOfItem, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import ButtonV2 from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; -import TextFormField from "../Form/FormFields/TextFormField"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const initForm = { id: "", diff --git a/src/Components/Facility/SetInventoryForm.tsx b/src/Components/Facility/SetInventoryForm.tsx index d0a275e41ba..2bca7acdd9a 100644 --- a/src/Components/Facility/SetInventoryForm.tsx +++ b/src/Components/Facility/SetInventoryForm.tsx @@ -1,22 +1,22 @@ import { useCallback, useReducer, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +import Card from "@/CAREUI/display/Card"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { InventoryItemsModel } from "@/Components/Facility/models"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; import { getItems, setMinQuantity, getAnyFacility, getMinQuantity, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import { InventoryItemsModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import Page from "../Common/components/Page"; -import Card from "../../CAREUI/display/Card"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; const Loading = lazy(() => import("../Common/Loading")); const initForm = { diff --git a/src/Components/Facility/TransferPatientDialog.tsx b/src/Components/Facility/TransferPatientDialog.tsx index 632765c2492..aa383a33df7 100644 --- a/src/Components/Facility/TransferPatientDialog.tsx +++ b/src/Components/Facility/TransferPatientDialog.tsx @@ -1,18 +1,17 @@ -import * as Notification from "../../Utils/Notifications.js"; - -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { useReducer, useState } from "react"; - -import DateFormField from "../Form/FormFields/DateFormField"; -import { DupPatientModel } from "./models"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { OptionsType } from "../../Common/constants"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; +import dayjs from "dayjs"; import { navigate } from "raviger"; -import { transferPatient } from "../../Redux/actions"; +import { useReducer, useState } from "react"; import { useDispatch } from "react-redux"; -import { dateQueryString } from "../../Utils/utils.js"; -import dayjs from "dayjs"; + +import { OptionsType } from "@/Common/constants"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { DupPatientModel } from "@/Components/Facility/models"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { transferPatient } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { dateQueryString } from "@/Utils/utils.js"; interface Props { patientList: Array; diff --git a/src/Components/Facility/TreatmentSummary.tsx b/src/Components/Facility/TreatmentSummary.tsx index 3fbd80ac8b2..b00875f675a 100644 --- a/src/Components/Facility/TreatmentSummary.tsx +++ b/src/Components/Facility/TreatmentSummary.tsx @@ -1,16 +1,12 @@ import { lazy, useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { - getPatient, - getInvestigation, - getConsultation, -} from "../../Redux/actions"; -import { ConsultationModel } from "./models"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { PatientModel } from "../Patient/models"; -import { GENDER_TYPES } from "../../Common/constants"; -import { formatAge, formatDate, formatDateTime } from "../../Utils/utils"; +import { GENDER_TYPES } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { ConsultationModel } from "@/Components/Facility/models"; +import { PatientModel } from "@/Components/Patient/models"; +import { getPatient, getInvestigation, getConsultation } from "@/Redux/actions"; +import { formatAge, formatDate, formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); const TreatmentSummary = (props: any) => { diff --git a/src/Components/Facility/TriageForm.tsx b/src/Components/Facility/TriageForm.tsx index 3c8e6b1497b..03476c46e05 100644 --- a/src/Components/Facility/TriageForm.tsx +++ b/src/Components/Facility/TriageForm.tsx @@ -1,27 +1,30 @@ -import ConfirmDialog from "../Common/ConfirmDialog"; -import Card from "../../CAREUI/display/Card"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; import { useCallback, useReducer, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import { PatientStatsModel } from "@/Components/Facility/models"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; import { createTriageForm, getTriageDetails, getAnyFacility, getTriageInfo, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { PatientStatsModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import DateFormField from "../Form/FormFields/DateFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; + const Loading = lazy(() => import("../Common/Loading")); -import Page from "../Common/components/Page"; + import dayjs from "dayjs"; -import { dateQueryString } from "../../Utils/utils"; + +import { dateQueryString } from "@/Utils/utils"; interface triageFormProps extends PatientStatsModel { facilityId: number; diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index f5ddde19d2d..624f796b143 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -1,8 +1,11 @@ -import { AssignedToObjectModel } from "../Patient/models"; -import { ProcedureType } from "../Common/prescription-builder/ProcedureBuilder"; -import { NormalPrescription, PRNPrescription } from "../Medicine/models"; -import { AssetData } from "../Assets/AssetTypes"; -import { UserBareMinimum } from "../Users/models"; +import { AssetData } from "@/Components/Assets/AssetTypes"; +import { ProcedureType } from "@/Components/Common/prescription-builder/ProcedureBuilder"; +import { + NormalPrescription, + PRNPrescription, +} from "@/Components/Medicine/models"; +import { AssignedToObjectModel } from "@/Components/Patient/models"; +import { UserBareMinimum } from "@/Components/Users/models"; export interface LocalBodyModel { name: string; diff --git a/src/Components/Form/AutoCompleteAsync.tsx b/src/Components/Form/AutoCompleteAsync.tsx index 340b7ac6b8b..08321833c54 100644 --- a/src/Components/Form/AutoCompleteAsync.tsx +++ b/src/Components/Form/AutoCompleteAsync.tsx @@ -1,13 +1,14 @@ -import { useEffect, useState, useMemo } from "react"; import { Combobox } from "@headlessui/react"; import { debounce } from "lodash-es"; -import { DropdownTransition } from "../Common/components/HelperComponents"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import { useEffect, useState, useMemo } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { DropdownTransition } from "@/Components/Common/components/HelperComponents"; import { MultiSelectOptionChip, dropdownOptionClassNames, -} from "./MultiSelectMenuV2"; -import { useTranslation } from "react-i18next"; +} from "@/Components/Form/MultiSelectMenuV2"; interface Props { name?: string; diff --git a/src/Components/Form/Form.tsx b/src/Components/Form/Form.tsx index 66383616034..142be196093 100644 --- a/src/Components/Form/Form.tsx +++ b/src/Components/Form/Form.tsx @@ -1,13 +1,22 @@ 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 { FieldValidator } from "./FieldValidators"; -import { FormContextValue, createFormContext } from "./FormContext"; -import { FieldChangeEvent } from "./FormFields/Utils"; -import { FormDetails, FormErrors, FormState, formReducer } from "./Utils"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import * as Notification from "../../Utils/Notifications"; + +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { FieldValidator } from "@/Components/Form/FieldValidators"; +import { + FormContextValue, + createFormContext, +} from "@/Components/Form/FormContext"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { + FormDetails, + FormErrors, + FormState, + formReducer, +} from "@/Components/Form/Utils"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import { classNames } from "@/Utils/utils"; type Props = { className?: string; diff --git a/src/Components/Form/FormContext.ts b/src/Components/Form/FormContext.ts index 25d8410d0b2..b4e24045f88 100644 --- a/src/Components/Form/FormContext.ts +++ b/src/Components/Form/FormContext.ts @@ -1,6 +1,7 @@ import { Context, createContext } from "react"; -import { FieldError, FieldValidator } from "./FieldValidators"; -import { FormDetails } from "./Utils"; + +import { FieldError, FieldValidator } from "@/Components/Form/FieldValidators"; +import { FormDetails } from "@/Components/Form/Utils"; export type FormContextValue = ( name: keyof T, diff --git a/src/Components/Form/FormFields/Autocomplete.tsx b/src/Components/Form/FormFields/Autocomplete.tsx index bf3840b2c44..a1646f0a9ce 100644 --- a/src/Components/Form/FormFields/Autocomplete.tsx +++ b/src/Components/Form/FormFields/Autocomplete.tsx @@ -1,13 +1,17 @@ -import { useEffect, useState } from "react"; import { Combobox } from "@headlessui/react"; -import { DropdownTransition } from "../../Common/components/HelperComponents"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { dropdownOptionClassNames } from "../MultiSelectMenuV2"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { DropdownTransition } from "@/Components/Common/components/HelperComponents"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; +import { dropdownOptionClassNames } from "@/Components/Form/MultiSelectMenuV2"; +import { classNames } from "@/Utils/utils"; + type OptionCallback = (option: T) => R; type AutocompleteFormFieldProps = FormFieldBaseProps & { diff --git a/src/Components/Form/FormFields/AutocompleteMultiselect.tsx b/src/Components/Form/FormFields/AutocompleteMultiselect.tsx index 9004dea939d..46f21c69aca 100644 --- a/src/Components/Form/FormFields/AutocompleteMultiselect.tsx +++ b/src/Components/Form/FormFields/AutocompleteMultiselect.tsx @@ -1,14 +1,18 @@ -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import { Combobox } from "@headlessui/react"; +import { useEffect, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { DropdownTransition } from "@/Components/Common/components/HelperComponents"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; import { MultiSelectOptionChip, dropdownOptionClassNames, -} from "../MultiSelectMenuV2"; -import { useEffect, useState } from "react"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { Combobox } from "@headlessui/react"; -import { DropdownTransition } from "../../Common/components/HelperComponents"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +} from "@/Components/Form/MultiSelectMenuV2"; +import { classNames } from "@/Utils/utils"; type OptionCallback = (option: T) => R; diff --git a/src/Components/Form/FormFields/CheckBoxFormField.tsx b/src/Components/Form/FormFields/CheckBoxFormField.tsx index f3382d522de..61bb61003a9 100644 --- a/src/Components/Form/FormFields/CheckBoxFormField.tsx +++ b/src/Components/Form/FormFields/CheckBoxFormField.tsx @@ -1,5 +1,11 @@ -import { FieldErrorText, FieldLabel } from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import { + FieldErrorText, + FieldLabel, +} from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; export default function CheckBoxFormField(props: FormFieldBaseProps) { const field = useFormFieldPropsResolver(props); diff --git a/src/Components/Form/FormFields/DateFormField.tsx b/src/Components/Form/FormFields/DateFormField.tsx index adb8c2538ae..200256f2115 100644 --- a/src/Components/Form/FormFields/DateFormField.tsx +++ b/src/Components/Form/FormFields/DateFormField.tsx @@ -1,8 +1,12 @@ -import DateInputV2, { DatePickerPosition } from "../../Common/DateInputV2"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; - -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +import DateInputV2, { + DatePickerPosition, +} from "@/Components/Common/DateInputV2"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { containerClassName?: string; diff --git a/src/Components/Form/FormFields/DateRangeFormField.tsx b/src/Components/Form/FormFields/DateRangeFormField.tsx index 69702422d0d..c28a7a7deb8 100644 --- a/src/Components/Form/FormFields/DateRangeFormField.tsx +++ b/src/Components/Form/FormFields/DateRangeFormField.tsx @@ -1,7 +1,12 @@ -import { classNames } from "../../../Utils/utils"; -import DateRangeInputV2, { DateRange } from "../../Common/DateRangeInputV2"; -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import DateRangeInputV2, { + DateRange, +} from "@/Components/Common/DateRangeInputV2"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { max?: Date; diff --git a/src/Components/Form/FormFields/FormField.tsx b/src/Components/Form/FormFields/FormField.tsx index af5a3e91804..8f5e1c77a71 100644 --- a/src/Components/Form/FormFields/FormField.tsx +++ b/src/Components/Form/FormFields/FormField.tsx @@ -1,6 +1,6 @@ -import { FieldError } from "../FieldValidators"; -import { FormFieldBaseProps } from "./Utils"; -import { classNames } from "../../../Utils/utils"; +import { FieldError } from "@/Components/Form/FieldValidators"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; type LabelProps = { id?: string | undefined; diff --git a/src/Components/Form/FormFields/Month.tsx b/src/Components/Form/FormFields/Month.tsx index 625308f87c6..6c29bf29d39 100644 --- a/src/Components/Form/FormFields/Month.tsx +++ b/src/Components/Form/FormFields/Month.tsx @@ -1,8 +1,12 @@ import { useEffect, useState } from "react"; -import AutocompleteFormField from "./Autocomplete"; -import FormField from "./FormField"; -import TextFormField from "./TextFormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; + +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import FormField from "@/Components/Form/FormFields/FormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; type Props = FormFieldBaseProps & { suffix?: (value?: Date) => React.ReactNode; diff --git a/src/Components/Form/FormFields/NumericWithUnitsFormField.tsx b/src/Components/Form/FormFields/NumericWithUnitsFormField.tsx index 02aa03fdf71..92e493aced8 100644 --- a/src/Components/Form/FormFields/NumericWithUnitsFormField.tsx +++ b/src/Components/Form/FormFields/NumericWithUnitsFormField.tsx @@ -1,6 +1,9 @@ -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import { classNames } from "../../../Utils/utils"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/Components/Form/FormFields/OtpFormField.tsx b/src/Components/Form/FormFields/OtpFormField.tsx index 904675db833..f83800a0e0d 100644 --- a/src/Components/Form/FormFields/OtpFormField.tsx +++ b/src/Components/Form/FormFields/OtpFormField.tsx @@ -1,6 +1,7 @@ import { useRef } from "react"; -import FormField from "./FormField"; -import { FormFieldBaseProps } from "./Utils"; + +import FormField from "@/Components/Form/FormFields/FormField"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; type TextAreaFormFieldProps = { length?: number; diff --git a/src/Components/Form/FormFields/PhoneNumberFormField.tsx b/src/Components/Form/FormFields/PhoneNumberFormField.tsx index b6af2bfaa24..243b8787065 100644 --- a/src/Components/Form/FormFields/PhoneNumberFormField.tsx +++ b/src/Components/Form/FormFields/PhoneNumberFormField.tsx @@ -1,20 +1,24 @@ -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import FormField from "./FormField"; import { useEffect, useMemo, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import phoneCodesJson from "@/Common/static/countryPhoneAndFlags.json"; +import { + FieldError, + PhoneNumberValidator, + PhoneNumberType, +} from "@/Components/Form/FieldValidators"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; import { classNames, parsePhoneNumber, formatPhoneNumber as formatPhoneNumberUtil, getCountryCode, CountryData, -} from "../../../Utils/utils"; -import phoneCodesJson from "../../../Common/static/countryPhoneAndFlags.json"; -import { - FieldError, - PhoneNumberValidator, - PhoneNumberType, -} from "../FieldValidators"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; +} from "@/Utils/utils"; const phoneCodes: Record = phoneCodesJson; diff --git a/src/Components/Form/FormFields/RadioFormField.tsx b/src/Components/Form/FormFields/RadioFormField.tsx index 3d1a9b7d8ac..8e1e09134c8 100644 --- a/src/Components/Form/FormFields/RadioFormField.tsx +++ b/src/Components/Form/FormFields/RadioFormField.tsx @@ -1,5 +1,8 @@ -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; type Props = FormFieldBaseProps & { options: T[]; diff --git a/src/Components/Form/FormFields/RangeAutocompleteFormField.tsx b/src/Components/Form/FormFields/RangeAutocompleteFormField.tsx index 441164adbc0..a33488eb0a8 100644 --- a/src/Components/Form/FormFields/RangeAutocompleteFormField.tsx +++ b/src/Components/Form/FormFields/RangeAutocompleteFormField.tsx @@ -1,8 +1,9 @@ import { useMemo } from "react"; -import AutocompleteFormField from "./Autocomplete"; -import { FormFieldBaseProps } from "./Utils"; -import { classNames } from "../../../Utils/utils"; -import ButtonV2 from "../../Common/components/ButtonV2"; + +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; interface Threshold { value: number; diff --git a/src/Components/Form/FormFields/SelectFormField.tsx b/src/Components/Form/FormFields/SelectFormField.tsx index 3c6613bb662..7ee51f5890b 100644 --- a/src/Components/Form/FormFields/SelectFormField.tsx +++ b/src/Components/Form/FormFields/SelectFormField.tsx @@ -1,7 +1,10 @@ -import MultiSelectMenuV2 from "../MultiSelectMenuV2"; -import SelectMenuV2 from "../SelectMenuV2"; -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; +import MultiSelectMenuV2 from "@/Components/Form/MultiSelectMenuV2"; +import SelectMenuV2 from "@/Components/Form/SelectMenuV2"; type OptionCallback = (option: T) => R; diff --git a/src/Components/Form/FormFields/TextAreaFormField.tsx b/src/Components/Form/FormFields/TextAreaFormField.tsx index 23a7d025938..8513f022a55 100644 --- a/src/Components/Form/FormFields/TextAreaFormField.tsx +++ b/src/Components/Form/FormFields/TextAreaFormField.tsx @@ -1,5 +1,8 @@ -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; type TextAreaFormFieldProps = FormFieldBaseProps & { placeholder?: string; diff --git a/src/Components/Form/FormFields/TextFormField.tsx b/src/Components/Form/FormFields/TextFormField.tsx index 4e89e7e0ff2..8e7b7b188b5 100644 --- a/src/Components/Form/FormFields/TextFormField.tsx +++ b/src/Components/Form/FormFields/TextFormField.tsx @@ -1,9 +1,12 @@ -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; import { HTMLInputTypeAttribute, forwardRef, useState } from "react"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import FormField from "@/Components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; export type TextFormFieldProps = FormFieldBaseProps & { placeholder?: string; diff --git a/src/Components/Form/FormFields/Utils.ts b/src/Components/Form/FormFields/Utils.ts index 3fab7d91015..4510dd2f8c7 100644 --- a/src/Components/Form/FormFields/Utils.ts +++ b/src/Components/Form/FormFields/Utils.ts @@ -1,7 +1,8 @@ import { useContext } from "react"; -import { FieldError, FieldValidator } from "../FieldValidators"; -import { FormContext } from "../FormContext"; -import { FormDetails } from "../Utils"; + +import { FieldError, FieldValidator } from "@/Components/Form/FieldValidators"; +import { FormContext } from "@/Components/Form/FormContext"; +import { FormDetails } from "@/Components/Form/Utils"; export type FieldChangeEvent = { name: string; value: T }; export type FieldChangeEventHandler = (event: FieldChangeEvent) => void; diff --git a/src/Components/Form/MultiSelectMenuV2.tsx b/src/Components/Form/MultiSelectMenuV2.tsx index 25cd226e09e..2f8597033e8 100644 --- a/src/Components/Form/MultiSelectMenuV2.tsx +++ b/src/Components/Form/MultiSelectMenuV2.tsx @@ -1,9 +1,10 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "../Common/components/HelperComponents"; import { Listbox } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; import { ReactNode } from "react"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { DropdownTransition } from "@/Components/Common/components/HelperComponents"; +import { classNames } from "@/Utils/utils"; + type OptionCallback = (option: T) => R; type Props = { diff --git a/src/Components/Form/SearchInput.tsx b/src/Components/Form/SearchInput.tsx index 40855b8b9a6..ee0164e9890 100644 --- a/src/Components/Form/SearchInput.tsx +++ b/src/Components/Form/SearchInput.tsx @@ -1,8 +1,11 @@ import { createRef, useEffect, useState } from "react"; import useKeyboardShortcut from "use-keyboard-shortcut"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { isAppleDevice } from "../../Utils/utils"; -import TextFormField, { TextFormFieldProps } from "./FormFields/TextFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import TextFormField, { + TextFormFieldProps, +} from "@/Components/Form/FormFields/TextFormField"; +import { isAppleDevice } from "@/Utils/utils"; type SearchInputProps = TextFormFieldProps & { debouncePeriod?: number; diff --git a/src/Components/Form/SelectMenuV2.tsx b/src/Components/Form/SelectMenuV2.tsx index f26ce03f0c6..5c9145db5ca 100644 --- a/src/Components/Form/SelectMenuV2.tsx +++ b/src/Components/Form/SelectMenuV2.tsx @@ -1,10 +1,11 @@ import { Listbox } from "@headlessui/react"; -import { DropdownTransition } from "../Common/components/HelperComponents"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { dropdownOptionClassNames } from "./MultiSelectMenuV2"; -import { classNames } from "../../Utils/utils"; import { ReactNode } from "react"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { DropdownTransition } from "@/Components/Common/components/HelperComponents"; +import { dropdownOptionClassNames } from "@/Components/Form/MultiSelectMenuV2"; +import { classNames } from "@/Utils/utils"; + type OptionCallback = (option: T) => R; type SelectMenuProps = { diff --git a/src/Components/Form/Utils.ts b/src/Components/Form/Utils.ts index 0592e81a06c..37026d3796e 100644 --- a/src/Components/Form/Utils.ts +++ b/src/Components/Form/Utils.ts @@ -1,4 +1,4 @@ -import { FieldError } from "./FieldValidators"; +import { FieldError } from "@/Components/Form/FieldValidators"; export type FormDetails = { [key: string]: any }; export type FormErrors = Partial< diff --git a/src/Components/HCX/ClaimCreatedModal.tsx b/src/Components/HCX/ClaimCreatedModal.tsx index 0b2e4703177..9550ec74926 100644 --- a/src/Components/HCX/ClaimCreatedModal.tsx +++ b/src/Components/HCX/ClaimCreatedModal.tsx @@ -1,12 +1,13 @@ import { useState } from "react"; import { useDispatch } from "react-redux"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { HCXActions } from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications"; -import { Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; -import { FileUpload } from "../Patient/FileUpload"; -import { HCXClaimModel } from "./models"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { HCXClaimModel } from "@/Components/HCX/models"; +import { FileUpload } from "@/Components/Patient/FileUpload"; +import { HCXActions } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications"; interface Props { claim: HCXClaimModel; diff --git a/src/Components/HCX/ClaimDetailCard.tsx b/src/Components/HCX/ClaimDetailCard.tsx index 2578e6990ff..2573899e3b9 100644 --- a/src/Components/HCX/ClaimDetailCard.tsx +++ b/src/Components/HCX/ClaimDetailCard.tsx @@ -1,5 +1,5 @@ -import { classNames, formatCurrency, formatDateTime } from "../../Utils/utils"; -import { HCXClaimModel } from "../HCX/models"; +import { HCXClaimModel } from "@/Components/HCX/models"; +import { classNames, formatCurrency, formatDateTime } from "@/Utils/utils"; interface IProps { claim: HCXClaimModel; diff --git a/src/Components/HCX/ClaimsItemsBuilder.tsx b/src/Components/HCX/ClaimsItemsBuilder.tsx index 867f302a89e..00858834335 100644 --- a/src/Components/HCX/ClaimsItemsBuilder.tsx +++ b/src/Components/HCX/ClaimsItemsBuilder.tsx @@ -1,16 +1,16 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; -import PMJAYProcedurePackageAutocomplete from "../Common/PMJAYProcedurePackageAutocomplete"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import FormField, { FieldLabel } from "../Form/FormFields/FormField"; -import TextFormField from "../Form/FormFields/TextFormField"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import PMJAYProcedurePackageAutocomplete from "@/Components/Common/PMJAYProcedurePackageAutocomplete"; +import AutocompleteFormField from "@/Components/Form/FormFields/Autocomplete"; +import FormField, { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { FieldChangeEvent, FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import { ITEM_CATEGORIES } from "./constants"; -import { HCXItemModel } from "./models"; +} from "@/Components/Form/FormFields/Utils"; +import { ITEM_CATEGORIES } from "@/Components/HCX/constants"; +import { HCXItemModel } from "@/Components/HCX/models"; type Props = FormFieldBaseProps; diff --git a/src/Components/HCX/CreateClaimCard.tsx b/src/Components/HCX/CreateClaimCard.tsx index 755c2865747..c24a52796d6 100644 --- a/src/Components/HCX/CreateClaimCard.tsx +++ b/src/Components/HCX/CreateClaimCard.tsx @@ -1,18 +1,23 @@ import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { getConsultation, HCXActions } from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications"; -import { classNames, formatCurrency } from "../../Utils/utils"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; -import ClaimsItemsBuilder from "./ClaimsItemsBuilder"; -import { HCXClaimModel, HCXPolicyModel, HCXItemModel } from "./models"; -import HCXPolicyEligibilityCheck from "./PolicyEligibilityCheck"; -import DialogModal from "../Common/Dialog"; -import PatientInsuranceDetailsEditor from "./PatientInsuranceDetailsEditor"; -import ClaimCreatedModal from "./ClaimCreatedModal"; -import { ProcedureType } from "../Common/prescription-builder/ProcedureBuilder"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2, { Submit } from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import { ProcedureType } from "@/Components/Common/prescription-builder/ProcedureBuilder"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import ClaimCreatedModal from "@/Components/HCX/ClaimCreatedModal"; +import ClaimsItemsBuilder from "@/Components/HCX/ClaimsItemsBuilder"; +import { + HCXClaimModel, + HCXPolicyModel, + HCXItemModel, +} from "@/Components/HCX/models"; +import PatientInsuranceDetailsEditor from "@/Components/HCX/PatientInsuranceDetailsEditor"; +import HCXPolicyEligibilityCheck from "@/Components/HCX/PolicyEligibilityCheck"; +import { getConsultation, HCXActions } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications"; +import { classNames, formatCurrency } from "@/Utils/utils"; interface Props { consultationId: string; diff --git a/src/Components/HCX/InsuranceDetailsBuilder.tsx b/src/Components/HCX/InsuranceDetailsBuilder.tsx index 5482c48149f..95a5a538d0e 100644 --- a/src/Components/HCX/InsuranceDetailsBuilder.tsx +++ b/src/Components/HCX/InsuranceDetailsBuilder.tsx @@ -1,18 +1,19 @@ +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useConfig from "@/Common/hooks/useConfig"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import FormField, { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { FieldChangeEvent, FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import FormField, { FieldLabel } from "../Form/FormFields/FormField"; -import { HCXPolicyModel } from "./models"; -import ButtonV2 from "../Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { useDispatch } from "react-redux"; -import { HCXActions } from "../../Redux/actions"; -import { classNames } from "../../Utils/utils"; -import InsurerAutocomplete from "./InsurerAutocomplete"; -import useConfig from "../../Common/hooks/useConfig"; +} from "@/Components/Form/FormFields/Utils"; +import InsurerAutocomplete from "@/Components/HCX/InsurerAutocomplete"; +import { HCXPolicyModel } from "@/Components/HCX/models"; +import { HCXActions } from "@/Redux/actions"; +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { gridView?: boolean }; diff --git a/src/Components/HCX/InsurerAutocomplete.tsx b/src/Components/HCX/InsurerAutocomplete.tsx index ca73822410c..2c2a1ad2533 100644 --- a/src/Components/HCX/InsurerAutocomplete.tsx +++ b/src/Components/HCX/InsurerAutocomplete.tsx @@ -1,11 +1,11 @@ -import { useAsyncOptions } from "../../Common/hooks/useAsyncOptions"; -import { HCXActions } from "../../Redux/actions"; -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; +import { useAsyncOptions } from "@/Common/hooks/useAsyncOptions"; +import { Autocomplete } from "@/Components/Form/FormFields/Autocomplete"; +import FormField from "@/Components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/Components/Form/FormFields/Utils"; +import { HCXActions } from "@/Redux/actions"; export type InsurerOptionModel = { name: string; diff --git a/src/Components/HCX/PatientInsuranceDetailsEditor.tsx b/src/Components/HCX/PatientInsuranceDetailsEditor.tsx index c11d2266aba..4cb95a2fd53 100644 --- a/src/Components/HCX/PatientInsuranceDetailsEditor.tsx +++ b/src/Components/HCX/PatientInsuranceDetailsEditor.tsx @@ -1,12 +1,16 @@ import { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { HCXActions } from "../../Redux/actions"; -import * as Notifications from "../../Utils/Notifications"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import InsuranceDetailsBuilder from "./InsuranceDetailsBuilder"; -import { HCXPolicyModel } from "./models"; -import HCXPolicyValidator from "./validators"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import InsuranceDetailsBuilder from "@/Components/HCX/InsuranceDetailsBuilder"; +import { HCXPolicyModel } from "@/Components/HCX/models"; +import HCXPolicyValidator from "@/Components/HCX/validators"; +import { HCXActions } from "@/Redux/actions"; +import * as Notifications from "@/Utils/Notifications"; interface Props { patient: string; diff --git a/src/Components/HCX/PolicyEligibilityCheck.tsx b/src/Components/HCX/PolicyEligibilityCheck.tsx index 42aa3caa87d..1eb1d33280f 100644 --- a/src/Components/HCX/PolicyEligibilityCheck.tsx +++ b/src/Components/HCX/PolicyEligibilityCheck.tsx @@ -1,12 +1,13 @@ import { useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { HCXActions } from "../../Redux/actions"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { HCXPolicyModel } from "./models"; -import { useMessageListener } from "../../Common/hooks/useMessageListener"; -import * as Notification from "../../Utils/Notifications.js"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { useMessageListener } from "@/Common/hooks/useMessageListener"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { HCXPolicyModel } from "@/Components/HCX/models"; +import { HCXActions } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; interface Props { className?: string; diff --git a/src/Components/HCX/models.ts b/src/Components/HCX/models.ts index 7e624c474d7..d4a8fe14c74 100644 --- a/src/Components/HCX/models.ts +++ b/src/Components/HCX/models.ts @@ -1,6 +1,6 @@ -import { ConsultationModel } from "../Facility/models"; -import { PatientModel } from "../Patient/models"; -import { PerformedByModel } from "./misc"; +import { ConsultationModel } from "@/Components/Facility/models"; +import { PerformedByModel } from "@/Components/HCX/misc"; +import { PatientModel } from "@/Components/Patient/models"; export type HCXPriority = "Immediate" | "Normal" | "Deferred"; diff --git a/src/Components/HCX/validators.ts b/src/Components/HCX/validators.ts index 4a6875a85fe..0eb66451740 100644 --- a/src/Components/HCX/validators.ts +++ b/src/Components/HCX/validators.ts @@ -1,5 +1,5 @@ -import { FieldValidator } from "../Form/FieldValidators"; -import { HCXPolicyModel } from "./models"; +import { FieldValidator } from "@/Components/Form/FieldValidators"; +import { HCXPolicyModel } from "@/Components/HCX/models"; const HCXPolicyValidator: FieldValidator = ( value, diff --git a/src/Components/Medicine/AdministerMedicine.tsx b/src/Components/Medicine/AdministerMedicine.tsx index 8798b476b06..4ba8a074d04 100644 --- a/src/Components/Medicine/AdministerMedicine.tsx +++ b/src/Components/Medicine/AdministerMedicine.tsx @@ -1,18 +1,19 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { Prescription } from "./models"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { Success } from "../../Utils/Notifications"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { formatDateTime } from "../../Utils/utils"; 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 request from "../../Utils/request/request"; -import MedicineRoutes from "./routes"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useSlug from "@/Common/hooks/useSlug"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { Prescription } from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import dayjs from "@/Utils/dayjs"; +import { Success } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; interface Props { prescription: Prescription; diff --git a/src/Components/Medicine/CreatePrescriptionForm.tsx b/src/Components/Medicine/CreatePrescriptionForm.tsx index d6691ebbc03..4f9a808ba4d 100644 --- a/src/Components/Medicine/CreatePrescriptionForm.tsx +++ b/src/Components/Medicine/CreatePrescriptionForm.tsx @@ -1,19 +1,23 @@ -import { RequiredFieldValidator } from "../Form/FieldValidators"; -import Form from "../Form/Form"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { MedicineAdministrationRecord, Prescription } from "./models"; import { useState } from "react"; -import NumericWithUnitsFormField from "../Form/FormFields/NumericWithUnitsFormField"; import { useTranslation } from "react-i18next"; -import MedibaseAutocompleteFormField from "./MedibaseAutocompleteFormField"; -import dayjs from "../../Utils/dayjs"; -import { PrescriptionFormValidator } from "./validators"; -import MedicineRoutes from "./routes"; -import request from "../../Utils/request/request"; -import useSlug from "../../Common/hooks/useSlug"; -import { Success } from "../../Utils/Notifications"; + +import useSlug from "@/Common/hooks/useSlug"; +import { RequiredFieldValidator } from "@/Components/Form/FieldValidators"; +import Form from "@/Components/Form/Form"; +import NumericWithUnitsFormField from "@/Components/Form/FormFields/NumericWithUnitsFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import MedibaseAutocompleteFormField from "@/Components/Medicine/MedibaseAutocompleteFormField"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/Components/Medicine/models"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import { PrescriptionFormValidator } from "@/Components/Medicine/validators"; +import dayjs from "@/Utils/dayjs"; +import { Success } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; export default function CreatePrescriptionForm(props: { prescription: Prescription; diff --git a/src/Components/Medicine/DiscontinuePrescription.tsx b/src/Components/Medicine/DiscontinuePrescription.tsx index f54ba9974fc..0bc7fe4f7e0 100644 --- a/src/Components/Medicine/DiscontinuePrescription.tsx +++ b/src/Components/Medicine/DiscontinuePrescription.tsx @@ -1,13 +1,14 @@ import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { Prescription } from "./models"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { Success } from "../../Utils/Notifications"; -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"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import { Prescription } from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import { Success } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; interface Props { prescription: Prescription; diff --git a/src/Components/Medicine/EditPrescriptionForm.tsx b/src/Components/Medicine/EditPrescriptionForm.tsx index 42a9b39f7ea..6ee90c49d9e 100644 --- a/src/Components/Medicine/EditPrescriptionForm.tsx +++ b/src/Components/Medicine/EditPrescriptionForm.tsx @@ -1,21 +1,22 @@ import { useState } from "react"; -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 { RequiredFieldValidator } from "../Form/FieldValidators"; import { useTranslation } from "react-i18next"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import NumericWithUnitsFormField from "../Form/FormFields/NumericWithUnitsFormField"; + +import useSlug from "@/Common/hooks/useSlug"; +import { RequiredFieldValidator } from "@/Components/Form/FieldValidators"; +import Form from "@/Components/Form/Form"; +import NumericWithUnitsFormField from "@/Components/Form/FormFields/NumericWithUnitsFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { PRESCRIPTION_FREQUENCIES, PRESCRIPTION_ROUTES, -} from "./CreatePrescriptionForm"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { EditPrescriptionFormValidator } from "./validators"; -import MedicineRoutes from "./routes"; +} from "@/Components/Medicine/CreatePrescriptionForm"; +import { Prescription } from "@/Components/Medicine/models"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import { EditPrescriptionFormValidator } from "@/Components/Medicine/validators"; +import * as Notification from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; interface Props { initial: Prescription; diff --git a/src/Components/Medicine/ManagePrescriptions.tsx b/src/Components/Medicine/ManagePrescriptions.tsx index 16e8ffedcb2..38b1e5ec589 100644 --- a/src/Components/Medicine/ManagePrescriptions.tsx +++ b/src/Components/Medicine/ManagePrescriptions.tsx @@ -1,9 +1,10 @@ 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 PrescriptionBuilder from "./PrescriptionBuilder"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import PrescriptionBuilder from "@/Components/Medicine/PrescriptionBuilder"; export default function ManagePrescriptions() { const { t } = useTranslation(); diff --git a/src/Components/Medicine/MedibaseAutocompleteFormField.tsx b/src/Components/Medicine/MedibaseAutocompleteFormField.tsx index 2b5612f6f32..5e3c116151b 100644 --- a/src/Components/Medicine/MedibaseAutocompleteFormField.tsx +++ b/src/Components/Medicine/MedibaseAutocompleteFormField.tsx @@ -1,14 +1,15 @@ import { useEffect, useState } from "react"; -import Switch from "../../CAREUI/interactive/Switch"; -import { useAsyncOptions } from "../../Common/hooks/useAsyncOptions"; -import { listMedibaseMedicines } from "../../Redux/actions"; -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; + +import Switch from "@/CAREUI/interactive/Switch"; +import { useAsyncOptions } from "@/Common/hooks/useAsyncOptions"; +import { Autocomplete } from "@/Components/Form/FormFields/Autocomplete"; +import FormField from "@/Components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import { MedibaseMedicine } from "./models"; +} from "@/Components/Form/FormFields/Utils"; +import { MedibaseMedicine } from "@/Components/Medicine/models"; +import { listMedibaseMedicines } from "@/Redux/actions"; export default function MedibaseAutocompleteFormField( props: FormFieldBaseProps diff --git a/src/Components/Medicine/MedicineAdministration.tsx b/src/Components/Medicine/MedicineAdministration.tsx index d899a3800fb..64dbf30d838 100644 --- a/src/Components/Medicine/MedicineAdministration.tsx +++ b/src/Components/Medicine/MedicineAdministration.tsx @@ -1,18 +1,22 @@ import { useEffect, useMemo, useState } from "react"; -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 CareIcon from "../../CAREUI/icons/CareIcon"; -import { Error, Success } from "../../Utils/Notifications"; -import { classNames, formatDateTime } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -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 CareIcon from "@/CAREUI/icons/CareIcon"; +import useSlug from "@/Common/hooks/useSlug"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import dayjs from "@/Utils/dayjs"; +import { Error, Success } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; +import { classNames, formatDateTime } from "@/Utils/utils"; interface Props { prescriptions: Prescription[]; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx index 9869b677cd2..700e489289b 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx @@ -1,11 +1,15 @@ -import dayjs from "../../../Utils/dayjs"; -import { MedicineAdministrationRecord, Prescription } from "../models"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { classNames, formatDateTime, formatTime } from "../../../Utils/utils"; -import DialogModal from "../../Common/Dialog"; -import PrescrpitionActivityTimeline from "../PrescrpitionTimeline"; import { useState } from "react"; -import PrescriptionDetailCard from "../PrescriptionDetailCard"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import DialogModal from "@/Components/Common/Dialog"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import PrescrpitionActivityTimeline from "@/Components/Medicine/PrescrpitionTimeline"; +import dayjs from "@/Utils/dayjs"; +import { classNames, formatDateTime, formatTime } from "@/Utils/utils"; interface Props { administrations: MedicineAdministrationRecord[]; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx index a83fa38bd9c..f3f075e1409 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx @@ -1,4 +1,4 @@ -import { formatDateTime } from "../../../Utils/utils"; +import { formatDateTime } from "@/Utils/utils"; export default function AdministrationEventSeperator({ date }: { date: Date }) { // Show date if it's 00:00 diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx index 9de207146de..06d32a90178 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx @@ -1,10 +1,11 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useRangePagination from "../../../Common/hooks/useRangePagination"; -import { classNames, formatDateTime } from "../../../Utils/utils"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import { Prescription } from "../models"; -import MedicineAdministrationTableRow from "./AdministrationTableRow"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useRangePagination from "@/Common/hooks/useRangePagination"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import MedicineAdministrationTableRow from "@/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow"; +import { Prescription } from "@/Components/Medicine/models"; +import { classNames, formatDateTime } from "@/Utils/utils"; interface Props { prescriptions: Prescription[]; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx index 30ab68dcf0b..7371dbafceb 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx @@ -1,19 +1,23 @@ -import { useTranslation } from "react-i18next"; -import { Prescription } from "../models"; 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 DiscontinuePrescription from "../DiscontinuePrescription"; -import AdministerMedicine from "../AdministerMedicine"; -import DialogModal from "../../Common/Dialog"; -import PrescriptionDetailCard from "../PrescriptionDetailCard"; -import ButtonV2, { Cancel, Submit } from "../../Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import EditPrescriptionForm from "../EditPrescriptionForm"; -import AdministrationEventSeperator from "./AdministrationEventSeperator"; -import AdministrationEventCell from "./AdministrationEventCell"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useSlug from "@/Common/hooks/useSlug"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import AdministerMedicine from "@/Components/Medicine/AdministerMedicine"; +import DiscontinuePrescription from "@/Components/Medicine/DiscontinuePrescription"; +import EditPrescriptionForm from "@/Components/Medicine/EditPrescriptionForm"; +import AdministrationEventCell from "@/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell"; +import AdministrationEventSeperator from "@/Components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator"; +import { Prescription } from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime } from "@/Utils/utils"; interface Props { prescription: Prescription; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx b/src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx index abd609871c8..cc2842a6cc9 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx @@ -1,10 +1,11 @@ -import { useTranslation } from "react-i18next"; -import { Prescription } from "../models"; import { useState } from "react"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import SlideOver from "../../../CAREUI/interactive/SlideOver"; -import MedicineAdministration from "../MedicineAdministration"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import MedicineAdministration from "@/Components/Medicine/MedicineAdministration"; +import { Prescription } from "@/Components/Medicine/models"; interface Props { prescriptions: Prescription[]; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx index 187d5447314..fab85b690dd 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx @@ -1,18 +1,19 @@ -import { useTranslation } from "react-i18next"; -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 SubHeading from "../../../CAREUI/display/SubHeading"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import BulkAdminister from "./BulkAdminister"; -import useRangePagination from "../../../Common/hooks/useRangePagination"; -import MedicineAdministrationTable from "./AdministrationTable"; -import Loading from "../../Common/Loading"; -import ScrollOverlay from "../../../CAREUI/interactive/ScrollOverlay"; +import { useTranslation } from "react-i18next"; + +import SubHeading from "@/CAREUI/display/SubHeading"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ScrollOverlay from "@/CAREUI/interactive/ScrollOverlay"; +import useBreakpoints from "@/Common/hooks/useBreakpoints"; +import useRangePagination from "@/Common/hooks/useRangePagination"; +import useSlug from "@/Common/hooks/useSlug"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Loading from "@/Components/Common/Loading"; +import MedicineAdministrationTable from "@/Components/Medicine/MedicineAdministrationSheet/AdministrationTable"; +import BulkAdminister from "@/Components/Medicine/MedicineAdministrationSheet/BulkAdminister"; +import { computeActivityBounds } from "@/Components/Medicine/MedicineAdministrationSheet/utils"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import useQuery from "@/Utils/request/useQuery"; interface Props { readonly?: boolean; diff --git a/src/Components/Medicine/MedicineAdministrationSheet/utils.ts b/src/Components/Medicine/MedicineAdministrationSheet/utils.ts index 93ee5fb4b08..3650d13aa60 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/utils.ts +++ b/src/Components/Medicine/MedicineAdministrationSheet/utils.ts @@ -1,4 +1,4 @@ -import { Prescription } from "../models"; +import { Prescription } from "@/Components/Medicine/models"; export function computeActivityBounds(prescriptions: Prescription[]) { // get start by finding earliest of all presciption's created_date diff --git a/src/Components/Medicine/PrescriptionBuilder.tsx b/src/Components/Medicine/PrescriptionBuilder.tsx index 39bf9b2f506..0d2b61c9163 100644 --- a/src/Components/Medicine/PrescriptionBuilder.tsx +++ b/src/Components/Medicine/PrescriptionBuilder.tsx @@ -1,16 +1,21 @@ import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NormalPrescription, Prescription, PRNPrescription } from "./models"; -import DialogModal from "../Common/Dialog"; -import CreatePrescriptionForm from "./CreatePrescriptionForm"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; -import DiscontinuePrescription from "./DiscontinuePrescription"; -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 CareIcon from "@/CAREUI/icons/CareIcon"; +import useSlug from "@/Common/hooks/useSlug"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import AdministerMedicine from "@/Components/Medicine/AdministerMedicine"; +import CreatePrescriptionForm from "@/Components/Medicine/CreatePrescriptionForm"; +import DiscontinuePrescription from "@/Components/Medicine/DiscontinuePrescription"; +import { + NormalPrescription, + Prescription, + PRNPrescription, +} from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import useQuery from "@/Utils/request/useQuery"; interface Props { prescription_type?: Prescription["prescription_type"]; diff --git a/src/Components/Medicine/PrescriptionDetailCard.tsx b/src/Components/Medicine/PrescriptionDetailCard.tsx index 4333eeb1a88..cd6854ad9d1 100644 --- a/src/Components/Medicine/PrescriptionDetailCard.tsx +++ b/src/Components/Medicine/PrescriptionDetailCard.tsx @@ -1,10 +1,11 @@ -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 { useTranslation } from "react-i18next"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ReadMore from "@/Components/Common/components/Readmore"; +import { Prescription } from "@/Components/Medicine/models"; +import { classNames } from "@/Utils/utils"; export default function PrescriptionDetailCard({ prescription, diff --git a/src/Components/Medicine/PrescriptionsTable.tsx b/src/Components/Medicine/PrescriptionsTable.tsx index a1b039e71dd..5c473c7a675 100644 --- a/src/Components/Medicine/PrescriptionsTable.tsx +++ b/src/Components/Medicine/PrescriptionsTable.tsx @@ -1,20 +1,24 @@ import { useState } from "react"; -import ResponsiveMedicineTable from "./ResponsiveMedicineTables"; -import { formatDateTime } from "../../Utils/utils"; -import { Prescription } from "./models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import MedicineAdministration from "./MedicineAdministration"; -import DiscontinuePrescription from "./DiscontinuePrescription"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import AdministerMedicine from "./AdministerMedicine"; -import DialogModal from "../Common/Dialog"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; import { useTranslation } from "react-i18next"; -import useSlug from "../../Common/hooks/useSlug"; -import useQuery from "../../Utils/request/useQuery"; -import MedicineRoutes from "./routes"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import useSlug from "@/Common/hooks/useSlug"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import AdministerMedicine from "@/Components/Medicine/AdministerMedicine"; +import DiscontinuePrescription from "@/Components/Medicine/DiscontinuePrescription"; +import MedicineAdministration from "@/Components/Medicine/MedicineAdministration"; +import { Prescription } from "@/Components/Medicine/models"; +import PrescriptionDetailCard from "@/Components/Medicine/PrescriptionDetailCard"; +import ResponsiveMedicineTable from "@/Components/Medicine/ResponsiveMedicineTables"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; interface Props { is_prn?: boolean; diff --git a/src/Components/Medicine/PrescrpitionTimeline.tsx b/src/Components/Medicine/PrescrpitionTimeline.tsx index 7c6d4479e3b..578c2e9c3cf 100644 --- a/src/Components/Medicine/PrescrpitionTimeline.tsx +++ b/src/Components/Medicine/PrescrpitionTimeline.tsx @@ -1,20 +1,24 @@ -import dayjs from "../../Utils/dayjs"; -import useSlug from "../../Common/hooks/useSlug"; -import useQuery from "../../Utils/request/useQuery"; -import { classNames, formatDateTime } from "../../Utils/utils"; -import { MedicineAdministrationRecord, Prescription } from "./models"; -import MedicineRoutes from "./routes"; +import { useState } from "react"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; import Timeline, { TimelineEvent, TimelineNode, TimelineNodeNotes, -} from "../../CAREUI/display/Timeline"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { useState } from "react"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import request from "../../Utils/request/request"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +} from "@/CAREUI/display/Timeline"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import useSlug from "@/Common/hooks/useSlug"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/Components/Medicine/models"; +import MedicineRoutes from "@/Components/Medicine/routes"; +import dayjs from "@/Utils/dayjs"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime } from "@/Utils/utils"; interface MedicineAdministeredEvent extends TimelineEvent<"administered"> { administration: MedicineAdministrationRecord; diff --git a/src/Components/Medicine/ResponsiveMedicineTables.tsx b/src/Components/Medicine/ResponsiveMedicineTables.tsx index ccec9a7c69d..6bb13076cf1 100644 --- a/src/Components/Medicine/ResponsiveMedicineTables.tsx +++ b/src/Components/Medicine/ResponsiveMedicineTables.tsx @@ -1,6 +1,7 @@ import { useEffect, useState } from "react"; -import AccordionV2 from "../Common/components/AccordionV2"; -import { classNames } from "../../Utils/utils"; + +import AccordionV2 from "@/Components/Common/components/AccordionV2"; +import { classNames } from "@/Utils/utils"; function getWindowSize() { const { innerWidth, innerHeight } = window; diff --git a/src/Components/Medicine/models.ts b/src/Components/Medicine/models.ts index ee42b03eca2..1cf30110a2b 100644 --- a/src/Components/Medicine/models.ts +++ b/src/Components/Medicine/models.ts @@ -1,4 +1,4 @@ -import { PerformedByModel } from "../HCX/misc"; +import { PerformedByModel } from "@/Components/HCX/misc"; interface BasePrescription { readonly id: string; diff --git a/src/Components/Medicine/routes.ts b/src/Components/Medicine/routes.ts index c0c4a602227..c5efed6cb86 100644 --- a/src/Components/Medicine/routes.ts +++ b/src/Components/Medicine/routes.ts @@ -1,6 +1,9 @@ -import { Type } from "../../Redux/api"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { MedicineAdministrationRecord, Prescription } from "./models"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/Components/Medicine/models"; +import { Type } from "@/Redux/api"; +import { PaginatedResponse } from "@/Utils/request/types"; const MedicineRoutes = { listPrescriptions: { diff --git a/src/Components/Medicine/validators.ts b/src/Components/Medicine/validators.ts index 40261646d05..032ddf92afb 100644 --- a/src/Components/Medicine/validators.ts +++ b/src/Components/Medicine/validators.ts @@ -1,6 +1,9 @@ -import { FieldError, RequiredFieldValidator } from "../Form/FieldValidators"; -import { FormErrors } from "../Form/Utils"; -import { Prescription } from "./models"; +import { + FieldError, + RequiredFieldValidator, +} from "@/Components/Form/FieldValidators"; +import { FormErrors } from "@/Components/Form/Utils"; +import { Prescription } from "@/Components/Medicine/models"; export const PrescriptionFormValidator = () => { return (form: Prescription): FormErrors => { diff --git a/src/Components/Notifications/NoticeBoard.tsx b/src/Components/Notifications/NoticeBoard.tsx index 7fd16efb3cf..990a660eafa 100644 --- a/src/Components/Notifications/NoticeBoard.tsx +++ b/src/Components/Notifications/NoticeBoard.tsx @@ -1,11 +1,12 @@ import { useEffect, useState } from "react"; -import { useDispatch } from "react-redux"; -import { getNotifications } from "../../Redux/actions"; -import Page from "../Common/components/Page"; -import Loading from "../Common/Loading"; -import { formatDateTime } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import Page from "@/Components/Common/components/Page"; +import Loading from "@/Components/Common/Loading"; +import { getNotifications } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; export const NoticeBoard = () => { const dispatch: any = useDispatch(); diff --git a/src/Components/Notifications/NotificationsList.tsx b/src/Components/Notifications/NotificationsList.tsx index 5f124516a14..8c91f34990d 100644 --- a/src/Components/Notifications/NotificationsList.tsx +++ b/src/Components/Notifications/NotificationsList.tsx @@ -1,29 +1,30 @@ +import * as Sentry from "@sentry/browser"; import { navigate } from "raviger"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import { NOTIFICATION_EVENTS } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { + ShrinkedSidebarItem, + SidebarItem, +} from "@/Components/Common/Sidebar/SidebarItem"; +import Spinner from "@/Components/Common/Spinner"; +import SelectMenuV2 from "@/Components/Form/SelectMenuV2"; import { getNotifications, markNotificationAsRead, getUserPnconfig, updateUserPnconfig, getPublicKey, -} from "../../Redux/actions"; -import Spinner from "../Common/Spinner"; -import { NOTIFICATION_EVENTS } from "../../Common/constants"; -import { Error } from "../../Utils/Notifications.js"; -import { classNames, formatDateTime } from "../../Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import * as Sentry from "@sentry/browser"; -import { - ShrinkedSidebarItem, - SidebarItem, -} from "../Common/Sidebar/SidebarItem"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import ButtonV2 from "../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"; +} from "@/Redux/actions"; +import { Error } from "@/Utils/Notifications.js"; +import { classNames, formatDateTime } from "@/Utils/utils"; const RESULT_LIMIT = 14; diff --git a/src/Components/Notifications/ShowPushNotification.tsx b/src/Components/Notifications/ShowPushNotification.tsx index 09b62bb9333..e70bc1049d3 100644 --- a/src/Components/Notifications/ShowPushNotification.tsx +++ b/src/Components/Notifications/ShowPushNotification.tsx @@ -1,7 +1,8 @@ -import { useDispatch } from "react-redux"; -import { getNotificationData } from "../../Redux/actions"; import { useEffect } from "react"; -import { DetailRoute } from "../../Routers/types"; +import { useDispatch } from "react-redux"; + +import { getNotificationData } from "@/Redux/actions"; +import { DetailRoute } from "@/Routers/types"; export default function ShowPushNotification({ id }: DetailRoute) { const dispatch: any = useDispatch(); diff --git a/src/Components/Patient/DailyRoundListDetails.tsx b/src/Components/Patient/DailyRoundListDetails.tsx index 9ac68a20ca7..85133201b44 100644 --- a/src/Components/Patient/DailyRoundListDetails.tsx +++ b/src/Components/Patient/DailyRoundListDetails.tsx @@ -1,12 +1,13 @@ import { lazy, useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { CURRENT_HEALTH_CHANGE, SYMPTOM_CHOICES } from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { getConsultationDailyRoundsDetails } from "../../Redux/actions"; -import { DailyRoundsModel } from "./models"; -import Page from "../Common/components/Page"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { formatDateTime } from "../../Utils/utils"; + +import { CURRENT_HEALTH_CHANGE, SYMPTOM_CHOICES } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { DailyRoundsModel } from "@/Components/Patient/models"; +import { getConsultationDailyRoundsDetails } from "@/Redux/actions"; +import { formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); const symptomChoices = [...SYMPTOM_CHOICES]; const currentHealthChoices = [...CURRENT_HEALTH_CHANGE]; diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index ff749aed29e..2cccc2b5293 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -1,40 +1,41 @@ -import { navigate } from "raviger"; - import dayjs from "dayjs"; +import { navigate } from "raviger"; import { lazy, useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; + import { PATIENT_CATEGORIES, REVIEW_AT_CHOICES, RHYTHM_CHOICES, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import BloodPressureFormField, { + meanArterialPressure, +} from "@/Components/Common/BloodPressureFormField"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { SymptomsSelect } from "@/Components/Common/SymptomsSelect"; +import TemperatureFormField from "@/Components/Common/TemperatureFormField"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import RangeAutocompleteFormField from "@/Components/Form/FormFields/RangeAutocompleteFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import PatientCategorySelect from "@/Components/Patient/PatientCategorySelect"; import { createDailyReport, getConsultationDailyRoundsDetails, getDailyReport, getPatient, updateDailyReport, -} from "../../Redux/actions"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import * as Notification from "../../Utils/Notifications"; -import { formatDateTime } from "../../Utils/utils"; -import BloodPressureFormField, { - meanArterialPressure, -} from "../Common/BloodPressureFormField"; -import { SymptomsSelect } from "../Common/SymptomsSelect"; -import TemperatureFormField from "../Common/TemperatureFormField"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import RangeAutocompleteFormField from "../Form/FormFields/RangeAutocompleteFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import PatientCategorySelect from "./PatientCategorySelect"; +} from "@/Redux/actions"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import { formatDateTime } from "@/Utils/utils"; + const Loading = lazy(() => import("../Common/Loading")); const initForm: any = { diff --git a/src/Components/Patient/FileUpload.tsx b/src/Components/Patient/FileUpload.tsx index f4d02404b7f..96fd1871237 100644 --- a/src/Components/Patient/FileUpload.tsx +++ b/src/Components/Patient/FileUpload.tsx @@ -1,5 +1,5 @@ import axios from "axios"; -import CircularProgress from "../Common/components/CircularProgress"; +import imageCompression from "browser-image-compression"; import { useCallback, useState, @@ -8,37 +8,41 @@ import { lazy, ChangeEvent, } from "react"; +import { useTranslation } from "react-i18next"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +import Webcam from "react-webcam"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; +import { RESULTS_PER_PAGE_LIMIT } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import useWindowDimensions from "@/Common/hooks/useWindowDimensions"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2, { + Cancel, + Submit, +} from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import Page from "@/Components/Common/components/Page"; +import DialogModal from "@/Components/Common/Dialog"; +import FilePreviewDialog from "@/Components/Common/FilePreviewDialog"; +import HeadedTabs from "@/Components/Common/HeadedTabs"; +import Pagination from "@/Components/Common/Pagination"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FileUploadModel } from "@/Components/Patient/models"; import { viewUpload, retrieveUpload, createUpload, getPatient, editUpload, -} from "../../Redux/actions"; -import { FileUploadModel } from "./models"; -import * as Notification from "../../Utils/Notifications.js"; -import { VoiceRecorder } from "../../Utils/VoiceRecorder"; -import Pagination from "../Common/Pagination"; -import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; -import imageCompression from "browser-image-compression"; -import { formatDateTime } from "../../Utils/utils"; -import { useTranslation } from "react-i18next"; -import HeadedTabs from "../Common/HeadedTabs"; -import ButtonV2, { Cancel, Submit } from "../Common/components/ButtonV2"; -import DialogModal from "../Common/Dialog"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import Webcam from "react-webcam"; -import useWindowDimensions from "../../Common/hooks/useWindowDimensions"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import AuthorizedChild from "../../CAREUI/misc/AuthorizedChild"; -import Page from "../Common/components/Page"; -import FilePreviewDialog from "../Common/FilePreviewDialog"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +} from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatDateTime } from "@/Utils/utils"; +import { VoiceRecorder } from "@/Utils/VoiceRecorder"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Patient/LegacyPatientVitalsCard.tsx b/src/Components/Patient/LegacyPatientVitalsCard.tsx index 6577e4920d4..168a180102d 100644 --- a/src/Components/Patient/LegacyPatientVitalsCard.tsx +++ b/src/Components/Patient/LegacyPatientVitalsCard.tsx @@ -1,11 +1,12 @@ import { ReactNode, useEffect, useRef, useState } from "react"; import { useDispatch } from "react-redux"; -import { listAssetBeds, getPermittedFacility } from "../../Redux/actions"; -import { classNames } from "../../Utils/utils"; -import { AssetData } from "../Assets/AssetTypes"; -import ToolTip from "../Common/utils/Tooltip"; -import { PatientModel } from "./models"; -import Waveform, { WaveformType } from "./Waveform"; + +import { AssetData } from "@/Components/Assets/AssetTypes"; +import ToolTip from "@/Components/Common/utils/Tooltip"; +import { PatientModel } from "@/Components/Patient/models"; +import Waveform, { WaveformType } from "@/Components/Patient/Waveform"; +import { listAssetBeds, getPermittedFacility } from "@/Redux/actions"; +import { classNames } from "@/Utils/utils"; export interface IPatientVitalsCardProps { facilityId?: string; diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index 24762d10279..886771a7c97 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -1,5 +1,15 @@ -import * as Notification from "../../Utils/Notifications.js"; +import dayjs from "dayjs"; +import { Link, navigate } from "raviger"; +import { ReactNode, lazy, useCallback, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; +import Chip from "@/CAREUI/display/Chip"; +import CountBlock from "@/CAREUI/display/Count"; +import FilterBadge from "@/CAREUI/display/FilterBadge"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; import { ADMITTED_TO, DISCHARGE_REASONS, @@ -8,49 +18,35 @@ import { PATIENT_SORT_OPTIONS, RESPIRATORY_SUPPORT, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; -import { FacilityModel, PatientCategory } from "../Facility/models"; -import { Link, navigate } from "raviger"; -import { ReactNode, lazy, useCallback, useEffect, useState } from "react"; +} from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser.js"; +import useFilters from "@/Common/hooks/useFilters"; +import { statusType, useAbortableEffect, parseOptionId } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import SwitchTabs from "@/Components/Common/components/SwitchTabs"; +import { ExportMenu } from "@/Components/Common/Export"; +import SortDropdownMenu from "@/Components/Common/SortDropdown"; +import FacilitiesSelectDialogue from "@/Components/ExternalResult/FacilitiesSelectDialogue"; +import DoctorVideoSlideover from "@/Components/Facility/DoctorVideoSlideover"; +import { FacilityModel, PatientCategory } from "@/Components/Facility/models"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import SearchInput from "@/Components/Form/SearchInput"; +import PatientFilter from "@/Components/Patient/PatientFilter"; import { getAllPatient, getAnyFacility, getDistrict, getFacilityAssetLocation, getLocalBody, -} from "../../Redux/actions"; -import { - statusType, - useAbortableEffect, - parseOptionId, -} from "../../Common/utils"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import useQuery from "@/Utils/request/useQuery.js"; +import { formatAge, parsePhoneNumber } from "@/Utils/utils.js"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import ButtonV2 from "../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 FacilitiesSelectDialogue from "../ExternalResult/FacilitiesSelectDialogue"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import FilterBadge from "../../CAREUI/display/FilterBadge"; -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 SwitchTabs from "../Common/components/SwitchTabs"; -import { formatAge, parsePhoneNumber } from "../../Utils/utils.js"; -import { useDispatch } from "react-redux"; -import useFilters from "../../Common/hooks/useFilters"; -import { useTranslation } from "react-i18next"; -import Page from "../Common/components/Page.js"; -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 Page from "@/Components/Common/components/Page.js"; +import { triggerGoal } from "@/Integrations/Plausible.js"; +import routes from "@/Redux/api.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Patient/PatientCategorySelect.tsx b/src/Components/Patient/PatientCategorySelect.tsx index 9ecb2381121..4b5b64c8936 100644 --- a/src/Components/Patient/PatientCategorySelect.tsx +++ b/src/Components/Patient/PatientCategorySelect.tsx @@ -1,7 +1,7 @@ -import { PatientCategoryID, PATIENT_CATEGORIES } from "../../Common/constants"; -import { classNames } from "../../Utils/utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; +import { PatientCategoryID, PATIENT_CATEGORIES } from "@/Common/constants"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { FormFieldBaseProps } from "@/Components/Form/FormFields/Utils"; +import { classNames } from "@/Utils/utils"; /** * A `FormField` component to select patient category and is by default a mandatory diff --git a/src/Components/Patient/PatientFilter.tsx b/src/Components/Patient/PatientFilter.tsx index 7bc7f7b861f..c5f9509710e 100644 --- a/src/Components/Patient/PatientFilter.tsx +++ b/src/Components/Patient/PatientFilter.tsx @@ -1,6 +1,10 @@ +import dayjs from "dayjs"; +import { navigate } from "raviger"; import { useEffect, useCallback } from "react"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; import { GENDER_TYPES, FACILITY_TYPES, @@ -8,33 +12,26 @@ import { PATIENT_FILTER_CATEGORIES, ADMITTED_TO, DISCHARGE_REASONS, -} from "../../Common/constants"; -import { - getAllLocalBody, - getAnyFacility, - getDistrict, -} from "../../Redux/actions"; -import { useDispatch } from "react-redux"; -import { navigate } from "raviger"; -import DistrictSelect from "../Facility/FacilityFilter/DistrictSelect"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import TextFormField from "../Form/FormFields/TextFormField"; +} from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import useMergeState from "@/Common/hooks/useMergeState"; +import AccordionV2 from "@/Components/Common/components/AccordionV2"; +import { DateRange } from "@/Components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { LocationSelect } from "@/Components/Common/LocationSelect"; +import DistrictSelect from "@/Components/Facility/FacilityFilter/DistrictSelect"; +import AutoCompleteAsync from "@/Components/Form/AutoCompleteAsync"; +import DateRangeFormField from "@/Components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; import { FieldChangeEvent, FieldChangeEventHandler, -} from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import MultiSelectMenuV2 from "../Form/MultiSelectMenuV2"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import { DateRange } from "../Common/DateRangeInputV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useMergeState from "../../Common/hooks/useMergeState"; -import useConfig from "../../Common/hooks/useConfig"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import AccordionV2 from "../Common/components/AccordionV2"; -import { dateQueryString } from "../../Utils/utils"; -import dayjs from "dayjs"; -import { LocationSelect } from "../Common/LocationSelect"; +} from "@/Components/Form/FormFields/Utils"; +import MultiSelectMenuV2 from "@/Components/Form/MultiSelectMenuV2"; +import SelectMenuV2 from "@/Components/Form/SelectMenuV2"; +import { getAllLocalBody, getAnyFacility, getDistrict } from "@/Redux/actions"; +import { dateQueryString } from "@/Utils/utils"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); diff --git a/src/Components/Patient/PatientHome.tsx b/src/Components/Patient/PatientHome.tsx index b6ceaf2e4dc..d5c67b2b149 100644 --- a/src/Components/Patient/PatientHome.tsx +++ b/src/Components/Patient/PatientHome.tsx @@ -1,8 +1,25 @@ import { navigate } from "raviger"; import { lazy, useCallback, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; import { useDispatch } from "react-redux"; -import { GENDER_TYPES, SAMPLE_TEST_STATUS } from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; + +import Chip from "@/CAREUI/display/Chip"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { GENDER_TYPES, SAMPLE_TEST_STATUS } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import Page from "@/Components/Common/components/Page"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import Pagination from "@/Components/Common/Pagination"; +import RelativeDateUserMention from "@/Components/Common/RelativeDateUserMention"; +import UserAutocompleteFormField from "@/Components/Common/UserAutocompleteFormField"; +import { ConsultationCard } from "@/Components/Facility/ConsultationCard"; +import { ConsultationModel } from "@/Components/Facility/models"; +import { PatientModel, SampleTestModel } from "@/Components/Patient/models"; +import { SampleTestCard } from "@/Components/Patient/SampleTestCard"; +import { triggerGoal } from "@/Integrations/Plausible"; import { getConsultationList, listShiftRequests, @@ -11,27 +28,11 @@ import { patchSample, patchPatient, completeTransfer, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications"; -import Pagination from "../Common/Pagination"; -import { ConsultationCard } from "../Facility/ConsultationCard"; -import { ConsultationModel } from "../Facility/models"; -import { PatientModel, SampleTestModel } from "./models"; -import { SampleTestCard } from "./SampleTestCard"; -import Chip from "../../CAREUI/display/Chip"; -import { classNames, formatAge, formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useTranslation } from "react-i18next"; -import CircularProgress from "../Common/components/CircularProgress"; -import Page from "../Common/components/Page"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import UserAutocompleteFormField from "../Common/UserAutocompleteFormField"; -import dayjs from "../../Utils/dayjs"; -import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +} from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications"; +import { classNames, formatAge, formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index fd6213d8e08..e6ec8381cf5 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/Components/Patient/PatientInfoCard.tsx @@ -1,34 +1,37 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { Switch, Menu } from "@headlessui/react"; +import { Link } from "raviger"; +import { useState } from "react"; +import CareIcon from "@/CAREUI/icons/CareIcon"; import { CONSULTATION_SUGGESTION, DISCHARGE_REASONS, PATIENT_CATEGORIES, RESPIRATORY_SUPPORT, TELEMEDICINE_ACTIONS, -} from "../../Common/constants"; -import { ConsultationModel, PatientCategory } from "../Facility/models"; -import { Switch, Menu } from "@headlessui/react"; +} from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser.js"; +import useConfig from "@/Common/hooks/useConfig"; +import { getDimensionOrDash } from "@/Common/utils"; +import ABHAProfileModal from "@/Components/ABDM/ABHAProfileModal"; +import LinkABHANumberModal from "@/Components/ABDM/LinkABHANumberModal"; +import LinkCareContextModal from "@/Components/ABDM/LinkCareContextModal"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import DialogModal from "@/Components/Common/Dialog"; +import Beds from "@/Components/Facility/Consultations/Beds"; +import { + ConsultationModel, + PatientCategory, +} from "@/Components/Facility/models"; +import { PatientModel } from "@/Components/Patient/models"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request.js"; +import { classNames, formatDate, formatDateTime } from "@/Utils/utils.js"; -import { Link } from "raviger"; -import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useConfig from "../../Common/hooks/useConfig"; -import { getDimensionOrDash } from "../../Common/utils"; -import dayjs from "../../Utils/dayjs"; -import { classNames, formatDate, formatDateTime } from "../../Utils/utils.js"; -import ABHAProfileModal from "../ABDM/ABHAProfileModal"; -import LinkABHANumberModal from "../ABDM/LinkABHANumberModal"; -import LinkCareContextModal from "../ABDM/LinkCareContextModal"; -import DialogModal from "../Common/Dialog"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Beds from "../Facility/Consultations/Beds"; -import { PatientModel } from "./models"; -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"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; +import DropdownMenu from "@/Components/Common/components/Menu.js"; +import { triggerGoal } from "@/Integrations/Plausible.js"; +import routes from "@/Redux/api.js"; export default function PatientInfoCard(props: { patient: PatientModel; diff --git a/src/Components/Patient/PatientNotes.tsx b/src/Components/Patient/PatientNotes.tsx index c105619678b..497c4f119e6 100644 --- a/src/Components/Patient/PatientNotes.tsx +++ b/src/Components/Patient/PatientNotes.tsx @@ -1,20 +1,17 @@ +import { navigate } from "raviger"; import { useCallback, useState, useEffect } from "react"; import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { - getPatientNotes, - addPatientNote, - getPatient, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import PageTitle from "../Common/PageTitle"; -import Pagination from "../Common/Pagination"; -import { navigate } from "raviger"; -import { RESULTS_PER_PAGE_LIMIT } from "../../Common/constants"; -import Loading from "../Common/Loading"; -import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; + +import { RESULTS_PER_PAGE_LIMIT } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Loading from "@/Components/Common/Loading"; +import PageTitle from "@/Components/Common/PageTitle"; +import Pagination from "@/Components/Common/Pagination"; +import { getPatientNotes, addPatientNote, getPatient } from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatDateTime } from "@/Utils/utils"; interface PatientNotesProps { patientId: any; diff --git a/src/Components/Patient/PatientRegister.tsx b/src/Components/Patient/PatientRegister.tsx index 57a06877269..30f62b3db9d 100644 --- a/src/Components/Patient/PatientRegister.tsx +++ b/src/Components/Patient/PatientRegister.tsx @@ -1,5 +1,9 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { debounce } from "lodash-es"; +import { navigate, useQueryParams } from "raviger"; +import { lazy, useCallback, useEffect, useReducer, useState } from "react"; +import { useDispatch } from "react-redux"; +import CareIcon from "@/CAREUI/icons/CareIcon"; import { BLOOD_GROUPS, DISEASE_STATUS, @@ -7,7 +11,44 @@ import { MEDICAL_HISTORY_CHOICES, TEST_TYPE, VACCINES, -} from "../../Common/constants"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useConfig from "@/Common/hooks/useConfig"; +import countryList from "@/Common/static/countries.json"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { validatePincode } from "@/Common/validation"; +import LinkABHANumberModal from "@/Components/ABDM/LinkABHANumberModal"; +import AccordionV2 from "@/Components/Common/components/AccordionV2"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CollapseV2 from "@/Components/Common/components/CollapseV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import DialogModal from "@/Components/Common/Dialog"; +import Spinner from "@/Components/Common/Spinner"; +import DuplicatePatientDialog from "@/Components/Facility/DuplicatePatientDialog"; +import { DupPatientModel } from "@/Components/Facility/models"; +import TransferPatientDialog from "@/Components/Facility/TransferPatientDialog"; +import { + FieldError, + PhoneNumberValidator, + RequiredFieldValidator, +} from "@/Components/Form/FieldValidators"; +import Form from "@/Components/Form/Form"; +import { FormContextValue } from "@/Components/Form/FormContext.js"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import { + FieldErrorText, + FieldLabel, +} from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "@/Components/Form/FormFields/RadioFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import InsuranceDetailsBuilder from "@/Components/HCX/InsuranceDetailsBuilder"; +import { HCXPolicyModel } from "@/Components/HCX/models"; +import HCXPolicyValidator from "@/Components/HCX/validators"; +import { PatientModel } from "@/Components/Patient/models"; import { HCXActions, createPatient, @@ -20,54 +61,14 @@ import { getWardByLocalBody, searchPatient, updatePatient, -} from "../../Redux/actions"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; import { dateQueryString, getPincodeDetails, includesIgnoreCase, parsePhoneNumber, -} from "../../Utils/utils"; -import { navigate, useQueryParams } from "raviger"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { lazy, useCallback, useEffect, useReducer, useState } from "react"; - -import AccordionV2 from "../Common/components/AccordionV2"; -import ButtonV2 from "../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 DateFormField from "../Form/FormFields/DateFormField"; -import DialogModal from "../Common/Dialog"; -import { DupPatientModel } from "../Facility/models"; -import DuplicatePatientDialog from "../Facility/DuplicatePatientDialog"; -import { - FieldError, - PhoneNumberValidator, - RequiredFieldValidator, -} from "../Form/FieldValidators"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; -import Form from "../Form/Form"; -import { HCXPolicyModel } from "../HCX/models"; -import HCXPolicyValidator from "../HCX/validators"; -import InsuranceDetailsBuilder from "../HCX/InsuranceDetailsBuilder"; -import LinkABHANumberModal from "../ABDM/LinkABHANumberModal"; -import { PatientModel } from "./models"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import Spinner from "../Common/Spinner"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TransferPatientDialog from "../Facility/TransferPatientDialog"; -import countryList from "../../Common/static/countries.json"; -import { debounce } from "lodash-es"; - -import useAppHistory from "../../Common/hooks/useAppHistory"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import { validatePincode } from "../../Common/validation"; -import { FormContextValue } from "../Form/FormContext.js"; +} from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); const PageTitle = lazy(() => import("../Common/PageTitle")); diff --git a/src/Components/Patient/SampleDetails.tsx b/src/Components/Patient/SampleDetails.tsx index 7dca7cce78f..71d74b2cf7e 100644 --- a/src/Components/Patient/SampleDetails.tsx +++ b/src/Components/Patient/SampleDetails.tsx @@ -1,19 +1,18 @@ -import { FlowModel, SampleTestModel } from "./models"; -import { GENDER_TYPES, TEST_TYPE_CHOICES } from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { lazy, useCallback, useState } from "react"; - -import ButtonV2 from "../Common/components/ButtonV2"; -import Card from "../../CAREUI/display/Card"; -import { FileUpload } from "./FileUpload"; -import Page from "../Common/components/Page"; import { startCase, camelCase, capitalize } from "lodash-es"; -import { formatAge, formatDateTime } from "../../Utils/utils"; -import { getTestSample } from "../../Redux/actions"; - import { navigate } from "raviger"; +import { lazy, useCallback, useState } from "react"; import { useDispatch } from "react-redux"; -import { DetailRoute } from "../../Routers/types"; + +import Card from "@/CAREUI/display/Card"; +import { GENDER_TYPES, TEST_TYPE_CHOICES } from "@/Common/constants"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { FileUpload } from "@/Components/Patient/FileUpload"; +import { FlowModel, SampleTestModel } from "@/Components/Patient/models"; +import { getTestSample } from "@/Redux/actions"; +import { DetailRoute } from "@/Routers/types"; +import { formatAge, formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Patient/SampleFilters.tsx b/src/Components/Patient/SampleFilters.tsx index db22e54ac80..885a50802c6 100644 --- a/src/Components/Patient/SampleFilters.tsx +++ b/src/Components/Patient/SampleFilters.tsx @@ -1,20 +1,21 @@ +import { navigate } from "raviger"; import { useState, useEffect } from "react"; +import { useDispatch } from "react-redux"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; import { SAMPLE_TEST_STATUS, SAMPLE_TEST_RESULT, SAMPLE_TYPE_CHOICES, -} from "../../Common/constants"; -import { navigate } from "raviger"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import { getAnyFacility } from "../../Redux/actions"; -import { useDispatch } from "react-redux"; -import useMergeState from "../../Common/hooks/useMergeState"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import CircularProgress from "../Common/components/CircularProgress"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; +} from "@/Common/constants"; +import useMergeState from "@/Common/hooks/useMergeState"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { FacilityModel } from "@/Components/Facility/models"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { getAnyFacility } from "@/Redux/actions"; const clearFilterState = { status: "", diff --git a/src/Components/Patient/SamplePreview.tsx b/src/Components/Patient/SamplePreview.tsx index b2a325d5013..289bcb43d78 100644 --- a/src/Components/Patient/SamplePreview.tsx +++ b/src/Components/Patient/SamplePreview.tsx @@ -1,14 +1,13 @@ -import { classNames, formatDateTime } from "../../Utils/utils"; -import { statusType, useAbortableEffect } from "../../Common/utils"; import { lazy, useCallback, useState } from "react"; - -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; -import { SampleReportModel } from "./models"; - -import { sampleReport } from "../../Redux/actions"; import { useDispatch } from "react-redux"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { SampleReportModel } from "@/Components/Patient/models"; +import { sampleReport } from "@/Redux/actions"; +import { classNames, formatDateTime } from "@/Utils/utils"; + const Loading = lazy(() => import("../Common/Loading")); interface ISamplePreviewProps { diff --git a/src/Components/Patient/SampleTest.tsx b/src/Components/Patient/SampleTest.tsx index 625e2104d0d..0519b2151f5 100644 --- a/src/Components/Patient/SampleTest.tsx +++ b/src/Components/Patient/SampleTest.tsx @@ -1,21 +1,22 @@ import { navigate } from "raviger"; - import { useReducer, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; -import { SAMPLE_TYPE_CHOICES, ICMR_CATEGORY } from "../../Common/constants"; -import { createSampleTest, getPatient } from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import { SampleTestModel } from "./models"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -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 { SAMPLE_TYPE_CHOICES, ICMR_CATEGORY } from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { SampleTestModel } from "@/Components/Patient/models"; +import { createSampleTest, getPatient } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; + const Loading = lazy(() => import("../Common/Loading")); const initForm: SampleTestModel = { diff --git a/src/Components/Patient/SampleTestCard.tsx b/src/Components/Patient/SampleTestCard.tsx index 4cea2d48f56..230d3a15b27 100644 --- a/src/Components/Patient/SampleTestCard.tsx +++ b/src/Components/Patient/SampleTestCard.tsx @@ -1,16 +1,17 @@ +import { startCase, camelCase } from "lodash-es"; import { navigate } from "raviger"; import { useState } from "react"; -import { SampleTestModel } from "./models"; import { useDispatch } from "react-redux"; -import { SAMPLE_TEST_STATUS } from "../../Common/constants"; -import { patchSample } from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications"; -import UpdateStatusDialog from "./UpdateStatusDialog"; -import { startCase, camelCase } from "lodash-es"; -import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import RelativeDateUserMention from "../Common/RelativeDateUserMention"; + +import { SAMPLE_TEST_STATUS } from "@/Common/constants"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import RelativeDateUserMention from "@/Components/Common/RelativeDateUserMention"; +import { SampleTestModel } from "@/Components/Patient/models"; +import UpdateStatusDialog from "@/Components/Patient/UpdateStatusDialog"; +import { patchSample } from "@/Redux/actions"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import { formatDateTime } from "@/Utils/utils"; interface SampleDetailsProps { facilityId: number; diff --git a/src/Components/Patient/SampleViewAdmin.tsx b/src/Components/Patient/SampleViewAdmin.tsx index 085616adfac..d72fbb51b33 100644 --- a/src/Components/Patient/SampleViewAdmin.tsx +++ b/src/Components/Patient/SampleViewAdmin.tsx @@ -1,31 +1,33 @@ -import SampleFilter from "./SampleFilters"; import { navigate } from "raviger"; import { useCallback, useState, useEffect, lazy } from "react"; import { useDispatch } from "react-redux"; + +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; import { SAMPLE_TEST_STATUS, SAMPLE_TEST_RESULT, SAMPLE_FLOW_RULES, SAMPLE_TYPE_CHOICES, -} from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +} from "@/Common/constants"; +import useFilters from "@/Common/hooks/useFilters"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import Page from "@/Components/Common/components/Page"; +import { ExportButton } from "@/Components/Common/Export"; +import SearchInput from "@/Components/Form/SearchInput"; +import { SampleTestModel } from "@/Components/Patient/models"; +import SampleFilter from "@/Components/Patient/SampleFilters"; +import UpdateStatusDialog from "@/Components/Patient/UpdateStatusDialog"; import { getTestList, patchSample, downloadSampleTests, getAnyFacility, -} from "../../Redux/actions"; -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 CountBlock from "../../CAREUI/display/Count"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import Page from "../Common/components/Page"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications"; +import { formatDateTime } from "@/Utils/utils"; + const Loading = lazy(() => import("../Common/Loading")); export default function SampleViewAdmin() { diff --git a/src/Components/Patient/ShiftCreate.tsx b/src/Components/Patient/ShiftCreate.tsx index fb15039a2ea..9ac6b14cd2d 100644 --- a/src/Components/Patient/ShiftCreate.tsx +++ b/src/Components/Patient/ShiftCreate.tsx @@ -1,34 +1,34 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { navigate } from "raviger"; +import { lazy, useEffect, useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; import { BREATHLESSNESS_LEVEL, FACILITY_TYPES, PATIENT_CATEGORIES, SHIFTING_VEHICLE_CHOICES, -} from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { createShift, getPatient } from "../../Redux/actions"; -import { lazy, useEffect, useReducer, useState } from "react"; - -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import PatientCategorySelect from "./PatientCategorySelect"; -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 useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -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"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useConfig from "@/Common/hooks/useConfig"; +import { phonePreg } from "@/Common/validation"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import PatientCategorySelect from "@/Components/Patient/PatientCategorySelect"; +import { createShift, getPatient } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { parsePhoneNumber } from "@/Utils/utils.js"; + +import Card from "@/CAREUI/display/Card.js"; +import Page from "@/Components/Common/components/Page.js"; +import { PhoneNumberValidator } from "@/Components/Form/FieldValidators.js"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField.js"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Patient/UpdateStatusDialog.tsx b/src/Components/Patient/UpdateStatusDialog.tsx index 4fb2ed43a7d..05e9389426f 100644 --- a/src/Components/Patient/UpdateStatusDialog.tsx +++ b/src/Components/Patient/UpdateStatusDialog.tsx @@ -1,23 +1,27 @@ -import { useEffect, useState, useReducer } from "react"; import axios from "axios"; +import { useEffect, useState, useReducer } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; import { SAMPLE_TEST_STATUS, SAMPLE_TEST_RESULT, SAMPLE_FLOW_RULES, -} from "../../Common/constants"; -import { SampleTestModel } from "./models"; -import * as Notification from "../../Utils/Notifications.js"; -import { createUpload, editUpload } from "../../Redux/actions"; -import { useDispatch } from "react-redux"; -import { header_content_type, LinearProgressWithLabel } from "./FileUpload"; -import { Submit } from "../Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import TextFormField from "../Form/FormFields/TextFormField"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { useTranslation } from "react-i18next"; +} from "@/Common/constants"; +import { Submit } from "@/Components/Common/components/ButtonV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import CheckBoxFormField from "@/Components/Form/FormFields/CheckBoxFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { + header_content_type, + LinearProgressWithLabel, +} from "@/Components/Patient/FileUpload"; +import { SampleTestModel } from "@/Components/Patient/models"; +import { createUpload, editUpload } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; interface Props { sample: SampleTestModel; diff --git a/src/Components/Patient/Waveform.tsx b/src/Components/Patient/Waveform.tsx index 29160261356..177aa33250b 100644 --- a/src/Components/Patient/Waveform.tsx +++ b/src/Components/Patient/Waveform.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef, useState } from "react"; -import { LinePlot } from "../Facility/Consultations/components/LinePlot"; + +import { LinePlot } from "@/Components/Facility/Consultations/components/LinePlot"; export type WaveformType = { data: string; diff --git a/src/Components/Patient/models.tsx b/src/Components/Patient/models.tsx index 341e13e3c80..cf776e5c907 100644 --- a/src/Components/Patient/models.tsx +++ b/src/Components/Patient/models.tsx @@ -1,5 +1,8 @@ -import { ConsultationModel, PatientCategory } from "../Facility/models"; -import { PerformedByModel } from "../HCX/misc"; +import { + ConsultationModel, + PatientCategory, +} from "@/Components/Facility/models"; +import { PerformedByModel } from "@/Components/HCX/misc"; export interface FlowModel { id?: number; diff --git a/src/Components/Resource/BadgesList.tsx b/src/Components/Resource/BadgesList.tsx index 6977861d596..5edc69ba1eb 100644 --- a/src/Components/Resource/BadgesList.tsx +++ b/src/Components/Resource/BadgesList.tsx @@ -1,6 +1,6 @@ -import { SHIFTING_FILTER_ORDER } from "../../Common/constants"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; +import { SHIFTING_FILTER_ORDER } from "@/Common/constants"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; function useFacilityQuery(facilityId: string | undefined) { return useQuery(routes.getAnyFacility, { diff --git a/src/Components/Resource/CommentSection.tsx b/src/Components/Resource/CommentSection.tsx index 25d8142dae7..ba4efd6e7f5 100644 --- a/src/Components/Resource/CommentSection.tsx +++ b/src/Components/Resource/CommentSection.tsx @@ -1,14 +1,15 @@ import { useState } from "react"; -import * as Notification from "../../Utils/Notifications.js"; -import { formatDateTime } from "../../Utils/utils"; -import CircularProgress from "../Common/components/CircularProgress"; -import ButtonV2 from "../Common/components/ButtonV2"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import { IComment } from "./models"; -import request from "../../Utils/request/request"; + +import PaginatedList from "@/CAREUI/misc/PaginatedList"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import { IComment } from "@/Components/Resource/models"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; const CommentSection = (props: { id: string }) => { const [commentBox, setCommentBox] = useState(""); diff --git a/src/Components/Resource/ListFilter.tsx b/src/Components/Resource/ListFilter.tsx index afe48eedfd0..aa3250667a4 100644 --- a/src/Components/Resource/ListFilter.tsx +++ b/src/Components/Resource/ListFilter.tsx @@ -1,19 +1,19 @@ -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 { navigate } from "raviger"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import CircularProgress from "../Common/components/CircularProgress"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { DateRange } from "../Common/DateRangeInputV2"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; import dayjs from "dayjs"; -import { dateQueryString } from "../../Utils/utils"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import { navigate } from "raviger"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; +import { RESOURCE_CHOICES, RESOURCE_FILTER_ORDER } from "@/Common/constants"; +import useMergeState from "@/Common/hooks/useMergeState"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { DateRange } from "@/Components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import DateRangeFormField from "@/Components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString } from "@/Utils/utils"; const clearFilterState = { origin_facility: "", diff --git a/src/Components/Resource/ListView.tsx b/src/Components/Resource/ListView.tsx index 9496c6d38d4..d3c03d418c7 100644 --- a/src/Components/Resource/ListView.tsx +++ b/src/Components/Resource/ListView.tsx @@ -1,19 +1,20 @@ -import { lazy } from "react"; import { navigate } from "raviger"; -import { downloadResourceRequests } from "../../Redux/actions"; -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 { lazy } from "react"; 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 CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import useFilters from "@/Common/hooks/useFilters"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { ExportButton } from "@/Components/Common/Export"; +import BadgesList from "@/Components/Resource/BadgesList"; +import { formatFilter } from "@/Components/Resource/Commons"; +import ListFilter from "@/Components/Resource/ListFilter"; +import { downloadResourceRequests } from "@/Redux/actions"; +import routes from "@/Redux/api"; +import dayjs from "@/Utils/dayjs"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); const PageTitle = lazy(() => import("../Common/PageTitle")); diff --git a/src/Components/Resource/ResourceBoard.tsx b/src/Components/Resource/ResourceBoard.tsx index 217f2941e10..86b02a19cf9 100644 --- a/src/Components/Resource/ResourceBoard.tsx +++ b/src/Components/Resource/ResourceBoard.tsx @@ -1,13 +1,13 @@ -import { useState, useEffect } from "react"; -import { downloadResourceRequests } from "../../Redux/actions"; import { navigate } from "raviger"; -import { classNames } from "../../Utils/utils"; +import { useState, useEffect } from "react"; import { useDrag, useDrop } from "react-dnd"; -import { formatDateTime } from "../../Utils/utils"; -import { ExportButton } from "../Common/Export"; -import dayjs from "../../Utils/dayjs"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import { ExportButton } from "@/Components/Common/Export"; +import { downloadResourceRequests } from "@/Redux/actions"; +import routes from "@/Redux/api"; +import dayjs from "@/Utils/dayjs"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime } from "@/Utils/utils"; const limit = 14; diff --git a/src/Components/Resource/ResourceBoardView.tsx b/src/Components/Resource/ResourceBoardView.tsx index 17fb70c662f..00acd2c89fd 100644 --- a/src/Components/Resource/ResourceBoardView.tsx +++ b/src/Components/Resource/ResourceBoardView.tsx @@ -1,19 +1,20 @@ -import { lazy, useState } from "react"; import { navigate } from "raviger"; -import ListFilter from "./ListFilter"; -import ResourceBoard from "./ResourceBoard"; -import { RESOURCE_CHOICES } from "../../Common/constants"; -import { downloadResourceRequests } from "../../Redux/actions"; +import { lazy, useState } from "react"; import withScrolling from "react-dnd-scrolling"; -import BadgesList from "./BadgesList"; -import { formatFilter } from "./Commons"; -import useFilters from "../../Common/hooks/useFilters"; -import { ExportButton } from "../Common/Export"; -import SwitchTabs from "../Common/components/SwitchTabs"; -import ButtonV2 from "../Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import { RESOURCE_CHOICES } from "@/Common/constants"; +import useFilters from "@/Common/hooks/useFilters"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import SwitchTabs from "@/Components/Common/components/SwitchTabs"; +import { ExportButton } from "@/Components/Common/Export"; +import BadgesList from "@/Components/Resource/BadgesList"; +import { formatFilter } from "@/Components/Resource/Commons"; +import ListFilter from "@/Components/Resource/ListFilter"; +import ResourceBoard from "@/Components/Resource/ResourceBoard"; +import { downloadResourceRequests } from "@/Redux/actions"; const Loading = lazy(() => import("../Common/Loading")); const PageTitle = lazy(() => import("../Common/PageTitle")); diff --git a/src/Components/Resource/ResourceCreate.tsx b/src/Components/Resource/ResourceCreate.tsx index d0a6c36272b..bedb2a53d27 100644 --- a/src/Components/Resource/ResourceCreate.tsx +++ b/src/Components/Resource/ResourceCreate.tsx @@ -1,31 +1,31 @@ +import { navigate } from "raviger"; import { useReducer, useState, lazy } from "react"; +import { useTranslation } from "react-i18next"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import * as Notification from "../../Utils/Notifications.js"; -import { navigate } from "raviger"; +import Card from "@/CAREUI/display/Card"; import { OptionsType, RESOURCE_CATEGORY_CHOICES, RESOURCE_SUBCATEGORIES, -} from "../../Common/constants"; -import { parsePhoneNumber } from "../../Utils/utils"; -import { phonePreg } from "../../Common/validation"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import useAppHistory from "../../Common/hooks/useAppHistory"; -import { useTranslation } from "react-i18next"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -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 { PhoneNumberValidator } from "../Form/FieldValidators"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { phonePreg } from "@/Common/validation"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { PhoneNumberValidator } from "@/Components/Form/FieldValidators"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "@/Components/Form/FormFields/RadioFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { parsePhoneNumber } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Resource/ResourceDetails.tsx b/src/Components/Resource/ResourceDetails.tsx index 6917501eca4..6f46371ad44 100644 --- a/src/Components/Resource/ResourceDetails.tsx +++ b/src/Components/Resource/ResourceDetails.tsx @@ -1,14 +1,15 @@ -import { useState, lazy } from "react"; -import { classNames, formatDateTime } from "../../Utils/utils"; import { navigate } from "raviger"; -import * as Notification from "../../Utils/Notifications.js"; -import CommentSection from "./CommentSection"; -import ButtonV2 from "../Common/components/ButtonV2"; -import Page from "../Common/components/Page"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import { useState, lazy } from "react"; + +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import CommentSection from "@/Components/Resource/CommentSection"; +import routes from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); export default function ResourceDetails(props: { id: string }) { diff --git a/src/Components/Resource/ResourceDetailsUpdate.tsx b/src/Components/Resource/ResourceDetailsUpdate.tsx index c692618a774..12ebe93bf64 100644 --- a/src/Components/Resource/ResourceDetailsUpdate.tsx +++ b/src/Components/Resource/ResourceDetailsUpdate.tsx @@ -1,24 +1,26 @@ -import * as Notification from "../../Utils/Notifications.js"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { lazy, 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 { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import Page from "../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 UserAutocompleteFormField 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 { lazy, useReducer, useState } from "react"; + +import Card from "@/CAREUI/display/Card"; +import { RESOURCE_CHOICES } from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import Page from "@/Components/Common/components/Page"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import UserAutocompleteFormField from "@/Components/Common/UserAutocompleteFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import RadioFormField from "@/Components/Form/FormFields/RadioFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import * as Notification from "@/Utils/Notifications.js"; +import request from "@/Utils/request/request.js"; +import useQuery from "@/Utils/request/useQuery.js"; + +import { UserModel } from "@/Components/Users/models.js"; +import routes from "@/Redux/api.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Resource/models.ts b/src/Components/Resource/models.ts index f10ac988552..258103f35a3 100644 --- a/src/Components/Resource/models.ts +++ b/src/Components/Resource/models.ts @@ -1,4 +1,4 @@ -import { PerformedByModel } from "../HCX/misc"; +import { PerformedByModel } from "@/Components/HCX/misc"; export interface IComment { id: string; diff --git a/src/Components/Shifting/BadgesList.tsx b/src/Components/Shifting/BadgesList.tsx index ce0a0cb5753..2bd8dd11cf9 100644 --- a/src/Components/Shifting/BadgesList.tsx +++ b/src/Components/Shifting/BadgesList.tsx @@ -1,9 +1,9 @@ -import { getAnyFacility, getUserList } from "../../Redux/actions"; import { useEffect, useState } from "react"; - -import { SHIFTING_FILTER_ORDER } from "../../Common/constants"; -import { useDispatch } from "react-redux"; import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import { SHIFTING_FILTER_ORDER } from "@/Common/constants"; +import { getAnyFacility, getUserList } from "@/Redux/actions"; export default function BadgesList(props: any) { const { qParams, FilterBadges } = props; diff --git a/src/Components/Shifting/BoardView.tsx b/src/Components/Shifting/BoardView.tsx index 9c96daa0e59..a68a39d4e99 100644 --- a/src/Components/Shifting/BoardView.tsx +++ b/src/Components/Shifting/BoardView.tsx @@ -1,26 +1,25 @@ -import { - SHIFTING_CHOICES_PEACETIME, - SHIFTING_CHOICES_WARTIME, -} from "../../Common/constants"; - -import BadgesList from "./BadgesList"; -import { ExportButton } from "../Common/Export"; -import ListFilter from "./ListFilter"; -import SearchInput from "../Form/SearchInput"; -import ShiftingBoard from "./ShiftingBoard"; -import { downloadShiftRequests } from "../../Redux/actions"; -import { formatFilter } from "./Commons"; - import { navigate } from "raviger"; -import useConfig from "../../Common/hooks/useConfig"; -import useFilters from "../../Common/hooks/useFilters"; import { lazy, useState } from "react"; -import { useTranslation } from "react-i18next"; import withScrolling from "react-dnd-scrolling"; -import ButtonV2 from "../Common/components/ButtonV2"; -import SwitchTabs from "../Common/components/SwitchTabs"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import { + SHIFTING_CHOICES_PEACETIME, + SHIFTING_CHOICES_WARTIME, +} from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import useFilters from "@/Common/hooks/useFilters"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import SwitchTabs from "@/Components/Common/components/SwitchTabs"; +import { ExportButton } from "@/Components/Common/Export"; +import SearchInput from "@/Components/Form/SearchInput"; +import BadgesList from "@/Components/Shifting/BadgesList"; +import { formatFilter } from "@/Components/Shifting/Commons"; +import ListFilter from "@/Components/Shifting/ListFilter"; +import ShiftingBoard from "@/Components/Shifting/ShiftingBoard"; +import { downloadShiftRequests } from "@/Redux/actions"; const Loading = lazy(() => import("../Common/Loading")); const PageTitle = lazy(() => import("../Common/PageTitle")); diff --git a/src/Components/Shifting/CommentsSection.tsx b/src/Components/Shifting/CommentsSection.tsx index a1473832236..d17a824495c 100644 --- a/src/Components/Shifting/CommentsSection.tsx +++ b/src/Components/Shifting/CommentsSection.tsx @@ -1,12 +1,13 @@ import { useCallback, useState } from "react"; -import { useDispatch } from "react-redux"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { getShiftComments, addShiftComments } from "../../Redux/actions"; -import CircularProgress from "../Common/components/CircularProgress"; -import * as Notification from "../../Utils/Notifications.js"; -import { formatDateTime } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "../Common/components/ButtonV2"; +import { useDispatch } from "react-redux"; + +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { getShiftComments, addShiftComments } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatDateTime } from "@/Utils/utils"; interface CommentSectionProps { id: string; diff --git a/src/Components/Shifting/ListFilter.tsx b/src/Components/Shifting/ListFilter.tsx index 5f2233c2263..4608a73cde6 100644 --- a/src/Components/Shifting/ListFilter.tsx +++ b/src/Components/Shifting/ListFilter.tsx @@ -1,31 +1,30 @@ -import { - BREATHLESSNESS_LEVEL, - DISEASE_STATUS, - SHIFTING_FILTER_ORDER, -} from "../../Common/constants"; -import { DateRange } from "../Common/DateRangeInputV2"; +import dayjs from "dayjs"; +import { navigate } from "raviger"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; import { SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, -} from "../../Common/constants"; -import { getAnyFacility, getUserList } from "../../Redux/actions"; -import CircularProgress from "../Common/components/CircularProgress"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { navigate } from "raviger"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import useMergeState from "../../Common/hooks/useMergeState"; -import { useTranslation } from "react-i18next"; -import UserAutocompleteFormField from "../Common/UserAutocompleteFormField"; -import { dateQueryString, parsePhoneNumber } from "../../Utils/utils"; -import dayjs from "dayjs"; + BREATHLESSNESS_LEVEL, + DISEASE_STATUS, + SHIFTING_FILTER_ORDER, +} from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import useMergeState from "@/Common/hooks/useMergeState"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { DateRange } from "@/Components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import UserAutocompleteFormField from "@/Components/Common/UserAutocompleteFormField"; +import DateRangeFormField from "@/Components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { getAnyFacility, getUserList } from "@/Redux/actions"; +import { dateQueryString, parsePhoneNumber } from "@/Utils/utils"; const clearFilterState = { origin_facility: "", diff --git a/src/Components/Shifting/ListView.tsx b/src/Components/Shifting/ListView.tsx index f3fb14a4c0a..5a3bf18ab30 100644 --- a/src/Components/Shifting/ListView.tsx +++ b/src/Components/Shifting/ListView.tsx @@ -1,28 +1,28 @@ +import { navigate } from "raviger"; +import { lazy, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import useConfig from "@/Common/hooks/useConfig"; +import useFilters from "@/Common/hooks/useFilters"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import { ExportButton } from "@/Components/Common/Export"; +import SearchInput from "@/Components/Form/SearchInput"; +import BadgesList from "@/Components/Shifting/BadgesList"; +import { formatFilter } from "@/Components/Shifting/Commons"; +import ListFilter from "@/Components/Shifting/ListFilter"; import { completeTransfer, downloadShiftRequests, listShiftRequests, -} from "../../Redux/actions"; -import { lazy, useEffect, useState } from "react"; - -import BadgesList from "./BadgesList"; -import ButtonV2 from "../Common/components/ButtonV2"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { ExportButton } from "../Common/Export"; -import ListFilter from "./ListFilter"; -import Page from "../Common/components/Page"; -import SearchInput from "../Form/SearchInput"; -import { formatAge, formatDateTime } from "../../Utils/utils"; -import { formatFilter } from "./Commons"; -import { navigate } from "raviger"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -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"; +} from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import { formatAge, formatDateTime } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Shifting/ShiftDetails.tsx b/src/Components/Shifting/ShiftDetails.tsx index 7bffe429960..3cd0553c484 100644 --- a/src/Components/Shifting/ShiftDetails.tsx +++ b/src/Components/Shifting/ShiftDetails.tsx @@ -1,27 +1,27 @@ -import * as Notification from "../../Utils/Notifications.js"; +import QRCode from "qrcode.react"; +import { Link, navigate } from "raviger"; +import { lazy, useCallback, useState } from "react"; +import { CopyToClipboard } from "react-copy-to-clipboard"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; import { GENDER_TYPES, SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, TEST_TYPE_CHOICES, -} from "../../Common/constants"; -import { Link, navigate } from "raviger"; -import { lazy, useCallback, useState } from "react"; -import { deleteShiftRecord, getShiftDetails } from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; - -import ButtonV2 from "../Common/components/ButtonV2"; -import CommentSection from "./CommentsSection"; -import ConfirmDialog from "../Common/ConfirmDialog.js"; -import { CopyToClipboard } from "react-copy-to-clipboard"; -import Page from "../Common/components/Page"; -import QRCode from "qrcode.react"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import { formatAge, formatDateTime } from "../../Utils/utils"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import { useTranslation } from "react-i18next"; +} from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import Page from "@/Components/Common/components/Page"; +import CommentSection from "@/Components/Shifting/CommentsSection"; +import { deleteShiftRecord, getShiftDetails } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { formatAge, formatDateTime } from "@/Utils/utils"; + +import ConfirmDialog from "@/Components/Common/ConfirmDialog.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Shifting/ShiftDetailsUpdate.tsx b/src/Components/Shifting/ShiftDetailsUpdate.tsx index ec4eab661d9..8e1b792f4ea 100644 --- a/src/Components/Shifting/ShiftDetailsUpdate.tsx +++ b/src/Components/Shifting/ShiftDetailsUpdate.tsx @@ -1,5 +1,9 @@ -import * as Notification from "../../Utils/Notifications.js"; +import { navigate, useQueryParams } from "raviger"; +import { lazy, useCallback, useEffect, useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; +import Card from "@/CAREUI/display/Card"; import { BREATHLESSNESS_LEVEL, FACILITY_TYPES, @@ -7,33 +11,30 @@ import { SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, SHIFTING_VEHICLE_CHOICES, -} from "../../Common/constants"; -import { Cancel, Submit } from "../Common/components/ButtonV2"; -import { getShiftDetails, getUserList, updateShift } from "../../Redux/actions"; -import { navigate, useQueryParams } from "raviger"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { lazy, useCallback, useEffect, 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 { FieldLabel } from "../Form/FormFields/FormField"; -import PatientCategorySelect from "../Patient/PatientCategorySelect"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField.js"; -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 useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import { useTranslation } from "react-i18next"; -import CircularProgress from "../Common/components/CircularProgress.js"; -import Card from "../../CAREUI/display/Card"; -import RadioFormField from "../Form/FormFields/RadioFormField.js"; -import Page from "../Common/components/Page.js"; -import UserAutocompleteFormField from "../Common/UserAutocompleteFormField.js"; -import { UserModel } from "../Users/models.js"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useConfig from "@/Common/hooks/useConfig"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import TextAreaFormField from "@/Components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils.js"; +import PatientCategorySelect from "@/Components/Patient/PatientCategorySelect"; +import { getShiftDetails, getUserList, updateShift } from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { parsePhoneNumber } from "@/Utils/utils.js"; + +import CircularProgress from "@/Components/Common/components/CircularProgress.js"; +import Page from "@/Components/Common/components/Page.js"; +import UserAutocompleteFormField from "@/Components/Common/UserAutocompleteFormField.js"; +import DischargeModal from "@/Components/Facility/DischargeModal.js"; +import { ConsultationModel } from "@/Components/Facility/models.js"; +import RadioFormField from "@/Components/Form/FormFields/RadioFormField.js"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField.js"; +import { UserModel } from "@/Components/Users/models.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Shifting/ShiftingBoard.tsx b/src/Components/Shifting/ShiftingBoard.tsx index 7c065d0c0a8..9606356866f 100644 --- a/src/Components/Shifting/ShiftingBoard.tsx +++ b/src/Components/Shifting/ShiftingBoard.tsx @@ -1,21 +1,21 @@ +import { navigate } from "raviger"; import { useEffect, useState } from "react"; -import { classNames, formatAge, formatDateTime } from "../../Utils/utils"; +import { useDrag, useDrop } from "react-dnd"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import useAuthUser from "@/Common/hooks/useAuthUser"; +import useConfig from "@/Common/hooks/useConfig"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import { ExportButton } from "@/Components/Common/Export"; import { completeTransfer, downloadShiftRequests, listShiftRequests, -} from "../../Redux/actions"; -import { useDrag, useDrop } from "react-dnd"; - -import ButtonV2 from "../Common/components/ButtonV2"; -import ConfirmDialog from "../Common/ConfirmDialog"; -import { navigate } from "raviger"; -import useConfig from "../../Common/hooks/useConfig"; -import { useDispatch } from "react-redux"; -import { useTranslation } from "react-i18next"; -import { ExportButton } from "../Common/Export"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser from "../../Common/hooks/useAuthUser"; +} from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import { classNames, formatAge, formatDateTime } from "@/Utils/utils"; const limit = 14; diff --git a/src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx b/src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx index df21d01ecdd..c79b73946c7 100644 --- a/src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx +++ b/src/Components/Users/ConfirmHomeFacilityUpdateDialog.tsx @@ -1,5 +1,6 @@ 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 index 2de16bd1ae9..3c0d4a6b9f3 100644 --- a/src/Components/Users/LinkFacilityDialog.tsx +++ b/src/Components/Users/LinkFacilityDialog.tsx @@ -1,7 +1,8 @@ import { useState } from "react"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import ConfirmDialog from "../Common/ConfirmDialog"; + +import ConfirmDialog from "@/Components/Common/ConfirmDialog"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { FacilityModel } from "@/Components/Facility/models"; interface Props { username: string; diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx index 1771a6ca22f..dfec725725e 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/Components/Users/ManageUsers.tsx @@ -1,4 +1,27 @@ -import * as Notification from "../../Utils/Notifications.js"; +import dayjs from "dayjs"; +import { navigate } from "raviger"; +import { lazy, useCallback, useEffect, useState } from "react"; +import { useDispatch } from "react-redux"; + +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 { statusType, useAbortableEffect } from "@/Common/utils"; +import ButtonV2, { Submit } from "@/Components/Common/components/ButtonV2"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import UserDetails from "@/Components/Common/UserDetails"; +import { FacilityModel } from "@/Components/Facility/models"; +import SearchInput from "@/Components/Form/SearchInput"; +import ConfirmHomeFacilityUpdateDialog from "@/Components/Users/ConfirmHomeFacilityUpdateDialog"; +import SkillsSlideOver from "@/Components/Users/SkillsSlideOver"; +import UnlinkFacilityDialog from "@/Components/Users/UnlinkFacilityDialog"; +import UserDeleteDialog from "@/Components/Users/UserDeleteDialog"; +import UserFilter from "@/Components/Users/UserFilter"; import { addUserFacility, clearHomeFacility, @@ -8,34 +31,13 @@ import { getUserList, getUserListFacility, partialUpdateUser, -} from "../../Redux/actions"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { lazy, useCallback, useEffect, useState } from "react"; -import { useDispatch } from "react-redux"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ConfirmHomeFacilityUpdateDialog from "./ConfirmHomeFacilityUpdateDialog"; -import CountBlock from "../../CAREUI/display/Count"; -import { FacilityModel } from "../Facility/models"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import SearchInput from "../Form/SearchInput"; -import SkillsSlideOver from "./SkillsSlideOver"; -import SlideOverCustom from "../../CAREUI/interactive/SlideOver"; -import { USER_TYPES } from "../../Common/constants"; -import UnlinkFacilityDialog from "./UnlinkFacilityDialog"; -import UserDeleteDialog from "./UserDeleteDialog"; -import UserDetails from "../Common/UserDetails"; -import UserFilter from "./UserFilter"; -import { classNames, isUserOnline, relativeTime } from "../../Utils/utils"; -import { navigate } from "raviger"; -import useFilters from "../../Common/hooks/useFilters"; -import useWindowDimensions from "../../Common/hooks/useWindowDimensions"; -import CircularProgress from "../Common/components/CircularProgress.js"; -import Page from "../Common/components/Page.js"; -import dayjs from "dayjs"; -import TextFormField from "../Form/FormFields/TextFormField.js"; -import useAuthUser from "../../Common/hooks/useAuthUser.js"; +} from "@/Redux/actions"; +import * as Notification from "@/Utils/Notifications.js"; +import { classNames, isUserOnline, relativeTime } from "@/Utils/utils"; + +import CircularProgress from "@/Components/Common/components/CircularProgress.js"; +import Page from "@/Components/Common/components/Page.js"; +import TextFormField from "@/Components/Form/FormFields/TextFormField.js"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Users/SkillsSlideOver.tsx b/src/Components/Users/SkillsSlideOver.tsx index 343ea9062cc..29fc4cd0ed4 100644 --- a/src/Components/Users/SkillsSlideOver.tsx +++ b/src/Components/Users/SkillsSlideOver.tsx @@ -1,21 +1,25 @@ import { useCallback, useEffect, useMemo, useState } from "react"; -import SlideOverCustom from "../../CAREUI/interactive/SlideOver"; -import { SkillModel, SkillObjectModel } from "../Users/models"; -import { SkillSelect } from "../Common/SkillSelect"; +import { useTranslation } from "react-i18next"; +import { useDispatch } from "react-redux"; + +import SlideOverCustom from "@/CAREUI/interactive/SlideOver"; +import { useIsAuthorized } from "@/Common/hooks/useIsAuthorized"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import { SkillSelect } from "@/Components/Common/SkillSelect"; +import { SkillModel, SkillObjectModel } from "@/Components/Users/models"; +import { + AddSkillsPlaceholder, + SkillsArray, +} from "@/Components/Users/SkillsSlideOverComponents"; +import UnlinkSkillDialog from "@/Components/Users/UnlinkSkillDialog"; import { addUserSkill, getUserListSkills, deleteUserSkill, -} from "../../Redux/actions"; -import UnlinkSkillDialog from "./UnlinkSkillDialog"; -import * as Notification from "../../Utils/Notifications.js"; -import { useDispatch } from "react-redux"; -import ButtonV2 from "../Common/components/ButtonV2"; -import AuthorizeFor from "../../Utils/AuthorizeFor"; -import { useIsAuthorized } from "../../Common/hooks/useIsAuthorized"; -import { AddSkillsPlaceholder, SkillsArray } from "./SkillsSlideOverComponents"; -import { useTranslation } from "react-i18next"; -import CircularProgress from "../Common/components/CircularProgress"; +} from "@/Redux/actions"; +import AuthorizeFor from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications.js"; interface IProps { username: string; diff --git a/src/Components/Users/SkillsSlideOverComponents.tsx b/src/Components/Users/SkillsSlideOverComponents.tsx index 666f5a38e74..3efec829976 100644 --- a/src/Components/Users/SkillsSlideOverComponents.tsx +++ b/src/Components/Users/SkillsSlideOverComponents.tsx @@ -1,9 +1,10 @@ -import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import ButtonV2 from "../Common/components/ButtonV2"; -import { SkillModel } from "./models"; import { Fragment } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { SkillModel } from "@/Components/Users/models"; +import { classNames } from "@/Utils/utils"; export const AddSkillsPlaceholder = () => { const { t } = useTranslation(); diff --git a/src/Components/Users/UnlinkFacilityDialog.tsx b/src/Components/Users/UnlinkFacilityDialog.tsx index 6b1a3850ddd..d3fe59bc330 100644 --- a/src/Components/Users/UnlinkFacilityDialog.tsx +++ b/src/Components/Users/UnlinkFacilityDialog.tsx @@ -1,5 +1,6 @@ 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 index fcae6de22a3..33ae3f58f37 100644 --- a/src/Components/Users/UnlinkSkillDialog.tsx +++ b/src/Components/Users/UnlinkSkillDialog.tsx @@ -1,5 +1,6 @@ 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 index a6553bad01b..db6dad64ec6 100644 --- a/src/Components/Users/UserAdd.tsx +++ b/src/Components/Users/UserAdd.tsx @@ -1,18 +1,35 @@ import { Link, navigate } from "raviger"; import { lazy, useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; + +import Card from "@/CAREUI/display/Card"; import { GENDER_TYPES, USER_TYPES, USER_TYPE_OPTIONS, -} from "../../Common/constants"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +} from "@/Common/constants"; +import useAppHistory from "@/Common/hooks/useAppHistory"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { statusType, useAbortableEffect } from "@/Common/utils"; import { validateEmailAddress, validateName, validatePassword, validateUsername, -} from "../../Common/validation"; +} from "@/Common/validation"; +import { Cancel, Submit } from "@/Components/Common/components/ButtonV2"; +import Checkbox from "@/Components/Common/components/CheckBox"; +import CircularProgress from "@/Components/Common/components/CircularProgress"; +import Page from "@/Components/Common/components/Page"; +import { FacilitySelect } from "@/Components/Common/FacilitySelect"; +import { FacilityModel } from "@/Components/Facility/models"; +import { PhoneNumberValidator } from "@/Components/Form/FieldValidators"; +import DateFormField from "@/Components/Form/FormFields/DateFormField"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; import { addUser, getDistrictByState, @@ -20,31 +37,11 @@ import { getStates, getUserListFacility, checkUsername, -} from "../../Redux/actions"; -import * as Notification from "../../Utils/Notifications.js"; -import { FacilitySelect } from "../Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import { - classNames, - dateQueryString, - parsePhoneNumber, -} from "../../Utils/utils"; -import { Cancel, Submit } from "../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 Checkbox from "../Common/components/CheckBox"; -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 Card from "../../CAREUI/display/Card"; -import CircularProgress from "../Common/components/CircularProgress"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; +} from "@/Redux/actions"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import { classNames, dateQueryString, parsePhoneNumber } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Users/UserDeleteDialog.tsx b/src/Components/Users/UserDeleteDialog.tsx index 6d8b71c26b7..ceb895cd122 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 index 1450e6b6f79..9579f026225 100644 --- a/src/Components/Users/UserFilter.tsx +++ b/src/Components/Users/UserFilter.tsx @@ -1,16 +1,17 @@ +import { navigate } from "raviger"; import { useEffect } from "react"; import { useDispatch } from "react-redux"; -import { getDistrict } from "../../Redux/actions"; -import { navigate } from "raviger"; -import DistrictSelect from "../Facility/FacilityFilter/DistrictSelect"; -import { parsePhoneNumber } from "../../Utils/utils"; -import TextFormField from "../Form/FormFields/TextFormField"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { USER_TYPE_OPTIONS } from "../../Common/constants"; -import useMergeState from "../../Common/hooks/useMergeState"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; +import { USER_TYPE_OPTIONS } from "@/Common/constants"; +import useMergeState from "@/Common/hooks/useMergeState"; +import DistrictSelect from "@/Components/Facility/FacilityFilter/DistrictSelect"; +import { FieldLabel } from "@/Components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import SelectMenuV2 from "@/Components/Form/SelectMenuV2"; +import { getDistrict } from "@/Redux/actions"; +import { parsePhoneNumber } from "@/Utils/utils"; const parsePhoneNumberForFilterParam = (phoneNumber: string) => { if (!phoneNumber) return ""; diff --git a/src/Components/Users/UserProfile.tsx b/src/Components/Users/UserProfile.tsx index 0653ea452a2..79998075e52 100644 --- a/src/Components/Users/UserProfile.tsx +++ b/src/Components/Users/UserProfile.tsx @@ -1,28 +1,29 @@ import { useState, useCallback, useReducer, lazy, FormEvent } from "react"; -import { statusType, useAbortableEffect } from "../../Common/utils"; -import { GENDER_TYPES } from "../../Common/constants"; import { useDispatch } from "react-redux"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { GENDER_TYPES } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { statusType, useAbortableEffect } from "@/Common/utils"; +import { validateEmailAddress } from "@/Common/validation"; +import ButtonV2, { Submit } from "@/Components/Common/components/ButtonV2"; +import LanguageSelector from "@/Components/Common/LanguageSelector"; +import UpdatableApp, { checkForUpdate } from "@/Components/Common/UpdatableApp"; +import { PhoneNumberValidator } from "@/Components/Form/FieldValidators"; +import PhoneNumberFormField from "@/Components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; +import TextFormField from "@/Components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/Components/Form/FormFields/Utils"; +import { SkillModel, SkillObjectModel } from "@/Components/Users/models"; import { getUserDetails, getUserListSkills, partialUpdateUser, updateUserPassword, -} from "../../Redux/actions"; -import { validateEmailAddress } from "../../Common/validation"; -import * as Notification from "../../Utils/Notifications.js"; -import LanguageSelector from "../../Components/Common/LanguageSelector"; -import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2, { Submit } from "../Common/components/ButtonV2"; -import { classNames, handleSignOut, parsePhoneNumber } from "../../Utils/utils"; -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 { SkillModel, SkillObjectModel } from "../Users/models"; -import UpdatableApp, { checkForUpdate } from "../Common/UpdatableApp"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser from "../../Common/hooks/useAuthUser"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; +} from "@/Redux/actions"; +import dayjs from "@/Utils/dayjs"; +import * as Notification from "@/Utils/Notifications.js"; +import { classNames, handleSignOut, parsePhoneNumber } from "@/Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); diff --git a/src/Components/Users/models.tsx b/src/Components/Users/models.tsx index ae3229933c5..81529b24d3f 100644 --- a/src/Components/Users/models.tsx +++ b/src/Components/Users/models.tsx @@ -1,5 +1,9 @@ -import { UserRole } from "../../Common/constants"; -import { DistrictModel, LocalBodyModel, StateModel } from "../Facility/models"; +import { UserRole } from "@/Common/constants"; +import { + DistrictModel, + LocalBodyModel, + StateModel, +} from "@/Components/Facility/models"; interface HomeFacilityObjectModel { id?: string; diff --git a/src/Components/VitalsMonitor/HL7DeviceClient.ts b/src/Components/VitalsMonitor/HL7DeviceClient.ts index 7e13622b31f..f407d26a37a 100644 --- a/src/Components/VitalsMonitor/HL7DeviceClient.ts +++ b/src/Components/VitalsMonitor/HL7DeviceClient.ts @@ -1,5 +1,10 @@ import { EventEmitter } from "events"; -import { VitalsDataBase, VitalsValueBase, VitalsWaveformBase } from "./types"; + +import { + VitalsDataBase, + VitalsValueBase, + VitalsWaveformBase, +} from "@/Components/VitalsMonitor/types"; const ECG_WAVENAME_KEYS = [ "I", diff --git a/src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx b/src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx index 44cadd8263c..a659e3d7a34 100644 --- a/src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx +++ b/src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx @@ -1,14 +1,18 @@ -import { useEffect } from "react"; -import useHL7VitalsMonitor from "./useHL7VitalsMonitor"; -import { Link } from "raviger"; -import { GENDER_TYPES } from "../../Common/constants"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -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 dayjs from "dayjs"; +import { Link } from "raviger"; +import { useEffect } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { GENDER_TYPES } from "@/Common/constants"; +import useAuthUser from "@/Common/hooks/useAuthUser"; +import { + IVitalsComponentProps, + VitalsValueBase, +} from "@/Components/VitalsMonitor/types"; +import useHL7VitalsMonitor from "@/Components/VitalsMonitor/useHL7VitalsMonitor"; +import WaveformLabels from "@/Components/VitalsMonitor/WaveformLabels"; +import { triggerGoal } from "@/Integrations/Plausible"; +import { classNames } from "@/Utils/utils"; const minutesAgo = (timestamp: string) => { return `${dayjs().diff(dayjs(timestamp), "minute")}m ago`; diff --git a/src/Components/VitalsMonitor/HL7VitalsRenderer.ts b/src/Components/VitalsMonitor/HL7VitalsRenderer.ts index 6cd178a3a43..84246d524bb 100644 --- a/src/Components/VitalsMonitor/HL7VitalsRenderer.ts +++ b/src/Components/VitalsMonitor/HL7VitalsRenderer.ts @@ -1,5 +1,5 @@ -import { ChannelOptions } from "./types"; -import { lerp } from "./utils"; +import { ChannelOptions } from "@/Components/VitalsMonitor/types"; +import { lerp } from "@/Components/VitalsMonitor/utils"; interface ChannelState { buffer: number[]; diff --git a/src/Components/VitalsMonitor/VentilatorDeviceClient.ts b/src/Components/VitalsMonitor/VentilatorDeviceClient.ts index 0418740dcc7..3fb1ee5adbb 100644 --- a/src/Components/VitalsMonitor/VentilatorDeviceClient.ts +++ b/src/Components/VitalsMonitor/VentilatorDeviceClient.ts @@ -1,5 +1,10 @@ import { EventEmitter } from "events"; -import { VitalsDataBase, VitalsValueBase, VitalsWaveformBase } from "./types"; + +import { + VitalsDataBase, + VitalsValueBase, + VitalsWaveformBase, +} from "@/Components/VitalsMonitor/types"; const WAVEFORM_KEY_MAP: Record = { P: "pressure-waveform", diff --git a/src/Components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx b/src/Components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx index b03fe0645c6..b63c23b004a 100644 --- a/src/Components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx +++ b/src/Components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx @@ -1,12 +1,16 @@ -import { useEffect } from "react"; import { Link } from "raviger"; -import { GENDER_TYPES } from "../../Common/constants"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useVentilatorVitalsMonitor from "./useVentilatorVitalsMonitor"; -import { IVitalsComponentProps, VitalsValueBase } from "./types"; -import { classNames } from "../../Utils/utils"; -import WaveformLabels from "./WaveformLabels"; -import { VitalsNonWaveformContent } from "./HL7PatientVitalsMonitor"; +import { useEffect } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { GENDER_TYPES } from "@/Common/constants"; +import { VitalsNonWaveformContent } from "@/Components/VitalsMonitor/HL7PatientVitalsMonitor"; +import { + IVitalsComponentProps, + VitalsValueBase, +} from "@/Components/VitalsMonitor/types"; +import useVentilatorVitalsMonitor from "@/Components/VitalsMonitor/useVentilatorVitalsMonitor"; +import WaveformLabels from "@/Components/VitalsMonitor/WaveformLabels"; +import { classNames } from "@/Utils/utils"; export default function VentilatorPatientVitalsMonitor( props: IVitalsComponentProps diff --git a/src/Components/VitalsMonitor/VentilatorWaveformsRenderer.ts b/src/Components/VitalsMonitor/VentilatorWaveformsRenderer.ts index 1242b22f77f..347f01d40e8 100644 --- a/src/Components/VitalsMonitor/VentilatorWaveformsRenderer.ts +++ b/src/Components/VitalsMonitor/VentilatorWaveformsRenderer.ts @@ -1,5 +1,5 @@ -import { ChannelOptions } from "./types"; -import { lerp } from "./utils"; +import { ChannelOptions } from "@/Components/VitalsMonitor/types"; +import { lerp } from "@/Components/VitalsMonitor/utils"; interface ChannelState { buffer: number[]; diff --git a/src/Components/VitalsMonitor/WaveformLabels.tsx b/src/Components/VitalsMonitor/WaveformLabels.tsx index 92ebb6b8145..9001e591e9f 100644 --- a/src/Components/VitalsMonitor/WaveformLabels.tsx +++ b/src/Components/VitalsMonitor/WaveformLabels.tsx @@ -1,4 +1,4 @@ -import { classNames } from "../../Utils/utils"; +import { classNames } from "@/Utils/utils"; interface Props { labels: Record; diff --git a/src/Components/VitalsMonitor/types.ts b/src/Components/VitalsMonitor/types.ts index 60979a6f9b0..ed8d97522c5 100644 --- a/src/Components/VitalsMonitor/types.ts +++ b/src/Components/VitalsMonitor/types.ts @@ -1,5 +1,5 @@ -import { PatientAssetBed } from "../Assets/AssetTypes"; -import { getVitalsCanvasSizeAndDuration } from "./utils"; +import { PatientAssetBed } from "@/Components/Assets/AssetTypes"; +import { getVitalsCanvasSizeAndDuration } from "@/Components/VitalsMonitor/utils"; export interface VitalsDataBase { device_id: string; diff --git a/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts b/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts index ed16cc2edfd..f3d180df12c 100644 --- a/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts +++ b/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts @@ -1,17 +1,21 @@ import { useCallback, useRef, useState } from "react"; + +import useCanvas from "@/Common/hooks/useCanvas"; import HL7DeviceClient, { HL7MonitorData, HL7VitalsWaveformData, -} from "./HL7DeviceClient"; -import HL7VitalsRenderer from "./HL7VitalsRenderer"; -import useCanvas from "../../Common/hooks/useCanvas"; +} from "@/Components/VitalsMonitor/HL7DeviceClient"; +import HL7VitalsRenderer from "@/Components/VitalsMonitor/HL7VitalsRenderer"; import { ChannelOptions, IVitalsComponentProps, VitalsDataBase, VitalsValueBase as VitalsValue, -} from "./types"; -import { getChannel, getVitalsCanvasSizeAndDuration } from "./utils"; +} from "@/Components/VitalsMonitor/types"; +import { + getChannel, + getVitalsCanvasSizeAndDuration, +} from "@/Components/VitalsMonitor/utils"; interface VitalsBPValue extends VitalsDataBase { systolic: VitalsValue; diff --git a/src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts b/src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts index 70ab852726f..427a2d1a462 100644 --- a/src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts +++ b/src/Components/VitalsMonitor/useVentilatorVitalsMonitor.ts @@ -1,16 +1,20 @@ import { useCallback, useRef, useState } from "react"; -import useCanvas from "../../Common/hooks/useCanvas"; + +import useCanvas from "@/Common/hooks/useCanvas"; import { ChannelOptions, IVitalsComponentProps, VitalsValueBase as VitalsValue, -} from "./types"; +} from "@/Components/VitalsMonitor/types"; +import { + getChannel, + getVitalsCanvasSizeAndDuration, +} from "@/Components/VitalsMonitor/utils"; import VentilatorDeviceClient, { VentilatorData, VentilatorVitalsWaveformData, -} from "./VentilatorDeviceClient"; -import VentilatorVitalsRenderer from "./VentilatorWaveformsRenderer"; -import { getChannel, getVitalsCanvasSizeAndDuration } from "./utils"; +} from "@/Components/VitalsMonitor/VentilatorDeviceClient"; +import VentilatorVitalsRenderer from "@/Components/VitalsMonitor/VentilatorWaveformsRenderer"; export default function useVentilatorVitalsMonitor( config?: IVitalsComponentProps["config"] diff --git a/src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts b/src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts index e41034779fd..925b3f38013 100644 --- a/src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts +++ b/src/Components/VitalsMonitor/useVitalsAspectRatioConfig.ts @@ -1,5 +1,5 @@ -import useBreakpoints from "../../Common/hooks/useBreakpoints"; -import { getVitalsCanvasSizeAndDuration } from "./utils"; +import useBreakpoints from "@/Common/hooks/useBreakpoints"; +import { getVitalsCanvasSizeAndDuration } from "@/Components/VitalsMonitor/utils"; export default function useVitalsAspectRatioConfig( breakpointsMap: Parameters>[0] diff --git a/src/Components/VitalsMonitor/utils.ts b/src/Components/VitalsMonitor/utils.ts index 2e38f83b65b..b4b435d5052 100644 --- a/src/Components/VitalsMonitor/utils.ts +++ b/src/Components/VitalsMonitor/utils.ts @@ -1,4 +1,7 @@ -import { ChannelOptions, VitalsWaveformBase } from "./types"; +import { + ChannelOptions, + VitalsWaveformBase, +} from "@/Components/VitalsMonitor/types"; /** * Maps a value from one range to another. diff --git a/src/Integrations/Plausible.tsx b/src/Integrations/Plausible.tsx index c9b040749d4..61ea2f9d7b1 100644 --- a/src/Integrations/Plausible.tsx +++ b/src/Integrations/Plausible.tsx @@ -1,8 +1,9 @@ import { useLocationChange } from "raviger"; -import useConfig from "../Common/hooks/useConfig"; -import Script from "../Components/Common/Script"; import { useEffect } from "react"; +import useConfig from "@/Common/hooks/useConfig"; +import Script from "@/Components/Common/Script"; + export default function Plausible() { const { site_url, analytics_server_url } = useConfig(); diff --git a/src/Integrations/Sentry.tsx b/src/Integrations/Sentry.tsx index 466f93487c4..c2de7f13640 100644 --- a/src/Integrations/Sentry.tsx +++ b/src/Integrations/Sentry.tsx @@ -1,5 +1,6 @@ import { useEffect } from "react"; -import useConfig from "../Common/hooks/useConfig"; + +import useConfig from "@/Common/hooks/useConfig"; interface Props { disabled?: boolean; diff --git a/src/Integrations/index.tsx b/src/Integrations/index.tsx index aeb0399a452..58f27d49908 100644 --- a/src/Integrations/index.tsx +++ b/src/Integrations/index.tsx @@ -1,5 +1,5 @@ -import Sentry from "./Sentry"; -import Plausible from "./Plausible"; +import Plausible from "@/Integrations/Plausible"; +import Sentry from "@/Integrations/Sentry"; const Intergrations = { Sentry, Plausible }; diff --git a/src/Locale/en/index.js b/src/Locale/en/index.js index 950b441ba84..762a5675299 100644 --- a/src/Locale/en/index.js +++ b/src/Locale/en/index.js @@ -1,19 +1,19 @@ -import Auth from "./Auth.json"; -import Asset from "./Asset.json"; -import Common from "./Common.json"; -import Consultation from "./Consultation.json"; -import Entities from "./Entities.json"; -import Facility from "./Facility.json"; -import Hub from "./Hub.json"; -import ErrorPages from "./ErrorPages.json"; -import Shifting from "./Shifting.json"; -import Notifications from "./Notifications.json"; -import ExternalResult from "./ExternalResult.json"; -import CoverImageEdit from "./CoverImageEdit.json"; -import Resource from "./Resource.json"; -import SortOptions from "./SortOptions.json"; -import Bed from "./Bed.json"; -import Medicine from "./Medicine.json"; +import Asset from "@/Locale/en/Asset.json"; +import Auth from "@/Locale/en/Auth.json"; +import Bed from "@/Locale/en/Bed.json"; +import Common from "@/Locale/en/Common.json"; +import Consultation from "@/Locale/en/Consultation.json"; +import CoverImageEdit from "@/Locale/en/CoverImageEdit.json"; +import Entities from "@/Locale/en/Entities.json"; +import ErrorPages from "@/Locale/en/ErrorPages.json"; +import ExternalResult from "@/Locale/en/ExternalResult.json"; +import Facility from "@/Locale/en/Facility.json"; +import Hub from "@/Locale/en/Hub.json"; +import Medicine from "@/Locale/en/Medicine.json"; +import Notifications from "@/Locale/en/Notifications.json"; +import Resource from "@/Locale/en/Resource.json"; +import Shifting from "@/Locale/en/Shifting.json"; +import SortOptions from "@/Locale/en/SortOptions.json"; export default { ...Auth, diff --git a/src/Locale/kn/index.js b/src/Locale/kn/index.js index cbf1d10c3b9..7a94354141e 100644 --- a/src/Locale/kn/index.js +++ b/src/Locale/kn/index.js @@ -1,7 +1,7 @@ -import Auth from "./Auth.json"; -import Common from "./Common.json"; -import Entities from "./Entities.json"; -import Facility from "./Facility.json"; +import Auth from "@/Locale/kn/Auth.json"; +import Common from "@/Locale/kn/Common.json"; +import Entities from "@/Locale/kn/Entities.json"; +import Facility from "@/Locale/kn/Facility.json"; export default { ...Auth, diff --git a/src/Locale/ml/index.js b/src/Locale/ml/index.js index cbf1d10c3b9..496bb4df3c6 100644 --- a/src/Locale/ml/index.js +++ b/src/Locale/ml/index.js @@ -1,7 +1,7 @@ -import Auth from "./Auth.json"; -import Common from "./Common.json"; -import Entities from "./Entities.json"; -import Facility from "./Facility.json"; +import Auth from "@/Locale/ml/Auth.json"; +import Common from "@/Locale/ml/Common.json"; +import Entities from "@/Locale/ml/Entities.json"; +import Facility from "@/Locale/ml/Facility.json"; export default { ...Auth, diff --git a/src/Locale/mr/index.js b/src/Locale/mr/index.js index cbf1d10c3b9..5d9b3f8078a 100644 --- a/src/Locale/mr/index.js +++ b/src/Locale/mr/index.js @@ -1,7 +1,7 @@ -import Auth from "./Auth.json"; -import Common from "./Common.json"; -import Entities from "./Entities.json"; -import Facility from "./Facility.json"; +import Auth from "@/Locale/mr/Auth.json"; +import Common from "@/Locale/mr/Common.json"; +import Entities from "@/Locale/mr/Entities.json"; +import Facility from "@/Locale/mr/Facility.json"; export default { ...Auth, diff --git a/src/Locale/ta/index.js b/src/Locale/ta/index.js index cbf1d10c3b9..6db9cbc0de5 100644 --- a/src/Locale/ta/index.js +++ b/src/Locale/ta/index.js @@ -1,7 +1,7 @@ -import Auth from "./Auth.json"; -import Common from "./Common.json"; -import Entities from "./Entities.json"; -import Facility from "./Facility.json"; +import Auth from "@/Locale/ta/Auth.json"; +import Common from "@/Locale/ta/Common.json"; +import Entities from "@/Locale/ta/Entities.json"; +import Facility from "@/Locale/ta/Facility.json"; export default { ...Auth, diff --git a/src/Providers/AppConfigProvider.tsx b/src/Providers/AppConfigProvider.tsx index 7492a83c126..0e956779d18 100644 --- a/src/Providers/AppConfigProvider.tsx +++ b/src/Providers/AppConfigProvider.tsx @@ -1,7 +1,7 @@ -import { AppConfigContext } from "../Common/hooks/useConfig"; -import Loading from "../Components/Common/Loading"; -import routes from "../Redux/api"; -import useQuery from "../Utils/request/useQuery"; +import { AppConfigContext } from "@/Common/hooks/useConfig"; +import Loading from "@/Components/Common/Loading"; +import routes from "@/Redux/api"; +import useQuery from "@/Utils/request/useQuery"; interface Props { children: React.ReactNode; diff --git a/src/Providers/AuthUserProvider.tsx b/src/Providers/AuthUserProvider.tsx index d515149341e..7111582a47b 100644 --- a/src/Providers/AuthUserProvider.tsx +++ b/src/Providers/AuthUserProvider.tsx @@ -1,11 +1,12 @@ import { useEffect } from "react"; -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 request from "../Utils/request/request"; -import useConfig from "../Common/hooks/useConfig"; + +import { LocalStorageKeys } from "@/Common/constants"; +import { AuthUserContext } from "@/Common/hooks/useAuthUser"; +import useConfig from "@/Common/hooks/useConfig"; +import Loading from "@/Components/Common/Loading"; +import routes from "@/Redux/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface Props { children: React.ReactNode; diff --git a/src/Providers/index.tsx b/src/Providers/index.tsx index 728ee9e1f91..2300e474a74 100644 --- a/src/Providers/index.tsx +++ b/src/Providers/index.tsx @@ -1,5 +1,5 @@ -import AppConfigProvider from "./AppConfigProvider"; -import AuthUserProvider from "./AuthUserProvider"; -import HistoryAPIProvider from "./HistoryAPIProvider"; +import AppConfigProvider from "@/Providers/AppConfigProvider"; +import AuthUserProvider from "@/Providers/AuthUserProvider"; +import HistoryAPIProvider from "@/Providers/HistoryAPIProvider"; export { AppConfigProvider, AuthUserProvider, HistoryAPIProvider }; diff --git a/src/Redux/Reducer.tsx b/src/Redux/Reducer.tsx index ba2178d3d25..8fd73881506 100644 --- a/src/Redux/Reducer.tsx +++ b/src/Redux/Reducer.tsx @@ -1,5 +1,5 @@ -import { IConfig } from "../Common/hooks/useConfig"; -import { actions } from "./fireRequest"; +import { IConfig } from "@/Common/hooks/useConfig"; +import { actions } from "@/Redux/fireRequest"; export const getCachedConfig = () => { const localConfig = localStorage.getItem("config"); diff --git a/src/Redux/actions.tsx b/src/Redux/actions.tsx index b066b98eec5..b26630681ed 100644 --- a/src/Redux/actions.tsx +++ b/src/Redux/actions.tsx @@ -1,6 +1,6 @@ -import { HCXClaimModel, HCXPolicyModel } from "../Components/HCX/models"; -import { MedibaseMedicine } from "../Components/Medicine/models"; -import { fireRequest, fireRequestForFiles } from "./fireRequest"; +import { HCXClaimModel, HCXPolicyModel } from "@/Components/HCX/models"; +import { MedibaseMedicine } from "@/Components/Medicine/models"; +import { fireRequest, fireRequestForFiles } from "@/Redux/fireRequest"; export const getConfig = () => { return fireRequestForFiles("config"); diff --git a/src/Redux/api.tsx b/src/Redux/api.tsx index 7194aba5278..343f6a1b911 100644 --- a/src/Redux/api.tsx +++ b/src/Redux/api.tsx @@ -1,4 +1,4 @@ -import { IConfig } from "../Common/hooks/useConfig"; +import { IConfig } from "@/Common/hooks/useConfig"; import { IAadhaarOtp, IAadhaarOtpTBody, @@ -16,7 +16,7 @@ import { IgetAbhaCardTBody, IinitiateAbdmAuthenticationTBody, IpartialUpdateHealthFacilityTBody, -} from "../Components/ABDM/models"; +} from "@/Components/ABDM/models"; import { AssetBedBody, AssetBedModel, @@ -26,13 +26,7 @@ import { AssetServiceUpdate, AssetTransaction, AssetUpdate, -} from "../Components/Assets/AssetTypes"; -import { - ConsultationModel, - FacilityModel, - LocationModel, - WardModel, -} from "../Components/Facility/models"; +} from "@/Components/Assets/AssetTypes"; import { IDeleteExternalResult, IExternalResult, @@ -40,11 +34,17 @@ import { ILocalBodies, ILocalBodyByDistrict, IPartialUpdateExternalResult, -} from "../Components/ExternalResult/models"; -import { UserModel } from "../Components/Users/models"; -import { PaginatedResponse } from "../Utils/request/types"; -import { PatientModel } from "../Components/Patient/models"; -import { IComment, IResource } from "../Components/Resource/models"; +} from "@/Components/ExternalResult/models"; +import { + ConsultationModel, + FacilityModel, + LocationModel, + WardModel, +} from "@/Components/Facility/models"; +import { PatientModel } from "@/Components/Patient/models"; +import { IComment, IResource } from "@/Components/Resource/models"; +import { UserModel } from "@/Components/Users/models"; +import { PaginatedResponse } from "@/Utils/request/types"; /** * A fake function that returns an empty object casted to type T diff --git a/src/Redux/fireRequest.tsx b/src/Redux/fireRequest.tsx index 892e6bd2ee9..8da35ea11fd 100644 --- a/src/Redux/fireRequest.tsx +++ b/src/Redux/fireRequest.tsx @@ -1,10 +1,9 @@ -import * as Notification from "../Utils/Notifications.js"; - +import axios from "axios"; import { isEmpty, omitBy } from "lodash-es"; -import { LocalStorageKeys } from "../Common/constants"; -import api from "./api"; -import axios from "axios"; +import { LocalStorageKeys } from "@/Common/constants"; +import api from "@/Redux/api"; +import * as Notification from "@/Utils/Notifications.js"; const requestMap: any = api; export const actions = { diff --git a/src/Routers/AppRouter.tsx b/src/Routers/AppRouter.tsx index d098a480149..4223e128ba8 100644 --- a/src/Routers/AppRouter.tsx +++ b/src/Routers/AppRouter.tsx @@ -1,31 +1,30 @@ 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 { BLACKLISTED_PATHS, LocalStorageKeys } from "@/Common/constants"; +import useConfig from "@/Common/hooks/useConfig"; import { DesktopSidebar, MobileSidebar, SIDEBAR_SHRINK_PREFERENCE_KEY, SidebarShrinkContext, -} from "../Components/Common/Sidebar/Sidebar"; -import { BLACKLISTED_PATHS, LocalStorageKeys } from "../Common/constants"; -import useConfig from "../Common/hooks/useConfig"; -import { handleSignOut } from "../Utils/utils"; -import SessionExpired from "../Components/ErrorPages/SessionExpired"; - -import UserRoutes from "./routes/UserRoutes"; -import PatientRoutes from "./routes/PatientRoutes"; -import SampleRoutes from "./routes/SampleRoutes"; -import FacilityRoutes from "./routes/FacilityRoutes"; -import ConsultationRoutes from "./routes/ConsultationRoutes"; -import HCXRoutes from "./routes/HCXRoutes"; -import ShiftingRoutes from "./routes/ShiftingRoutes"; -import AssetRoutes from "./routes/AssetRoutes"; -import ResourceRoutes from "./routes/ResourceRoutes"; -import ExternalResultRoutes from "./routes/ExternalResultRoutes"; -import { DetailRoute } from "./types"; +} from "@/Components/Common/Sidebar/Sidebar"; +import Error404 from "@/Components/ErrorPages/404"; +import SessionExpired from "@/Components/ErrorPages/SessionExpired"; +import { NoticeBoard } from "@/Components/Notifications/NoticeBoard"; +import ShowPushNotification from "@/Components/Notifications/ShowPushNotification"; +import AssetRoutes from "@/Routers/routes/AssetRoutes"; +import ConsultationRoutes from "@/Routers/routes/ConsultationRoutes"; +import ExternalResultRoutes from "@/Routers/routes/ExternalResultRoutes"; +import FacilityRoutes from "@/Routers/routes/FacilityRoutes"; +import HCXRoutes from "@/Routers/routes/HCXRoutes"; +import PatientRoutes from "@/Routers/routes/PatientRoutes"; +import ResourceRoutes from "@/Routers/routes/ResourceRoutes"; +import SampleRoutes from "@/Routers/routes/SampleRoutes"; +import ShiftingRoutes from "@/Routers/routes/ShiftingRoutes"; +import UserRoutes from "@/Routers/routes/UserRoutes"; +import { DetailRoute } from "@/Routers/types"; +import { handleSignOut } from "@/Utils/utils"; const Routes = { "/": () => , diff --git a/src/Routers/SessionRouter.tsx b/src/Routers/SessionRouter.tsx index 8a4f2c2dd68..ea01599b758 100644 --- a/src/Routers/SessionRouter.tsx +++ b/src/Routers/SessionRouter.tsx @@ -1,8 +1,9 @@ -import { Login, ResetPassword } from "../Components/Auth"; import { useRoutes } from "raviger"; -import SessionExpired from "../Components/ErrorPages/SessionExpired"; -import InvalidReset from "../Components/ErrorPages/InvalidReset"; -import TopBar from "../Components/Common/TopBar"; + +import { Login, ResetPassword } from "@/Components/Auth"; +import TopBar from "@/Components/Common/TopBar"; +import InvalidReset from "@/Components/ErrorPages/InvalidReset"; +import SessionExpired from "@/Components/ErrorPages/SessionExpired"; const routes = { "/": () => , diff --git a/src/Routers/index.tsx b/src/Routers/index.tsx index 8a27df7b59d..e1b507dbde0 100644 --- a/src/Routers/index.tsx +++ b/src/Routers/index.tsx @@ -1,5 +1,5 @@ -import SessionRouter from "./SessionRouter"; -import AppRouter from "./AppRouter"; +import AppRouter from "@/Routers/AppRouter"; +import SessionRouter from "@/Routers/SessionRouter"; const routers = { SessionRouter, AppRouter }; diff --git a/src/Routers/routes/AssetRoutes.tsx b/src/Routers/routes/AssetRoutes.tsx index d3bd96ca437..2eaf03177c1 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"; export default { "/assets": () => , diff --git a/src/Routers/routes/ExternalResultRoutes.tsx b/src/Routers/routes/ExternalResultRoutes.tsx index af4bf090d78..8efff724606 100644 --- a/src/Routers/routes/ExternalResultRoutes.tsx +++ b/src/Routers/routes/ExternalResultRoutes.tsx @@ -1,8 +1,8 @@ -import ExternalResultUpload from "../../Components/ExternalResult/ExternalResultUpload"; -import ResultItem from "../../Components/ExternalResult/ResultItem"; -import ResultList from "../../Components/ExternalResult/ResultList"; -import ResultUpdate from "../../Components/ExternalResult/ResultUpdate"; -import { DetailRoute } from "../types"; +import ExternalResultUpload from "@/Components/ExternalResult/ExternalResultUpload"; +import ResultItem from "@/Components/ExternalResult/ResultItem"; +import ResultList from "@/Components/ExternalResult/ResultList"; +import ResultUpdate from "@/Components/ExternalResult/ResultUpdate"; +import { DetailRoute } from "@/Routers/types"; export default { "/external_results": () => , diff --git a/src/Routers/routes/FacilityInventoryRoutes.tsx b/src/Routers/routes/FacilityInventoryRoutes.tsx index 17e93b2bc60..43d0b279820 100644 --- a/src/Routers/routes/FacilityInventoryRoutes.tsx +++ b/src/Routers/routes/FacilityInventoryRoutes.tsx @@ -1,8 +1,9 @@ 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"; export default { "/facility/:facilityId/inventory": ({ facilityId }: any) => ( diff --git a/src/Routers/routes/FacilityLocationRoutes.tsx b/src/Routers/routes/FacilityLocationRoutes.tsx index c43673b60f5..3c546c281ba 100644 --- a/src/Routers/routes/FacilityLocationRoutes.tsx +++ b/src/Routers/routes/FacilityLocationRoutes.tsx @@ -1,8 +1,8 @@ -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 { 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"; export default { "/facility/:facilityId/location": ({ facilityId }: any) => ( diff --git a/src/Routers/routes/FacilityRoutes.tsx b/src/Routers/routes/FacilityRoutes.tsx index 77247df9189..6c5e5b690dd 100644 --- a/src/Routers/routes/FacilityRoutes.tsx +++ b/src/Routers/routes/FacilityRoutes.tsx @@ -1,13 +1,13 @@ -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 { HospitalList } from "../../Components/Facility/HospitalList"; -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 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 { HospitalList } from "@/Components/Facility/HospitalList"; +import { TriageForm } from "@/Components/Facility/TriageForm"; +import ResourceCreate from "@/Components/Resource/ResourceCreate"; +import FacilityInventoryRoutes from "@/Routers/routes/FacilityInventoryRoutes"; +import FacilityLocationRoutes from "@/Routers/routes/FacilityLocationRoutes"; export default { "/facility": () => , diff --git a/src/Routers/routes/HCXRoutes.tsx b/src/Routers/routes/HCXRoutes.tsx index 8a36e033c15..2e259ba8520 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"; export default { "/facility/:facilityId/patient/:patientId/consultation/:consultationId/claims": diff --git a/src/Routers/routes/PatientRoutes.tsx b/src/Routers/routes/PatientRoutes.tsx index ae594d767ec..5c27d7d5c58 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 { FileUpload } from "../../Components/Patient/FileUpload"; -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 { DetailRoute } from "../types"; -import DeathReport from "../../Components/DeathReport/DeathReport"; +import DeathReport from "@/Components/DeathReport/DeathReport"; +import InvestigationReports from "@/Components/Facility/Investigations/Reports"; +import { FileUpload } from "@/Components/Patient/FileUpload"; +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 { DetailRoute } from "@/Routers/types"; export default { "/patients": () => , diff --git a/src/Routers/routes/ResourceRoutes.tsx b/src/Routers/routes/ResourceRoutes.tsx index 8408ab4d79d..5fa3db99910 100644 --- a/src/Routers/routes/ResourceRoutes.tsx +++ b/src/Routers/routes/ResourceRoutes.tsx @@ -1,11 +1,12 @@ +import { Redirect } from "raviger"; import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; -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 { DetailRoute } from "../types"; + +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 { DetailRoute } from "@/Routers/types"; const getDefaultView = () => localStorage.getItem("defaultResourceView") === "list" ? "list" : "board"; diff --git a/src/Routers/routes/SampleRoutes.tsx b/src/Routers/routes/SampleRoutes.tsx index 290a34fd4eb..829a2f91afd 100644 --- a/src/Routers/routes/SampleRoutes.tsx +++ b/src/Routers/routes/SampleRoutes.tsx @@ -1,8 +1,8 @@ -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 { DetailRoute, RouteParams } from "../types"; +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 { DetailRoute, RouteParams } from "@/Routers/types"; export default { "/sample": () => , diff --git a/src/Routers/routes/ShiftingRoutes.tsx b/src/Routers/routes/ShiftingRoutes.tsx index 9b20b4a1a0b..47e7b851cea 100644 --- a/src/Routers/routes/ShiftingRoutes.tsx +++ b/src/Routers/routes/ShiftingRoutes.tsx @@ -1,11 +1,12 @@ +import { Redirect } from "raviger"; import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; -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 { ShiftCreate } from "@/Components/Patient/ShiftCreate"; +import BoardView from "@/Components/Shifting/BoardView"; +import ListView from "@/Components/Shifting/ListView"; +import ShiftDetails from "@/Components/Shifting/ShiftDetails"; +import { ShiftDetailsUpdate } from "@/Components/Shifting/ShiftDetailsUpdate"; const getDefaultView = () => localStorage.getItem("defaultShiftView") === "list" ? "list" : "board"; diff --git a/src/Routers/routes/UserRoutes.tsx b/src/Routers/routes/UserRoutes.tsx index 56877ca4c78..6f4232d7744 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"; export default { "/users": () => , diff --git a/src/Utils/AuthorizeFor.tsx b/src/Utils/AuthorizeFor.tsx index 0ba40755205..49e933bd75f 100644 --- a/src/Utils/AuthorizeFor.tsx +++ b/src/Utils/AuthorizeFor.tsx @@ -1,4 +1,4 @@ -import { UserRole } from "../Common/constants"; +import { UserRole } from "@/Common/constants"; export type AuthorizedForCB = (userType: UserRole) => boolean; export type AuthorizedElementProps = { diff --git a/src/Utils/AutoSave.tsx b/src/Utils/AutoSave.tsx index 5cdf118650f..ebbc0108e1d 100644 --- a/src/Utils/AutoSave.tsx +++ b/src/Utils/AutoSave.tsx @@ -1,7 +1,8 @@ import { useReducer, useEffect, useRef, useState, Dispatch } from "react"; -import ButtonV2 from "../Components/Common/components/ButtonV2"; -import { FormAction, FormReducer, FormState } from "../Components/Form/Utils"; -import { relativeTime } from "./utils"; + +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { FormAction, FormReducer, FormState } from "@/Components/Form/Utils"; +import { relativeTime } from "@/Utils/utils"; type Draft = { timestamp: number; diff --git a/src/Utils/VoiceRecorder.tsx b/src/Utils/VoiceRecorder.tsx index f816a700154..145cd9c3c1b 100644 --- a/src/Utils/VoiceRecorder.tsx +++ b/src/Utils/VoiceRecorder.tsx @@ -1,9 +1,11 @@ -import useRecorder from "./useRecorder"; import { useEffect, useState } from "react"; -import ButtonV2 from "../Components/Common/components/ButtonV2"; -import CareIcon from "../CAREUI/icons/CareIcon"; -import { NonReadOnlyUsers } from "./AuthorizeFor"; import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import useRecorder from "@/Utils/useRecorder"; + export const VoiceRecorder = (props: any) => { const { t } = useTranslation(); const { createAudioBlob, confirmAudioBlobExists, reset, setResetRecording } = diff --git a/src/Utils/dayjs.ts b/src/Utils/dayjs.ts index b70c2fc044b..a053cd1ffbb 100644 --- a/src/Utils/dayjs.ts +++ b/src/Utils/dayjs.ts @@ -1,8 +1,8 @@ import dayjs from "dayjs"; -import relativeTime from "dayjs/plugin/relativeTime"; -import duration from "dayjs/plugin/duration"; import customParseFormat from "dayjs/plugin/customParseFormat"; +import duration from "dayjs/plugin/duration"; import isBetween from "dayjs/plugin/isBetween"; +import relativeTime from "dayjs/plugin/relativeTime"; dayjs.extend(relativeTime); dayjs.extend(duration); diff --git a/src/Utils/request/handleResponse.ts b/src/Utils/request/handleResponse.ts index 8698919c869..61dce99709b 100644 --- a/src/Utils/request/handleResponse.ts +++ b/src/Utils/request/handleResponse.ts @@ -1,7 +1,8 @@ -import { RequestResult } from "./types"; -import * as Notifications from "../Notifications"; import { navigate } from "raviger"; +import * as Notifications from "@/Utils/Notifications"; +import { RequestResult } from "@/Utils/request/types"; + export default function handleResponse( { res, error }: RequestResult, silent?: boolean diff --git a/src/Utils/request/request.ts b/src/Utils/request/request.ts index 7cfb647d4b7..3b3a7f31ae8 100644 --- a/src/Utils/request/request.ts +++ b/src/Utils/request/request.ts @@ -1,6 +1,6 @@ -import handleResponse from "./handleResponse"; -import { RequestOptions, RequestResult, Route } from "./types"; -import { makeHeaders, makeUrl } from "./utils"; +import handleResponse from "@/Utils/request/handleResponse"; +import { RequestOptions, RequestResult, Route } from "@/Utils/request/types"; +import { makeHeaders, makeUrl } from "@/Utils/request/utils"; interface Options extends RequestOptions { controller?: AbortController; diff --git a/src/Utils/request/useQuery.ts b/src/Utils/request/useQuery.ts index 2dab2910278..f375423db40 100644 --- a/src/Utils/request/useQuery.ts +++ b/src/Utils/request/useQuery.ts @@ -1,7 +1,12 @@ import { useCallback, useEffect, useRef, useState } from "react"; -import { QueryRoute, RequestOptions, RequestResult } from "./types"; -import request from "./request"; -import { mergeRequestOptions } from "./utils"; + +import request from "@/Utils/request/request"; +import { + QueryRoute, + RequestOptions, + RequestResult, +} from "@/Utils/request/types"; +import { mergeRequestOptions } from "@/Utils/request/utils"; export interface QueryOptions extends RequestOptions { prefetch?: boolean; diff --git a/src/Utils/request/utils.ts b/src/Utils/request/utils.ts index ec919c79490..9480d098c1d 100644 --- a/src/Utils/request/utils.ts +++ b/src/Utils/request/utils.ts @@ -1,6 +1,6 @@ -import { LocalStorageKeys } from "../../Common/constants"; -import * as Notification from "../Notifications"; -import { QueryParams, RequestOptions } from "./types"; +import { LocalStorageKeys } from "@/Common/constants"; +import * as Notification from "@/Utils/Notifications"; +import { QueryParams, RequestOptions } from "@/Utils/request/types"; export function makeUrl( path: string, diff --git a/src/Utils/transformUtils.ts b/src/Utils/transformUtils.ts index 0050a0bcbb6..1b0c26f4aaa 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 = (asset: AssetData) => { const { meta } = asset; diff --git a/src/Utils/useRecorder.js b/src/Utils/useRecorder.js index 27a8b4d834e..fee81757314 100644 --- a/src/Utils/useRecorder.js +++ b/src/Utils/useRecorder.js @@ -1,5 +1,6 @@ import { useEffect, useState } from "react"; -import { Error } from "./Notifications"; + +import { Error } from "@/Utils/Notifications"; const useRecorder = () => { const [audioURL, setAudioURL] = useState(""); diff --git a/src/Utils/utils.ts b/src/Utils/utils.ts index 34d4070dbe9..136d6e550a3 100644 --- a/src/Utils/utils.ts +++ b/src/Utils/utils.ts @@ -1,11 +1,12 @@ import { navigate } from "raviger"; + import { AREACODES, IN_LANDLINE_AREA_CODES, LocalStorageKeys, -} from "../Common/constants"; -import phoneCodesJson from "../Common/static/countryPhoneAndFlags.json"; -import dayjs from "./dayjs"; +} from "@/Common/constants"; +import phoneCodesJson from "@/Common/static/countryPhoneAndFlags.json"; +import dayjs from "@/Utils/dayjs"; interface ApacheParams { age: number; diff --git a/src/i18n.ts b/src/i18n.ts index 289e0fc325f..e2062a0d43c 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -1,11 +1,12 @@ import i18n from "i18next"; -import { initReactI18next } from "react-i18next"; import LanguageDetector from "i18next-browser-languagedetector"; -import en from "./Locale/en"; -import ta from "./Locale/ta"; -import ml from "./Locale/ml"; -import mr from "./Locale/mr"; -import kn from "./Locale/kn"; +import { initReactI18next } from "react-i18next"; + +import en from "@/Locale/en"; +import kn from "@/Locale/kn"; +import ml from "@/Locale/ml"; +import mr from "@/Locale/mr"; +import ta from "@/Locale/ta"; const resources = { en: { translation: en }, diff --git a/src/index.tsx b/src/index.tsx index c603e92928d..a6d2de6e35e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,12 +1,14 @@ import { createRoot } from "react-dom/client"; -import reducer from "../src/Redux/Reducer"; -import App from "./App"; -import "./i18n"; + +import App from "@/App"; +import reducer from "@/Redux/Reducer"; + +import "@/i18n"; import { applyMiddleware, createStore } from "redux"; import thunk from "redux-thunk"; import { Provider } from "react-redux"; import * as Sentry from "@sentry/browser"; -import "./style/index.css"; +import "@/style/index.css"; // eslint-disable-next-line import/no-unresolved import { registerSW } from "virtual:pwa-register"; diff --git a/src/service-worker.ts b/src/service-worker.ts index 9820e6054aa..c7c70d10d9f 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -8,13 +8,13 @@ // You can also remove this file if you'd prefer not to use a // service worker, and the Workbox build step will be skipped. -import { ExpirationPlugin } from "workbox-expiration"; -import { StaleWhileRevalidate } from "workbox-strategies"; import { clientsClaim } from "workbox-core"; +import { ExpirationPlugin } from "workbox-expiration"; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { precacheAndRoute } from "workbox-precaching"; // import { createHandlerBoundToURL } from "workbox-precaching"; import { registerRoute } from "workbox-routing"; +import { StaleWhileRevalidate } from "workbox-strategies"; declare const self: ServiceWorkerGlobalScope; diff --git a/src/stories/Care UI/ButtonV2.stories.tsx b/src/stories/Care UI/ButtonV2.stories.tsx index 512bedf9e2a..b763f0ca9e7 100644 --- a/src/stories/Care UI/ButtonV2.stories.tsx +++ b/src/stories/Care UI/ButtonV2.stories.tsx @@ -1,5 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; -import ButtonV2 from "../../Components/Common/components/ButtonV2"; + +import ButtonV2 from "@/Components/Common/components/ButtonV2"; const meta: Meta = { component: ButtonV2, diff --git a/src/stories/Care UI/Form Fields/DateFormField.stories.tsx b/src/stories/Care UI/Form Fields/DateFormField.stories.tsx index c9555c9c04d..accdb65bf55 100644 --- a/src/stories/Care UI/Form Fields/DateFormField.stories.tsx +++ b/src/stories/Care UI/Form Fields/DateFormField.stories.tsx @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react"; import { useState } from "react"; -import DateFormField from "../../../Components/Form/FormFields/DateFormField"; + +import DateFormField from "@/Components/Form/FormFields/DateFormField"; const meta: Meta = { component: DateFormField, diff --git a/src/stories/Care UI/Form Fields/DateRangeFormField.stories.tsx b/src/stories/Care UI/Form Fields/DateRangeFormField.stories.tsx index 6e4e1a9d29d..33b5416750d 100644 --- a/src/stories/Care UI/Form Fields/DateRangeFormField.stories.tsx +++ b/src/stories/Care UI/Form Fields/DateRangeFormField.stories.tsx @@ -1,7 +1,8 @@ import type { Meta, StoryObj } from "@storybook/react"; import { useState } from "react"; -import { DateRange } from "../../../Components/Common/DateRangeInputV2"; -import DateRangeFormField from "../../../Components/Form/FormFields/DateRangeFormField"; + +import { DateRange } from "@/Components/Common/DateRangeInputV2"; +import DateRangeFormField from "@/Components/Form/FormFields/DateRangeFormField"; const meta: Meta = { component: DateRangeFormField, diff --git a/src/stories/Care UI/Form Fields/MultiSelectFormField.stories.tsx b/src/stories/Care UI/Form Fields/MultiSelectFormField.stories.tsx index 43b10627ff4..2cc3e4ac22c 100644 --- a/src/stories/Care UI/Form Fields/MultiSelectFormField.stories.tsx +++ b/src/stories/Care UI/Form Fields/MultiSelectFormField.stories.tsx @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react"; import { useState } from "react"; -import { MultiSelectFormField } from "../../../Components/Form/FormFields/SelectFormField"; + +import { MultiSelectFormField } from "@/Components/Form/FormFields/SelectFormField"; const meta: Meta = { component: MultiSelectFormField, diff --git a/src/stories/Care UI/Form Fields/SelectFormField.stories.tsx b/src/stories/Care UI/Form Fields/SelectFormField.stories.tsx index 73fe54ff034..78f050683ad 100644 --- a/src/stories/Care UI/Form Fields/SelectFormField.stories.tsx +++ b/src/stories/Care UI/Form Fields/SelectFormField.stories.tsx @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react"; import { useState } from "react"; -import { SelectFormField } from "../../../Components/Form/FormFields/SelectFormField"; + +import { SelectFormField } from "@/Components/Form/FormFields/SelectFormField"; const meta: Meta = { component: SelectFormField, diff --git a/src/stories/Care UI/Slideover.stories.tsx b/src/stories/Care UI/Slideover.stories.tsx index 0c13d3e6111..82cde90f3de 100644 --- a/src/stories/Care UI/Slideover.stories.tsx +++ b/src/stories/Care UI/Slideover.stories.tsx @@ -1,7 +1,8 @@ import type { Meta, StoryObj } from "@storybook/react"; import { useState } from "react"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import ButtonV2 from "../../Components/Common/components/ButtonV2"; + +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import ButtonV2 from "@/Components/Common/components/ButtonV2"; const meta: Meta = { component: SlideOver, diff --git a/src/stories/Introduction.mdx b/src/stories/Introduction.mdx index e128c8c6cec..40fafd1cb80 100644 --- a/src/stories/Introduction.mdx +++ b/src/stories/Introduction.mdx @@ -1,12 +1,13 @@ import { Meta } from "@storybook/blocks"; -import Code from "./assets/code-brackets.svg"; -import Colors from "./assets/colors.svg"; -import Comments from "./assets/comments.svg"; -import Direction from "./assets/direction.svg"; -import Flow from "./assets/flow.svg"; -import Plugin from "./assets/plugin.svg"; -import Repo from "./assets/repo.svg"; -import StackAlt from "./assets/stackalt.svg"; + +import Code from "@/stories/assets/code-brackets.svg"; +import Colors from "@/stories/assets/colors.svg"; +import Comments from "@/stories/assets/comments.svg"; +import Direction from "@/stories/assets/direction.svg"; +import Flow from "@/stories/assets/flow.svg"; +import Plugin from "@/stories/assets/plugin.svg"; +import Repo from "@/stories/assets/repo.svg"; +import StackAlt from "@/stories/assets/stackalt.svg";