diff --git a/CoVAR-app/src/app/(pages)/dashboard/page.tsx b/CoVAR-app/src/app/(pages)/dashboard/page.tsx
index dea07ab..5888439 100644
--- a/CoVAR-app/src/app/(pages)/dashboard/page.tsx
+++ b/CoVAR-app/src/app/(pages)/dashboard/page.tsx
@@ -316,13 +316,13 @@ const Dashboard: React.FC = () => {
)}
-
{users.length === 0 && organizations.length === 0 ? (
No assigned clients or organisations found.
) : (
- {users.map((user) => (
-
+ {users.map((user) => (
+
+
c.client_name === user.username)?.last_report_date as string) || 'No report'}`}
@@ -333,12 +333,14 @@ const Dashboard: React.FC = () => {
- ))}
- {organizations.map((org) => (
-
+
+ ))}
+ {organizations.map((org) => (
+
+
o.organization_name === org.name)?.last_report_date as string) || 'No report'}`}
+ secondary={`Last Report: ${formatDate(lastReportDatesOrgs.find(o => o.organization_name === org.name)?.last_report_date as string) || 'No report' }`}
/>
- ))}
-
+
+ ))}
+
+
)}
-
);
}
diff --git a/CoVAR-app/src/app/(pages)/evaluate/conflicts/[name]/page.tsx b/CoVAR-app/src/app/(pages)/evaluate/conflicts/[name]/page.tsx
index 37bb746..53dc88f 100644
--- a/CoVAR-app/src/app/(pages)/evaluate/conflicts/[name]/page.tsx
+++ b/CoVAR-app/src/app/(pages)/evaluate/conflicts/[name]/page.tsx
@@ -745,6 +745,7 @@ const UserConflicts = () => {
alignItems: 'center',
width: '100%',
height: '100%',
+
}}>
@@ -756,7 +757,21 @@ const UserConflicts = () => {
return (
-
+
{matchedReports.length > 0 && (
{renderedMatchedReports}
diff --git a/CoVAR-app/src/app/(pages)/evaluate/organization/[organization]/page.tsx b/CoVAR-app/src/app/(pages)/evaluate/organization/[organization]/page.tsx
index ab045cd..526b2f3 100644
--- a/CoVAR-app/src/app/(pages)/evaluate/organization/[organization]/page.tsx
+++ b/CoVAR-app/src/app/(pages)/evaluate/organization/[organization]/page.tsx
@@ -47,7 +47,7 @@ const OrganizationEvaluation: React.FC = () => {
}, [router]);
const pathname = usePathname();
- const organizationName = pathname.split('/').pop();
+ const organizationName = decodeURIComponent(pathname.split('/').pop() || '');
const [uploads, setUploads] = useState([]);
const [reportIds, setReportIds] = useState([]);
@@ -238,7 +238,22 @@ const OrganizationEvaluation: React.FC = () => {
-
+
diff --git a/CoVAR-app/src/app/(pages)/evaluate/user/[username]/page.tsx b/CoVAR-app/src/app/(pages)/evaluate/user/[username]/page.tsx
index 20c39cb..8892d90 100644
--- a/CoVAR-app/src/app/(pages)/evaluate/user/[username]/page.tsx
+++ b/CoVAR-app/src/app/(pages)/evaluate/user/[username]/page.tsx
@@ -222,7 +222,24 @@ const UserEvaluation: React.FC = () => {
-
+
diff --git a/CoVAR-app/src/functions/requests.tsx b/CoVAR-app/src/functions/requests.tsx
index 34f71c7..45b823c 100644
--- a/CoVAR-app/src/functions/requests.tsx
+++ b/CoVAR-app/src/functions/requests.tsx
@@ -518,8 +518,8 @@ export const fetchAndMatchReports = async (reportIds: number[]) => {
export const generateReportRequest = async (finalReport: any[], name: string | undefined, type: string | null) => {
try {
const token = localStorage.getItem('accessToken');
-
-
+ name = decodeURIComponent(name || '');
+ console.log(name)
const request: AxiosRequestConfig = {
method: 'post',
url: '/api/uploads/generateReport',
diff --git a/server/routes/uploads.js b/server/routes/uploads.js
index 0e9e023..d88c5d2 100644
--- a/server/routes/uploads.js
+++ b/server/routes/uploads.js
@@ -390,6 +390,7 @@ router.get('/uploads/client/:clientName', authenticateToken, async (req, res) =>
// Endpoint to generate report
router.post('/uploads/generateReport', authenticateToken, async (req, res) => {
const { finalReport, name, type } = req.body;
+ console.log("finalReport:",finalReport, "name:", name, "type:", type);
if (!finalReport || finalReport.length === 0) {
return res.status(400).json({ error: 'Reports or report IDs are missing' });