Skip to content

Commit

Permalink
bug fix - enter uploading a notes
Browse files Browse the repository at this point in the history
  • Loading branch information
UdaySagar-Git committed Jul 12, 2024
1 parent 266b494 commit e29837f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 319 deletions.
290 changes: 0 additions & 290 deletions src/Components/Common/RichTextEditor/FileUpload.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion src/Components/Common/RichTextEditor/RichTextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,14 @@ const RichTextEditor: React.FC<RichTextEditorProps> = ({
<Submit
id="add_doctor_note_button"
onClick={async () => {
if (!editorRef.current) return;
const id = await onAddNote();
if (!id) return;
for (const file of tempFiles) {
await handleFileUpload(file, id);
}
setTempFiles([]);
editorRef.current!.innerHTML = "";
editorRef.current.innerHTML = "";
}}
className="flex-none rounded bg-primary-500 p-2 text-white"
disabled={!isAuthorized}
Expand Down
15 changes: 1 addition & 14 deletions src/Components/Facility/ConsultationDoctorNotes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { PatientNoteStateType, PaitentNotesReplyModel } from "../models.js";
import routes from "../../../Redux/api.js";
import request from "../../../Utils/request/request.js";
import useQuery from "../../../Utils/request/useQuery.js";
import useKeyboardShortcut from "use-keyboard-shortcut";
import { classNames, isAppleDevice } from "../../../Utils/utils.js";
import { classNames } from "../../../Utils/utils.js";
// import AutoExpandingTextInputFormField from "../../Form/FormFields/AutoExpandingTextInputFormField.js";
import { PATIENT_NOTES_THREADS } from "../../../Common/constants.js";
import useAuthUser from "../../../Common/hooks/useAuthUser.js";
Expand Down Expand Up @@ -113,18 +112,6 @@ const ConsultationDoctorNotes = (props: ConsultationDoctorNotesProps) => {
}
});

useKeyboardShortcut(
[isAppleDevice ? "Meta" : "Shift", "Enter"],
() => {
// if (focused) {
onAddNote();
// }
},
{
ignoreInputFields: false,
},
);

if (noteId) {
return (
<PatientNotesDetailedView
Expand Down
15 changes: 1 addition & 14 deletions src/Components/Facility/PatientNotesSlideover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import { useState, useEffect, Dispatch, SetStateAction } from "react";
import * as Notification from "../../Utils/Notifications.js";
import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor";
import CareIcon from "../../CAREUI/icons/CareIcon";
import { classNames, isAppleDevice } from "../../Utils/utils";
import { classNames } from "../../Utils/utils";
import { make as Link } from "../Common/components/Link.bs";
import { useMessageListener } from "../../Common/hooks/useMessageListener";
import PatientConsultationNotesList from "./PatientConsultationNotesList";
import request from "../../Utils/request/request";
import routes from "../../Redux/api";
import { PatientNoteStateType, PaitentNotesReplyModel } from "./models";
import useKeyboardShortcut from "use-keyboard-shortcut";
import useAuthUser from "../../Common/hooks/useAuthUser";
import { PATIENT_NOTES_THREADS } from "../../Common/constants.js";
import DoctorNoteReplyPreviewCard from "./DoctorNoteReplyPreviewCard.js";
Expand Down Expand Up @@ -121,18 +120,6 @@ export default function PatientNotesSlideover(props: PatientNotesProps) {
fetchPatientName();
}, [patientId]);

useKeyboardShortcut(
[isAppleDevice ? "Meta" : "Shift", "Enter"],
() => {
// if (focused) {
onAddNote();
// }
},
{
ignoreInputFields: false,
},
);

const notesActionIcons = (
<div className="flex gap-1">
{show && (
Expand Down

0 comments on commit e29837f

Please sign in to comment.