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',