fic build

This commit is contained in:
nguentrungthat 2025-02-14 08:03:05 +07:00
parent 8107978a42
commit 5cdfaafe03
1 changed files with 12 additions and 4 deletions

View File

@ -128,7 +128,13 @@ const StaffEvaluation = () => {
DataPJParticipating[]
>([])
const [dataSummaryTracking, setDataSummaryTracking] =
useState<DataSummaryTracking>()
useState<DataSummaryTracking>({
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',