Skip to content

Commit

Permalink
switch to absolute imports
Browse files Browse the repository at this point in the history
  • Loading branch information
UdaySagar-Git committed Dec 5, 2024
1 parent 563ef7a commit b1b1762
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
7 changes: 3 additions & 4 deletions src/components/Common/DiscussionNotesEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ import React, { useCallback, useEffect, useRef, useState } from "react";
import CareIcon from "@/CAREUI/icons/CareIcon";

import { Submit } from "@/components/Common/ButtonV2";
import { FilePreviewCard } from "@/components/Common/FilePreviewCard";
import MentionsDropdown from "@/components/Common/MentionDropdown";
import NotePreview from "@/components/Common/NotePreview";

import useFileUpload from "@/hooks/useFileUpload";

import { getCaretCoordinates, getCaretInfo } from "@/Utils/textEditor";
import { classNames } from "@/Utils/utils";

import { FilePreviewCard } from "./FilePreviewCard";
import MentionsDropdown from "./MentionDropdown";
import NotePreview from "./NotePreview";

interface DiscussionNotesEditorProps {
initialNote?: string;
onChange: (text: string) => void;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Common/MentionDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { useCallback, useEffect, useMemo, useState } from "react";

import { Avatar } from "@/components/Common/Avatar";

import useSlug from "@/hooks/useSlug";

import routes from "@/Utils/request/api";
import useQuery from "@/Utils/request/useQuery";
import { formatDisplayName } from "@/Utils/utils";

import { Avatar } from "./Avatar";

interface MentionsDropdownProps {
onSelect: (user: { id: string; username: string }) => void;
position: { top: number; left: number };
Expand Down
3 changes: 1 addition & 2 deletions src/components/Common/NotePreview.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import DOMPurify from "dompurify";
import { useEffect, useRef, useState } from "react";

import { Avatar } from "@/components/Common/Avatar";
import { UserBareMinimum } from "@/components/Users/models";

import { formatDisplayName } from "@/Utils/utils";

import { Avatar } from "./Avatar";

const UserCard = ({ user }: { user: UserBareMinimum }) => (
<div className="z-10 flex w-56 items-center space-x-3 rounded-lg bg-gray-200 px-3 pb-3 shadow-lg">
<Avatar
Expand Down
8 changes: 4 additions & 4 deletions src/components/Facility/DoctorNoteReplyPreviewCard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react";

import CareIcon from "@/CAREUI/icons/CareIcon";

import { Avatar } from "@/components/Common/Avatar";
import NotePreview from "@/components/Common/NotePreview";
import { PatientNotesReplyModel } from "@/components/Facility/models";

import { USER_TYPES_MAP } from "@/common/constants";

import { formatDateTime, formatDisplayName, relativeDate } from "@/Utils/utils";

import CareIcon from "../../CAREUI/icons/CareIcon";
import { Avatar } from "../Common/Avatar";
import NotePreview from "../Common/NotePreview";

interface Props {
parentNote: PatientNotesReplyModel | undefined;
children: React.ReactNode;
Expand Down
3 changes: 1 addition & 2 deletions src/components/Facility/PatientNoteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useRef, useState } from "react";

import CareIcon from "@/CAREUI/icons/CareIcon";

import { Avatar } from "@/components/Common/Avatar";
import ButtonV2 from "@/components/Common/ButtonV2";
import DialogModal from "@/components/Common/Dialog";
import { FilePreviewCard } from "@/components/Common/FilePreviewCard";
Expand Down Expand Up @@ -32,8 +33,6 @@ import {
relativeDate,
} from "@/Utils/utils";

import { Avatar } from "../Common/Avatar";

const PatientNoteCard = ({
note,
setReload,
Expand Down
8 changes: 5 additions & 3 deletions src/components/Facility/PatientNotesDetailedView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import CareIcon from "@/CAREUI/icons/CareIcon";
import CircularProgress from "@/components/Common/CircularProgress";
import DiscussionNotesEditor from "@/components/Common/DiscussionNotesEditor";
import DoctorNoteReplyPreviewCard from "@/components/Facility/DoctorNoteReplyPreviewCard";
import PatientNoteCard from "@/components/Facility/PatientNoteCard";
import {
PatientNotesModel,
PatientNotesReplyModel,
} from "@/components/Facility/models";

import * as Notification from "@/Utils/Notifications";
import routes from "@/Utils/request/api";
import request from "@/Utils/request/request";

import PatientNoteCard from "./PatientNoteCard";
import { PatientNotesModel, PatientNotesReplyModel } from "./models";

interface Props {
patientId: string;
consultationId: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Users/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ const editFormReducer = (state: State, action: Action) => {
};

export default function UserProfile() {
const { signOut, refetchUser } = useAuthContext();
const { t } = useTranslation();
const { signOut, refetchUser } = useAuthContext();
const [states, dispatch] = useReducer(editFormReducer, initialState);
const [editAvatar, setEditAvatar] = useState(false);
const [updateStatus, setUpdateStatus] = useState({
Expand Down

0 comments on commit b1b1762

Please sign in to comment.