Skip to content

Commit

Permalink
Fixed Breadcrumb to Display Detailed Name Instead of ID
Browse files Browse the repository at this point in the history
  • Loading branch information
rayyjeb committed Nov 25, 2024
1 parent 2fdffa2 commit 9ca4a4a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/components/Patient/SampleDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
return (
<Page
title={t("sample_test_details")}
crumbsReplacements={{ [id]: { name: sampleDetails.patient_name } }}
backUrl="/sample"
options={
sampleDetails?.patient && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export interface SampleTestModel {
date_of_sample?: string;
date_of_result?: string;
consultation?: number;
patient_name?: number;
patient_name?: string;
patient_has_sari?: boolean;
patient_has_confirmed_contact?: boolean;
patient_has_suspected_contact?: boolean;
Expand Down
3 changes: 3 additions & 0 deletions src/components/Shifting/ShiftDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ export default function ShiftDetails(props: { id: string }) {
) : (
<Page
title={t("shifting_details")}
crumbsReplacements={{
[props.id]: { name: data?.patient_object?.name },
}}
backUrl="/shifting/board"
options={
<div className="flex gap-2">
Expand Down

0 comments on commit 9ca4a4a

Please sign in to comment.