diff --git a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx index ef6bc12..dde5283 100644 --- a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx +++ b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx @@ -287,7 +287,7 @@ const AchievementDetails = (props) => { const twelveTask = item.twelve && item.twelve.task; const twelveCompletion = twelveAssessmentPerformance && twelveTask && twelveAssessmentPerformance / twelveTask; - let days = moment().diff(moment(item.hiredate).format('YYYY-MM-DD'), 'days') + let days = item.hiredate ? moment().diff(moment(item.hiredate).format('YYYY-MM-DD'), 'days') : 0 let day = days / 365 const workingYears = day.toFixed(1) return Object.assign({}, item, { @@ -322,11 +322,11 @@ const AchievementDetails = (props) => { for (let d of allList) { exportTable += ` -
${d['department']}
-
${d['sale']}
-
${d['business']}
-
${d['hiredate']}
-
${d['regularDate']}
+
${d['department'] ? d['department'] : ''}
+
${d['sale'] ? d['sale'] : ''}
+
${d['business'] ? d['business'] : ''}
+
${d['hiredate'] ? d['hiredate'] : ''}
+
${d['regularDate'] ? d['regularDate'] : ''}
${d['workingYears']}
${d.one ? d.one.amount : ''}