Skip to content

Commit

Permalink
Merge pull request #312 from Pixilib/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
salimkanoun authored Sep 7, 2024
2 parents 0fa777f + 82cf292 commit a6ee04f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/content/ContentRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const ContentRoot: React.FC = () => {
patient={patient}
onDeletePatient={handleDeletePatient}
onEditPatient={(patient) => setEditingPatient(patient)}
onStudyUpdated={() => refreshFind()}
/>
))
)}
Expand Down
2 changes: 1 addition & 1 deletion src/content/OhifViewerLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type OhifViewerLinkProps = {
const OhifViewerLink = ({ studyInstanceUID }: OhifViewerLinkProps) => {
const token = store?.getState()?.user.token
return (
<a href={'/viewer-ohif/viewer?StudyInstanceUIDs=' + studyInstanceUID + '&token=' + token} target='_blank'>View in OHIF</a>
<a href={'/viewer-ohif/gaelo?StudyInstanceUIDs=' + studyInstanceUID + '&token=' + token} target='_blank'>View in OHIF</a>
)

}
Expand Down
5 changes: 3 additions & 2 deletions src/content/patients/AccordionPatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import { AccordionHeader } from "../../ui/Accordion";
type AccordionPatientProps = {
patient: Patient;
onEditPatient: (patient :Patient) => void;
onStudyUpdated: (patient :Patient) => void;
onDeletePatient: (patient :Patient) => void;
};

const AccordionPatient: React.FC<AccordionPatientProps> = ({ patient, onEditPatient, onDeletePatient }) => {
const AccordionPatient: React.FC<AccordionPatientProps> = ({ patient, onEditPatient, onDeletePatient, onStudyUpdated }) => {
const [selectedStudyId, setSelectedStudyId] = useState<string | null>(null);

const handleStudySelected = (studyId: string) => {
Expand Down Expand Up @@ -55,7 +56,7 @@ const AccordionPatient: React.FC<AccordionPatientProps> = ({ patient, onEditPati
<div className={`${!selectedStudyId ? 'lg:col-span-2' : ''}`}>
<StudyRoot
patient={patient}
onStudyUpdated={() => onEditPatient(patient)}
onStudyUpdated={() => onStudyUpdated(patient)}
onStudySelected={handleStudySelected}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/content/series/SeriesRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const SeriesRoot: React.FC<SeriesRootProps> = ({ studyId }) => {
toastSuccess('Series deleted successfully');
refetchSeries();
},
onError: (error: any) => {
toastError(`Failed to delete series ${error}`);
onError: () => {
toastError(`Failed to delete series`);
},
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/content/studies/AiStudy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const AiStudy: React.FC<AIStudyProps> = ({ studyId, onClose, show }) => {
[[]],
{
onSuccess: (jobId) => {
toastSuccess("Job Created " + jobId)
toastSuccess("Job Created")
setJobId(jobId)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/content/studies/StudyRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const StudyRoot: React.FC<StudyRootProps> = ({ patient, onStudyUpdated, onStudyS
onStudyUpdated();
},
onError: (error: any) => {
toastError('Failed to delete study: ' + error);
toastError('Failed to delete study');
},
}
);
Expand Down

0 comments on commit a6ee04f

Please sign in to comment.