Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
UdaySagar-Git committed Aug 23, 2024
1 parent 54153b8 commit c900e9a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Components/Common/RichTextEditor/RichTextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ const RichTextEditor: React.FC<RichTextEditorProps> = ({
newFile,
"PUT",
{ "Content-Type": file.type },
(xhr: XMLHttpRequest) => {
async (xhr: XMLHttpRequest) => {
if (xhr.status >= 200 && xhr.status < 300) {
Notification.Success({
msg: "File Uploaded Successfully",
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Facility/DoctorNote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const DoctorNote = (props: DoctorNoteProps) => {

return (
<div
className="mt-4 flex h-[600px] grow flex-col-reverse overflow-y-scroll bg-white sm:ml-2"
className="mt-4 flex h-[500px] grow flex-col-reverse overflow-y-scroll bg-white sm:ml-2"
id="patient-notes-list"
>
{state.notes.length ? (
Expand Down
4 changes: 4 additions & 0 deletions src/Components/Facility/PatientConsultationNotesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => {
fetchNotes();
}, [thread]);

useEffect(() => {
setThreadViewNote?.("");
}, [thread, mode]);

useEffect(() => {
setReload?.(true);
}, []);
Expand Down
9 changes: 7 additions & 2 deletions src/Components/Facility/PatientNoteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ const PatientNoteCard = ({
>
<div
className="flex h-full w-full flex-col items-center justify-center p-2"
onClick={() => loadFile(file.external_id, note.id)}
onClick={(e) => {
e.stopPropagation();
loadFile(file.external_id, note.id);
}}
>
<CareIcon
icon="l-file"
Expand Down Expand Up @@ -369,7 +372,9 @@ const PatientNoteCard = ({
<p className="text-sm font-medium text-secondary-500">
Note
</p>
<p className="text-sm text-secondary-900">{edit.note}</p>
<div className="text-sm text-secondary-900">
<MarkdownPreview markdown={edit.note} />
</div>
</div>
</div>
);
Expand Down
20 changes: 11 additions & 9 deletions src/Components/Facility/PatientNotesDetailedView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const PatientNotesDetailedView = (props: Props) => {
}

return (
<div className="flex w-[500px] flex-col overflow-hidden rounded-lg border border-gray-300 bg-white p-3">
<div className="flex w-[500px] flex-col overflow-hidden rounded-lg border border-gray-300 bg-white px-3 pt-2">
{state && (
<div className="flex flex-col">
<div className="flex-1">
Expand All @@ -121,15 +121,17 @@ const PatientNotesDetailedView = (props: Props) => {
allowReply={false}
/>
</div>
{state.replies.length > 0 && (
<div className="mr-4 mt-1 flex items-center justify-end text-sm text-gray-500">
{state.replies.length}{" "}
{state.replies.length > 1 ? "replies" : "reply"}
</div>
)}
<h4 className="ml-2 text-lg text-slate-600">Replies</h4>
<div className="flex items-center justify-between p-2">
<h4 className="ml-2 text-lg text-slate-600">Replies</h4>
{state.replies.length > 0 && (
<div className="mr-4 mt-1 flex items-center justify-end text-sm text-gray-500">
{state.replies.length}{" "}
{state.replies.length > 1 ? "replies" : "reply"}
</div>
)}
</div>
{
<div className="flex max-h-[430px] flex-col-reverse overflow-x-hidden overflow-y-scroll">
<div className="flex max-h-[250px] flex-col-reverse overflow-x-hidden overflow-y-scroll pl-2">
{state.replies.map((reply) => (
<DoctorNoteReplyPreviewCard
key={reply.id}
Expand Down

0 comments on commit c900e9a

Please sign in to comment.