From 5cdfaafe031fa899bfbd6e84966c1b5a986b1270 Mon Sep 17 00:00:00 2001 From: nguentrungthat Date: Fri, 14 Feb 2025 08:03:05 +0700 Subject: [PATCH] fic build --- .../pages/StaffEvaluation/StaffEvaluation.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/FRONTEND/src/pages/StaffEvaluation/StaffEvaluation.tsx b/FRONTEND/src/pages/StaffEvaluation/StaffEvaluation.tsx index c0c6ddc..5867c8c 100644 --- a/FRONTEND/src/pages/StaffEvaluation/StaffEvaluation.tsx +++ b/FRONTEND/src/pages/StaffEvaluation/StaffEvaluation.tsx @@ -128,7 +128,13 @@ const StaffEvaluation = () => { DataPJParticipating[] >([]) const [dataSummaryTracking, setDataSummaryTracking] = - useState() + useState({ + on_time_morning: 0, + late_morning: 0, + on_time_afternoon: 0, + late_afternoon: 0, + value: [], + }) const form = useForm({ initialValues: { @@ -433,7 +439,9 @@ const StaffEvaluation = () => { projectSummary[projectName].total_time_spent += totalTimeSpent }) - return Object.values(projectSummary) + const returnValue: DataPJParticipating[] = Object.values(projectSummary) + + return returnValue } useEffect(() => { @@ -1051,10 +1059,10 @@ const StaffEvaluation = () => { withLabelsLine labelsPosition="outside" labelsType="value" - withLabels={dataSummaryTracking?.value?.length > 0} + withLabels={dataSummaryTracking.value.length > 0} withTooltip data={ - dataSummaryTracking?.value?.length > 0 + dataSummaryTracking.value.length > 0 ? [ { name: 'On time morning',