Skip to content

Commit 971a5a3

Browse files
committed
Refactor MedicalReport interface to rename 'date' to 'createdAt' and update ReportItem component accordingly
1 parent 9e05244 commit 971a5a3

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

frontend/src/common/models/medicalReport.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ export interface MedicalReport {
2626
id: string;
2727
title: string;
2828
category: ReportCategory;
29-
date: string; // ISO date string
29+
createdAt: string; // ISO date string
3030
status: ReportStatus;
31-
documentUrl?: string;
32-
summary?: string;
33-
content?: string;
34-
doctor?: string;
35-
facility?: string;
3631
}

frontend/src/pages/Home/components/ReportItem/ReportItem.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ interface ReportItemProps {
1515
*/
1616
const ReportItem: React.FC<ReportItemProps> = ({ report, onClick }) => {
1717
const { t } = useTranslation();
18-
const { title, category, date, status } = report;
18+
const { title, category, createdAt, status } = report;
1919
const isUnread = status === ReportStatus.UNREAD;
20-
21-
// Format the date from ISO string to MM/DD/YYYY
22-
const formattedDate = format(new Date(date), 'MM/dd/yyyy');
20+
21+
// Format the createdAt from ISO string to MM/DD/YYYY
22+
const formattedDate = format(new Date(createdAt), 'MM/dd/yyyy');
2323

2424
// Get the appropriate icon based on report category
2525
const getCategoryIcon = () => {

0 commit comments

Comments
 (0)