From 6e0c4d43613e7a781936030c5b347c5e9da203f7 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Sun, 8 Sep 2024 23:07:47 +0100 Subject: [PATCH] Added search per exam --- src/dashboards/MasterCorporate/MasterStatistical.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dashboards/MasterCorporate/MasterStatistical.tsx b/src/dashboards/MasterCorporate/MasterStatistical.tsx index 01baeba9..fb4c559b 100644 --- a/src/dashboards/MasterCorporate/MasterStatistical.tsx +++ b/src/dashboards/MasterCorporate/MasterStatistical.tsx @@ -42,7 +42,7 @@ interface UserCount { maxUserCount: number; } -const searchFilters = [["email"], ["user"], ["userId"]]; +const searchFilters = [["email"], ["user"], ["userId"], ["exams"], ["assignment"]]; const SIZE = 16; @@ -82,6 +82,7 @@ const MasterStatistical = (props: Props) => { email: userData?.email || "N/A", userId: assignee, corporateId: a.corporateId, + exams: a.exams.map((x) => x.id).join(", "), corporate, assignment: a.name, }; @@ -90,7 +91,7 @@ const MasterStatistical = (props: Props) => { ...commonData, correct: 0, submitted: false, - // date: moment(), + date: null, }; } @@ -208,7 +209,7 @@ const MasterStatistical = (props: Props) => { cell: (info) => { const date = info.getValue(); if (date) { - return {date.format("DD/MM/YYYY")}; + return {!!date ? date.format("DD/MM/YYYY") : "N/A"}; } return {""};