diff --git a/src/pages/attendance-history.tsx b/src/pages/attendance-history.tsx index 4542c974..06dc0b5c 100644 --- a/src/pages/attendance-history.tsx +++ b/src/pages/attendance-history.tsx @@ -781,17 +781,34 @@ const UserAttendanceHistory = () => { {cohortMemberList?.length > 0 ? ( - {displayStudentList?.map((user: any) => ( - - ))} + {displayStudentList.length >=1 ? ( + displayStudentList?.map((user: any) => ( + + )) + ) : ( + + + {t('COMMON.NO_DATA_FOUND')} + + + )} ) : ( { mt={2} p={'1rem'} borderRadius={'1rem'} - bgcolor={'secondary.light'} + bgcolor={theme.palette.warning['A400']} + // bgcolor={'secondary.light'} > {t('COMMON.NO_DATA_FOUND')} @@ -816,7 +834,7 @@ const UserAttendanceHistory = () => { /> - {displayStudentList ? : null} + {displayStudentList.length>=1 ? : null} ); }; diff --git a/src/pages/attendance-overview.tsx b/src/pages/attendance-overview.tsx index 7a0244a9..cf881eb8 100644 --- a/src/pages/attendance-overview.tsx +++ b/src/pages/attendance-overview.tsx @@ -142,9 +142,9 @@ const AttendanceOverview: React.FC = () => { const response = res?.data?.result?.attendanceDate; if (response) { setNumberOfDaysAttendanceMarked(Object.keys(response)?.length); - } else { - setNumberOfDaysAttendanceMarked(0); - } + } else { + setNumberOfDaysAttendanceMarked(0); + } }; if (classId) { getAttendanceMarkedDays(); @@ -482,7 +482,7 @@ const AttendanceOverview: React.FC = () => { // close modal of sort const handleCloseModal = () => { - setModalOpen(false) + setModalOpen(false); }; //handel sorting @@ -564,7 +564,7 @@ const AttendanceOverview: React.FC = () => { }; return ( - {(displayStudentList.length) ? : null} + {displayStudentList.length ? : null}
{loading && ( @@ -787,18 +787,35 @@ const AttendanceOverview: React.FC = () => { secondColumnName={t('COMMON.CLASS_MISSED')} /> - {displayStudentList?.map((user: any) => ( - - ))} + {displayStudentList.length >= 1 ? ( + displayStudentList?.map((user: any) => ( + + )) + ) : ( + + + {t('COMMON.NO_DATA_FOUND')} + + + )} ) : ( @@ -830,7 +847,8 @@ const AttendanceOverview: React.FC = () => { mt={2} p={'1rem'} borderRadius={'1rem'} - bgcolor={'secondary.light'} + bgcolor={theme.palette.warning['A400']} + // bgcolor={'secondary.light'} > {t('COMMON.NO_DATA_FOUND')}